From 596a8bdf885d7d9457039b51e81d6118c7d20651 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Tue, 7 Apr 2020 15:16:34 -0400 Subject: [PATCH] standard is bool instead of boolean --- CRM/Core/Permission.php | 2 +- CRM/Event/Page/List.php | 2 +- CRM/Report/Form/Grant/Statistics.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Core/Permission.php b/CRM/Core/Permission.php index 3cce2d04c4f5..08c978af389b 100644 --- a/CRM/Core/Permission.php +++ b/CRM/Core/Permission.php @@ -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 diff --git a/CRM/Event/Page/List.php b/CRM/Event/Page/List.php index 9a5cb1c513e1..e3f4a086180b 100644 --- a/CRM/Event/Page/List.php +++ b/CRM/Event/Page/List.php @@ -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) { diff --git a/CRM/Report/Form/Grant/Statistics.php b/CRM/Report/Form/Grant/Statistics.php index b25f40ca8865..6e8f89371080 100644 --- a/CRM/Report/Form/Grant/Statistics.php +++ b/CRM/Report/Form/Grant/Statistics.php @@ -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,