Merge pull request #15867 from eileenmcnaughton/test_dumber
[civicrm-core.git] / CRM / Core / TemporaryErrorScope.php
index 7f78496083669e2401bf87956ff5f15ca1da4b90..d8853b8ef8cdff4b6ea0802a32e832b9d2d630d9 100644 (file)
  * safe to temporarily switch to exception
  */
 class CRM_Core_TemporaryErrorScope {
-  static $oldFrames;
+  public static $oldFrames;
 
   /**
    * @return CRM_Core_TemporaryErrorScope
    */
   public static function useException() {
-    return self::create(array('CRM_Core_Error', 'exceptionHandler'), 1);
+    return self::create(['CRM_Core_Error', 'exceptionHandler'], 1);
   }
 
   /**
    * @return CRM_Core_TemporaryErrorScope
    */
   public static function ignoreException() {
-    return self::create(array('CRM_Core_Error', 'nullHandler'));
+    return self::create(['CRM_Core_Error', 'nullHandler']);
   }
 
   /**
@@ -45,11 +45,11 @@ class CRM_Core_TemporaryErrorScope {
    * @return CRM_Core_TemporaryErrorScope
    */
   public static function create($callback, $modeException = NULL) {
-    $newFrame = array(
+    $newFrame = [
       '_PEAR_default_error_mode' => PEAR_ERROR_CALLBACK,
       '_PEAR_default_error_options' => $callback,
       'modeException' => $modeException,
-    );
+    ];
     return new CRM_Core_TemporaryErrorScope($newFrame);
   }
 
@@ -70,11 +70,11 @@ class CRM_Core_TemporaryErrorScope {
    * Read the active error-handler settings
    */
   public static function getActive() {
-    return array(
+    return [
       '_PEAR_default_error_mode' => $GLOBALS['_PEAR_default_error_mode'],
       '_PEAR_default_error_options' => $GLOBALS['_PEAR_default_error_options'],
       'modeException' => CRM_Core_Error::$modeException,
-    );
+    ];
   }
 
   /**