api4 - Enable services
[civicrm-core.git] / Civi / Core / SettingsStack.php
index 434c8371e6b6d0031fa7e70d9007804c25d11bd2..9183857d5cb6a28e433a2f7363ae3774c2c0c344 100644 (file)
@@ -9,7 +9,7 @@ namespace Civi\Core;
  *
  * Like the global `$civicrm_setting` variable, it works best with typical inert settings that
  * do not trigger extra activation logic. A handful of settings (such as `enable_components`
- * and ~5 others)
+ * and ~5 others) should be avoided, but most settings should work.
  *
  * @package Civi\Core
  */
@@ -19,7 +19,7 @@ class SettingsStack {
    * @var array
    *   Ex: $stack[0] == ['settingName', 'oldSettingValue'];
    */
-  protected $stack = array();
+  protected $stack = [];
 
   /**
    * Temporarily apply a setting.
@@ -29,10 +29,10 @@ class SettingsStack {
    */
   public function push($setting, $settingValue) {
     if (isset($GLOBALS['civicrm_setting']['domain'][$setting])) {
-      $this->stack[] = array($setting, $GLOBALS['civicrm_setting']['domain'][$setting]);
+      $this->stack[] = [$setting, $GLOBALS['civicrm_setting']['domain'][$setting]];
     }
     else {
-      $this->stack[] = array($setting, NULL);
+      $this->stack[] = [$setting, NULL];
     }
     $GLOBALS['civicrm_setting']['domain'][$setting] = $settingValue;
     \Civi::service('settings_manager')->useMandatory();