@@ -12,9 +12,9 @@ |
||
| 12 | 12 | /** |
| 13 | 13 | * @inheritdoc |
| 14 | 14 | */ |
| 15 | - public function __construct(array $config = []) |
|
| 15 | + public function __construct(array $config = [ ]) |
|
| 16 | 16 | { |
| 17 | - $config['rules'] = $this->_getRules(); |
|
| 17 | + $config[ 'rules' ] = $this->_getRules(); |
|
| 18 | 18 | parent::__construct($config); |
| 19 | 19 | } |
| 20 | 20 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | ], |
| 48 | 48 | 'authenticator' => [ |
| 49 | 49 | 'class' => CompositeAuth::class, |
| 50 | - 'optional' => ['options', 'head'] |
|
| 50 | + 'optional' => [ 'options', 'head' ] |
|
| 51 | 51 | ], |
| 52 | 52 | 'rateLimiter' => [ |
| 53 | 53 | 'class' => RateLimiter::class, |
@@ -62,6 +62,6 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | protected function verbs(): array |
| 64 | 64 | { |
| 65 | - return []; |
|
| 65 | + return [ ]; |
|
| 66 | 66 | } |
| 67 | 67 | } |
@@ -24,12 +24,12 @@ discard block |
||
| 24 | 24 | return constant($constName); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - if (!empty($_SERVER['argv'])) { |
|
| 28 | - foreach ($_SERVER['argv'] as $key => $arg) { |
|
| 27 | + if (!empty($_SERVER[ 'argv' ])) { |
|
| 28 | + foreach ($_SERVER[ 'argv' ] as $key => $arg) { |
|
| 29 | 29 | if (strpos($arg, "--{$argName}=") !== false) { |
| 30 | 30 | $parts = explode('=', $arg); |
| 31 | - $value = $parts[1]; |
|
| 32 | - unset($_SERVER['argv'][$key]); |
|
| 31 | + $value = $parts[ 1 ]; |
|
| 32 | + unset($_SERVER[ 'argv' ][ $key ]); |
|
| 33 | 33 | |
| 34 | 34 | return $value; |
| 35 | 35 | } |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $translationsPath = $findConfigPath('CRAFT_TRANSLATIONS_PATH', 'translationsPath') ?: $basePath.'/translations'; |
| 102 | 102 | |
| 103 | 103 | // Set the environment |
| 104 | -$environment = $findConfig('CRAFT_ENVIRONMENT', 'env') ?: ($_SERVER['SERVER_NAME'] ?? null); |
|
| 104 | +$environment = $findConfig('CRAFT_ENVIRONMENT', 'env') ?: ($_SERVER[ 'SERVER_NAME' ] ?? null); |
|
| 105 | 105 | |
| 106 | 106 | // Validate the paths |
| 107 | 107 | // ----------------------------------------------------------------------------- |
@@ -184,8 +184,8 @@ discard block |
||
| 184 | 184 | require $srcPath.'/Craft.php'; |
| 185 | 185 | |
| 186 | 186 | // Move Yii's autoloader to the end (Composer's is faster when optimized) |
| 187 | -spl_autoload_unregister(['Yii', 'autoload']); |
|
| 188 | -spl_autoload_register(['Yii', 'autoload'], true, false); |
|
| 187 | +spl_autoload_unregister([ 'Yii', 'autoload' ]); |
|
| 188 | +spl_autoload_register([ 'Yii', 'autoload' ], true, false); |
|
| 189 | 189 | |
| 190 | 190 | // Set aliases |
| 191 | 191 | Craft::setAlias('@lib', $libPath); |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | ); |
| 215 | 215 | |
| 216 | 216 | if (defined('CRAFT_SITE') || defined('CRAFT_LOCALE')) { |
| 217 | - $config['components']['sites']['currentSite'] = defined('CRAFT_SITE') ? CRAFT_SITE : CRAFT_LOCALE; |
|
| 217 | + $config[ 'components' ][ 'sites' ][ 'currentSite' ] = defined('CRAFT_SITE') ? CRAFT_SITE : CRAFT_LOCALE; |
|
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | // Initialize the application |