@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | { |
20 | 20 | $inputs = $request->input(); |
21 | 21 | |
22 | - array_walk_recursive($inputs, function (&$value) { |
|
22 | + array_walk_recursive($inputs, function(&$value) { |
|
23 | 23 | $value = trim($value); |
24 | 24 | }); |
25 | 25 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | { |
40 | 40 | $extension = ExtensionGuesser::getInstance()->guess($mimeType); |
41 | 41 | |
42 | - if (! is_null($extension)) { |
|
42 | + if (!is_null($extension)) { |
|
43 | 43 | if ('jpeg' == $extension) { |
44 | 44 | $extension = 'jpg'; |
45 | 45 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | 'x86_64' => 'Simulator', |
139 | 139 | ]; |
140 | 140 | |
141 | - return isset($list[$platform]) ? $list[$platform] : $platform; |
|
141 | + return isset($list[ $platform ]) ? $list[ $platform ] : $platform; |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
@@ -162,9 +162,9 @@ discard block |
||
162 | 162 | 'vip.sina.com' => 'http://mail.sina.com.cn', |
163 | 163 | ]; |
164 | 164 | |
165 | - $domain = strtolower($match[1]); |
|
165 | + $domain = strtolower($match[ 1 ]); |
|
166 | 166 | |
167 | - return isset($list[$domain]) ? $list[$domain] : 'http://mail.'.$domain; |
|
167 | + return isset($list[ $domain ]) ? $list[ $domain ] : 'http://mail.'.$domain; |
|
168 | 168 | } |
169 | 169 | } |
170 | 170 | |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | $random = str_random(strlen($text)); |
215 | 215 | |
216 | 216 | // 按字符拼接:随机字符串 + 随机字符串异或原文 |
217 | - $tmp = static::sampleEncryption($text, $random, function ($a, $b) { |
|
217 | + $tmp = static::sampleEncryption($text, $random, function($a, $b) { |
|
218 | 218 | return $b.($a ^ $b); |
219 | 219 | }); |
220 | 220 | |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | $tmpLength = strlen($tmp); |
242 | 242 | $result = ''; |
243 | 243 | for ($i = 0; $i < $tmpLength, ($i + 1) < $tmpLength; $i += 2) { |
244 | - $result .= $tmp[$i] ^ $tmp[$i + 1]; |
|
244 | + $result .= $tmp[ $i ] ^ $tmp[ $i + 1 ]; |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | return $result; |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | $key = (string) $key; |
267 | 267 | $keyLength = strlen($key); |
268 | 268 | if (is_null($callback)) { |
269 | - $callback = function ($a, $b) { |
|
269 | + $callback = function($a, $b) { |
|
270 | 270 | return $a ^ $b; |
271 | 271 | }; |
272 | 272 | } |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | $result = ''; |
275 | 275 | $textLength = strlen($text); |
276 | 276 | for ($i = 0; $i < $textLength; $i++) { |
277 | - $tmp = $callback($text[$i], $key[$i % $keyLength], $i); |
|
277 | + $tmp = $callback($text[ $i ], $key[ $i % $keyLength ], $i); |
|
278 | 278 | if (false === $tmp) { |
279 | 279 | break; |
280 | 280 | } |
@@ -309,10 +309,10 @@ discard block |
||
309 | 309 | while ($number >= $charactersLength) { |
310 | 310 | $mod = (int) bcmod($number, $charactersLength); |
311 | 311 | $number = (int) bcdiv($number, $charactersLength); |
312 | - $string = $characters[$mod].$string; |
|
312 | + $string = $characters[ $mod ].$string; |
|
313 | 313 | } |
314 | 314 | |
315 | - return $characters[$number].$string; |
|
315 | + return $characters[ $number ].$string; |
|
316 | 316 | } |
317 | 317 | |
318 | 318 | /** |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | |
335 | 335 | $number = 0; |
336 | 336 | for ($i = 0; $i < $stringLength; $i++) { |
337 | - $index = strpos($characters, $string[$i]); |
|
337 | + $index = strpos($characters, $string[ $i ]); |
|
338 | 338 | $number = (int) bcadd($number, bcmul($index, bcpow($charactersLength, $i))); |
339 | 339 | } |
340 | 340 |
@@ -36,6 +36,6 @@ |
||
36 | 36 | */ |
37 | 37 | public function provides() |
38 | 38 | { |
39 | - return ['datatables.html']; |
|
39 | + return [ 'datatables.html' ]; |
|
40 | 40 | } |
41 | 41 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | } |
23 | 23 | |
24 | 24 | if (is_null($content) && is_string($name)) { |
25 | - $content = function ($model) use ($name) { |
|
25 | + $content = function($model) use ($name) { |
|
26 | 26 | return $model->{$name}; |
27 | 27 | }; |
28 | 28 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | * @param array $attributes |
15 | 15 | * @return $this |
16 | 16 | */ |
17 | - protected function staticColumn($name, array $attributes = []) |
|
17 | + protected function staticColumn($name, array $attributes = [ ]) |
|
18 | 18 | { |
19 | 19 | return array_merge([ |
20 | 20 | 'data' => $name, |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $prefix = $prefix ? '/'.$prefix.'/' : '/'; |
46 | 46 | $suffix = $suffix ? '/'.$suffix : ''; |
47 | 47 | |
48 | - return function () use ($prefix, $suffix, $data, $content) { |
|
48 | + return function() use ($prefix, $suffix, $data, $content) { |
|
49 | 49 | return <<<JS |
50 | 50 | function (data, type, row, meta) { |
51 | 51 | if (type == 'display' && data) { |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | protected function getBuilderParameters() |
99 | 99 | { |
100 | 100 | return [ |
101 | - 'order' => [[0, 'desc']], |
|
101 | + 'order' => [ [ 0, 'desc' ] ], |
|
102 | 102 | ]; |
103 | 103 | } |
104 | 104 | } |
@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function stripedTable() |
37 | 37 | { |
38 | - if (! str_contains($this->tableAttributes['class'], 'table-striped')) { |
|
39 | - $this->tableAttributes['class'] = str_replace( |
|
38 | + if (!str_contains($this->tableAttributes[ 'class' ], 'table-striped')) { |
|
39 | + $this->tableAttributes[ 'class' ] = str_replace( |
|
40 | 40 | 'table-hover', '', |
41 | - $this->tableAttributes['class'].' table-striped' |
|
41 | + $this->tableAttributes[ 'class' ].' table-striped' |
|
42 | 42 | ); |
43 | 43 | } |
44 | 44 | |
@@ -52,10 +52,10 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function hoveredTable() |
54 | 54 | { |
55 | - if (! str_contains($this->tableAttributes['class'], 'table-hover')) { |
|
56 | - $this->tableAttributes['class'] = str_replace( |
|
55 | + if (!str_contains($this->tableAttributes[ 'class' ], 'table-hover')) { |
|
56 | + $this->tableAttributes[ 'class' ] = str_replace( |
|
57 | 57 | 'table-striped', '', |
58 | - $this->tableAttributes['class'].' table-hover' |
|
58 | + $this->tableAttributes[ 'class' ].' table-hover' |
|
59 | 59 | ); |
60 | 60 | } |
61 | 61 |
@@ -30,14 +30,14 @@ discard block |
||
30 | 30 | { |
31 | 31 | $filename = (string) $this->option('filename'); |
32 | 32 | |
33 | - $assets = $this->laravel['config']->get($filename); |
|
33 | + $assets = $this->laravel[ 'config' ]->get($filename); |
|
34 | 34 | |
35 | 35 | $revisioned = $this->revisionAssets($assets); |
36 | 36 | |
37 | 37 | if ($assets !== $revisioned) { |
38 | 38 | $this->updateAssetsVersionConfigFile($filename, $revisioned); |
39 | 39 | |
40 | - $this->laravel['config'][$filename] = $revisioned; |
|
40 | + $this->laravel[ 'config' ][ $filename ] = $revisioned; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | $this->info('Assets version configuration'. |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | protected function revisionAssets($assets) |
55 | 55 | { |
56 | - $newAssets = []; |
|
56 | + $newAssets = [ ]; |
|
57 | 57 | |
58 | 58 | if (is_array($assets)) { |
59 | 59 | foreach ($assets as $filename => $value) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $this->error("Revisioning file [{$filename}] failed."); |
73 | 73 | } |
74 | 74 | |
75 | - $newAssets[$filename] = $value; |
|
75 | + $newAssets[ $filename ] = $value; |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 |
@@ -38,17 +38,17 @@ |
||
38 | 38 | */ |
39 | 39 | public function handle() |
40 | 40 | { |
41 | - if (! $this->option('alone')) { |
|
41 | + if (!$this->option('alone')) { |
|
42 | 42 | $this->call('clear-compiled'); |
43 | 43 | } |
44 | 44 | |
45 | 45 | if ($this->laravel->bound('command.ide-helper.generate')) { |
46 | 46 | $this->call('ide-helper:generate'); |
47 | 47 | $this->call('ide-helper:meta'); |
48 | - $this->call('ide-helper:models', ['-R' => true, '-N' => true]); |
|
48 | + $this->call('ide-helper:models', [ '-R' => true, '-N' => true ]); |
|
49 | 49 | } |
50 | 50 | |
51 | - if (! $this->option('alone')) { |
|
51 | + if (!$this->option('alone')) { |
|
52 | 52 | $this->call('optimize'); |
53 | 53 | } |
54 | 54 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | |
38 | 38 | $this->setCharactersInEnvironmentFile($characters); |
39 | 39 | |
40 | - $this->laravel['config']['support.int2string'] = $characters; |
|
40 | + $this->laravel[ 'config' ][ 'support.int2string' ] = $characters; |
|
41 | 41 | |
42 | 42 | $this->info("Characters [<comment>$characters</comment>] set successfully."); |
43 | 43 | } |