$override_value) { if (!array_key_exists($override_key, self::$config)) { trigger_error( 'Failed to validate config: ' . "Undefined option '$override_key'" , E_USER_ERROR); } if (gettype($override_value) !== gettype(self::$config[$override_key])) { trigger_error( 'Failed to validate config: ' . "Type mismatch in config file: '$override_key' should be of type " . gettype(self::$config[$override_key]) . ' not ' . gettype($override_value) , E_USER_ERROR); } self::$config[$override_key] = $override_value; } return self::$config[$key]; } }