standard is bool instead of boolean
authordemeritcowboy <demeritcowboy@hotmail.com>
Tue, 7 Apr 2020 19:16:34 +0000 (15:16 -0400)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Tue, 7 Apr 2020 21:10:28 +0000 (17:10 -0400)
CRM/Core/Permission.php
CRM/Event/Page/List.php
CRM/Report/Form/Grant/Statistics.php

index 3cce2d04c4f5acdf19d2a2e704796b5916aac9ca..08c978af389b3deb05f32767af0dee3265ae826d 100644 (file)
@@ -531,7 +531,7 @@ class CRM_Core_Permission {
     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
index 9a5cb1c513e1a06fb4344449e7963ebe2d5f18f3..e3f4a086180bc22ffd3c032b68cdc18e975f784f 100644 (file)
@@ -24,7 +24,7 @@ class CRM_Event_Page_List extends CRM_Core_Page {
     $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) {
index b25f40ca886565965edd07fa935b9c322ca79d26..6e8f893710805c881b84bca5e983d792516f3ec7 100644 (file)
@@ -487,7 +487,7 @@ SELECT COUNT({$this->_aliases['civicrm_grant']}.id) as count ,
                 "({$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,