@@ -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 |
@@ -67,6 +67,6 @@ |
||
67 | 67 | */ |
68 | 68 | protected function verbs(): array |
69 | 69 | { |
70 | - return []; |
|
70 | + return [ ]; |
|
71 | 71 | } |
72 | 72 | } |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | /** |
26 | 26 | * @inheritdoc |
27 | 27 | */ |
28 | - public function __construct(array $config = []) |
|
28 | + public function __construct(array $config = [ ]) |
|
29 | 29 | { |
30 | - $config['rules'] = $this->getRules(); |
|
30 | + $config[ 'rules' ] = $this->getRules(); |
|
31 | 31 | parent::__construct($config); |
32 | 32 | } |
33 | 33 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | public function parseRequest($request) |
52 | 52 | { |
53 | 53 | if (!$result = parent::parseRequest($request)) { |
54 | - Craft::warning("Unable to parse request: " . $request->getUrl()); |
|
54 | + Craft::warning("Unable to parse request: ".$request->getUrl()); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | return $result; |
@@ -10,8 +10,8 @@ discard block |
||
10 | 10 | 'enableAutoLogin' => false, |
11 | 11 | 'autoRenewCookie' => false, |
12 | 12 | 'enableSession' => false, |
13 | - 'identityCookie' => Craft::cookieConfig(['name' => $stateKeyPrefix.'_identity']), |
|
14 | - 'usernameCookie' => Craft::cookieConfig(['name' => $stateKeyPrefix.'_username']), |
|
13 | + 'identityCookie' => Craft::cookieConfig([ 'name' => $stateKeyPrefix.'_identity' ]), |
|
14 | + 'usernameCookie' => Craft::cookieConfig([ 'name' => $stateKeyPrefix.'_username' ]), |
|
15 | 15 | 'loginUrl' => null, |
16 | 16 | 'idParam' => $stateKeyPrefix.'__id', |
17 | 17 | 'authTimeoutParam' => $stateKeyPrefix.'__expire', |
@@ -48,5 +48,5 @@ discard block |
||
48 | 48 | 'modules' => [ |
49 | 49 | 'debug' => null |
50 | 50 | ], |
51 | - 'bootstrap' => [] |
|
51 | + 'bootstrap' => [ ] |
|
52 | 52 | ]; |
53 | 53 | \ No newline at end of file |