Completed
Push — master ( f0d1a4...bf72bf )
by Elf
09:50
created
src/Providers/AppConfigServiceProvider.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
      */
12 12
     public function register()
13 13
     {
14
-        if (! $this->app->configurationIsCached()) {
14
+        if (!$this->app->configurationIsCached()) {
15 15
             $this->configureDefaults();
16 16
         }
17 17
 
@@ -23,20 +23,20 @@  discard block
 block discarded – undo
23 23
      */
24 24
     protected function configureDefaults()
25 25
     {
26
-        $config = $this->app['config'];
26
+        $config = $this->app[ 'config' ];
27 27
 
28 28
         // Append "app.domains"
29
-        $config['app.domains'] = array_map(function ($value) {
29
+        $config[ 'app.domains' ] = array_map(function($value) {
30 30
             if (is_string($domain = parse_url($value, PHP_URL_HOST))) {
31 31
                 if (str_contains($domain, '.')) {
32 32
                     return $domain;
33 33
                 }
34 34
             }
35
-        }, $config['support.url']);
35
+        }, $config[ 'support.url' ]);
36 36
 
37 37
         // Set "mail.from.name"
38
-        if ($config['mail.from.name'] == 'Example') {
39
-            $config['mail.from.name'] = $config['app.name'];
38
+        if ($config[ 'mail.from.name' ] == 'Example') {
39
+            $config[ 'mail.from.name' ] = $config[ 'app.name' ];
40 40
         }
41 41
     }
42 42
 
@@ -45,19 +45,19 @@  discard block
 block discarded – undo
45 45
      */
46 46
     protected function configureForCurrentRequest()
47 47
     {
48
-        $config = $this->app['config'];
49
-        $request = $this->app['request'];
48
+        $config = $this->app[ 'config' ];
49
+        $request = $this->app[ 'request' ];
50 50
 
51
-        $identifier = array_search($request->getHost(), $config['app.domains']);
51
+        $identifier = array_search($request->getHost(), $config[ 'app.domains' ]);
52 52
 
53 53
         // Configure the cookie domain
54
-        if (! is_null($identifier) && $config->has('support.cookie_domain.'.$identifier)) {
55
-            $config['session.domain'] = $config['support.cookie_domain.'.$identifier];
54
+        if (!is_null($identifier) && $config->has('support.cookie_domain.'.$identifier)) {
55
+            $config[ 'session.domain' ] = $config[ 'support.cookie_domain.'.$identifier ];
56 56
         }
57 57
 
58 58
         // Configure the auth defaults
59
-        if (! is_null($identifier) && is_array($auth = $config['support.auth.'.$identifier])) {
60
-            $config['auth.defaults'] = $auth;
59
+        if (!is_null($identifier) && is_array($auth = $config[ 'support.auth.'.$identifier ])) {
60
+            $config[ 'auth.defaults' ] = $auth;
61 61
         }
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
src/Providers/CaptchaServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
             base_path('vendor/mews/captcha/config/captcha.php') => config_path('captcha.php'),
16 16
         ], 'config');
17 17
 
18
-        $this->app['validator']->extend('captcha', function ($attribute, $value, $parameters) {
18
+        $this->app[ 'validator' ]->extend('captcha', function($attribute, $value, $parameters) {
19 19
             return captcha_check($value);
20 20
         });
21 21
     }
Please login to merge, or discard this patch.
src/Providers/RoutingServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
 
26 26
         $router->macro(
27 27
             'modelWithHashid',
28
-            function ($key, $class, Closure $callback = null) use ($router) {
29
-                $router->bind($key, function ($value) use ($router, $class, $callback) {
28
+            function($key, $class, Closure $callback = null) use ($router) {
29
+                $router->bind($key, function($value) use ($router, $class, $callback) {
30 30
                     if (is_null($value)) {
31 31
                         return;
32 32
                     }
Please login to merge, or discard this patch.
src/Providers/ClientServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function boot()
15 15
     {
16
-        $this->app['view']->share('client', $this->app['client']);
16
+        $this->app[ 'view' ]->share('client', $this->app[ 'client' ]);
17 17
     }
18 18
 
19 19
     /**
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
      */
32 32
     protected function registerAgent()
33 33
     {
34
-        if (! $this->app->bound('agent')) {
35
-            $this->app->singleton('agent', function () {
34
+        if (!$this->app->bound('agent')) {
35
+            $this->app->singleton('agent', function() {
36 36
                 return new Agent;
37 37
             });
38 38
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     protected function registerClient()
47 47
     {
48
-        $this->app->singleton('client', function () {
48
+        $this->app->singleton('client', function() {
49 49
             return new Client;
50 50
         });
51 51
 
Please login to merge, or discard this patch.
src/Mob/Sms.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
      * @throws \App\Exceptions\InvalidInputException
20 20
      * @throws \App\Exceptions\ActionFailureException
21 21
      */
22
-    public static function verify($credentials = [])
22
+    public static function verify($credentials = [ ])
23 23
     {
24
-        $credentials['appkey'] = config('services.mobsms.key');
24
+        $credentials[ 'appkey' ] = config('services.mobsms.key');
25 25
 
26 26
         try {
27 27
             $response = (new HttpClient([
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             throw new ActionFailureException('短信网关请求失败');
39 39
         }
40 40
 
41
-        if (! is_array($response)) {
41
+        if (!is_array($response)) {
42 42
             throw new ActionFailureException('短信网关数据异常[sms]');
43 43
         }
44 44
 
Please login to merge, or discard this patch.
src/Helper.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Datatables/DatatablesServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,6 +36,6 @@
 block discarded – undo
36 36
      */
37 37
     public function provides()
38 38
     {
39
-        return ['datatables.html'];
39
+        return [ 'datatables.html' ];
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
src/Datatables/Engines/EloquentEngine.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Datatables/Services/DataTable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
98 98
     protected function getBuilderParameters()
99 99
     {
100 100
         return [
101
-            'order' => [[0, 'desc']],
101
+            'order' => [ [ 0, 'desc' ] ],
102 102
         ];
103 103
     }
104 104
 }
Please login to merge, or discard this patch.