*
* 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
*/
* @var array
* Ex: $stack[0] == ['settingName', 'oldSettingValue'];
*/
- protected $stack = array();
+ protected $stack = [];
/**
* Temporarily apply a setting.
*/
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();