Skip to content

Commit

Permalink
Merge pull request #17013 from demeritcowboy/boo2
Browse files Browse the repository at this point in the history
[REF] Use bool instead of boolean
  • Loading branch information
seamuslee001 authored Apr 8, 2020
2 parents ab97b68 + 596a8bd commit 3716b16
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CRM/Core/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ public static function checkMenuItem(&$item) {
if (empty($item['access_callback']) ||
is_numeric($item['access_callback'])
) {
return (boolean ) $item['access_callback'];
return (bool) $item['access_callback'];
}

// check whether the following Ajax requests submitted the right key
Expand Down
2 changes: 1 addition & 1 deletion CRM/Event/Page/List.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function run() {
$this->assign('events', $info);

// check if we're in shopping cart mode for events
$enable_cart = (boolean) Civi::settings()->get('enable_cart');
$enable_cart = (bool) Civi::settings()->get('enable_cart');
$this->assign('eventCartEnabled', $enable_cart);

if ($enable_cart) {
Expand Down
2 changes: 1 addition & 1 deletion CRM/Report/Form/Grant/Statistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ public function alterDisplay(&$rows) {
"({$values['percentage']}%)";
}
$totalAmt = implode(', ', $totalAmount);
$count = (boolean) CRM_Utils_Array::value('count', $values, 0) ? $values['count'] . " ({$values['percentage']}%)" : '';
$count = empty($values['count']) ? '' : "{$values['count']} ({$values['percentage']}%)";
$row[] = [
'civicrm_grant_total_grants' => $field,
'civicrm_grant_count' => $count,
Expand Down

0 comments on commit 3716b16

Please sign in to comment.