Completed
Push — master ( 7e59dd...f0d1a4 )
by Elf
04:46
created
src/Image/Filters/Resize.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function applyFilter(Image $image)
44 44
     {
45
-        return $image->orientate()->resize($this->width, $this->height, function ($constraint) {
45
+        return $image->orientate()->resize($this->width, $this->height, function($constraint) {
46 46
             $this->constraint($constraint);
47 47
         });
48 48
     }
Please login to merge, or discard this patch.
src/helpers.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 use Ramsey\Uuid\Uuid;
4 4
 
5
-if (! function_exists('get_id')) {
5
+if (!function_exists('get_id')) {
6 6
     /**
7 7
      * Get id from a mixed variable.
8 8
      *
@@ -15,14 +15,14 @@  discard block
 block discarded – undo
15 15
         if (is_object($var)) {
16 16
             return $var->{$key};
17 17
         } elseif (is_array($var)) {
18
-            return $var[$key];
18
+            return $var[ $key ];
19 19
         }
20 20
 
21 21
         return $var;
22 22
     }
23 23
 }
24 24
 
25
-if (! function_exists('is_domain')) {
25
+if (!function_exists('is_domain')) {
26 26
     /**
27 27
      * Determines the current domain equals to the given domain identifier.
28 28
      *
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     }
36 36
 }
37 37
 
38
-if (! function_exists('app_url')) {
38
+if (!function_exists('app_url')) {
39 39
     /**
40 40
      * Generate an URL for the application.
41 41
      *
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
     function app_url($path = '', $parameters = null, $identifier = 'site')
48 48
     {
49 49
         $path = trim($path, '/');
50
-        if (! empty($path) && ! starts_with($path, ['?', '&', '#'])) {
50
+        if (!empty($path) && !starts_with($path, [ '?', '&', '#' ])) {
51 51
             $path = '/'.$path;
52 52
         }
53 53
 
54
-        if (! is_null($parameters)) {
54
+        if (!is_null($parameters)) {
55 55
             $query = http_build_query($parameters);
56
-            if (! empty($query)) {
57
-                $path .= (str_contains($path, ['?', '&', '#']) ? '&' : '?').$query;
56
+            if (!empty($query)) {
57
+                $path .= (str_contains($path, [ '?', '&', '#' ]) ? '&' : '?').$query;
58 58
             }
59 59
         }
60 60
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     }
67 67
 }
68 68
 
69
-if (! function_exists('revision')) {
69
+if (!function_exists('revision')) {
70 70
     /**
71 71
      * Get the revisioned asset path.
72 72
      *
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     }
84 84
 }
85 85
 
86
-if (! function_exists('asset_from')) {
86
+if (!function_exists('asset_from')) {
87 87
     /**
88 88
      * Generate the URL to an asset from a custom root domain such as CDN, etc.
89 89
      *
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     }
99 99
 }
100 100
 
101
-if (! function_exists('asset_url')) {
101
+if (!function_exists('asset_url')) {
102 102
     /**
103 103
      * Generate an asset URL.
104 104
      *
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     }
116 116
 }
117 117
 
118
-if (! function_exists('cdn_url')) {
118
+if (!function_exists('cdn_url')) {
119 119
     /**
120 120
      * Generate an asset CDN URL.
121 121
      *
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     }
129 129
 }
130 130
 
131
-if (! function_exists('optimus_encode')) {
131
+if (!function_exists('optimus_encode')) {
132 132
     /**
133 133
      * Encode a number with Optimus.
134 134
      *
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     }
142 142
 }
143 143
 
144
-if (! function_exists('optimus_decode')) {
144
+if (!function_exists('optimus_decode')) {
145 145
     /**
146 146
      * Decode a number with Optimus.
147 147
      *
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     }
155 155
 }
156 156
 
157
-if (! function_exists('random_uuid')) {
157
+if (!function_exists('random_uuid')) {
158 158
     /**
159 159
      * Generate a version 4 (random) UUID.
160 160
      *
Please login to merge, or discard this patch.
src/Console/Commands/OptimusGenerate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function handle()
31 31
     {
32
-        $values = array_combine(['prime', 'inverse', 'random'], Energon::generate());
32
+        $values = array_combine([ 'prime', 'inverse', 'random' ], Energon::generate());
33 33
 
34 34
         if ($this->option('show')) {
35 35
             return $this->printValues($values);
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         $this->setValuesInEnvironmentFile($values);
39 39
 
40
-        $this->laravel['config']['optimus'] = $values;
40
+        $this->laravel[ 'config' ][ 'optimus' ] = $values;
41 41
 
42 42
         $this->printValues($values);
43 43
         $this->info('Optimus values set successfully.');
Please login to merge, or discard this patch.
src/Providers/OptimusServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,15 +20,15 @@
 block discarded – undo
20 20
      */
21 21
     public function register()
22 22
     {
23
-        $this->app->singleton(Optimus::class, function ($app) {
24
-            $config = $app['config']['optimus'];
23
+        $this->app->singleton(Optimus::class, function($app) {
24
+            $config = $app[ 'config' ][ 'optimus' ];
25 25
 
26
-            return new Optimus($config['prime'], $config['inverse'], $config['random']);
26
+            return new Optimus($config[ 'prime' ], $config[ 'inverse' ], $config[ 'random' ]);
27 27
         });
28 28
 
29 29
         $this->app->alias(Optimus::class, 'optimus');
30 30
 
31
-        $this->app->singleton('command.optimus.generate', function () {
31
+        $this->app->singleton('command.optimus.generate', function() {
32 32
             return new OptimusGenerate;
33 33
         });
34 34
 
Please login to merge, or discard this patch.
src/Providers/XgPusherServiceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@
 block discarded – undo
19 19
      */
20 20
     public function register()
21 21
     {
22
-        $this->app->singleton(XgPusher::class, function ($app) {
23
-            $config = $app['config']['services.xgpush'];
22
+        $this->app->singleton(XgPusher::class, function($app) {
23
+            $config = $app[ 'config' ][ 'services.xgpush' ];
24 24
 
25
-            return (new XgPusher($config['key'], $config['secret']))
26
-                ->setEnvironment($config['environment'])
27
-                ->setCustomKey($config['custom'])
28
-                ->setAccountPrefix($config['account_prefix']);
25
+            return (new XgPusher($config[ 'key' ], $config[ 'secret' ]))
26
+                ->setEnvironment($config[ 'environment' ])
27
+                ->setCustomKey($config[ 'custom' ])
28
+                ->setAccountPrefix($config[ 'account_prefix' ]);
29 29
         });
30 30
 
31 31
         $this->app->alias(XgPusher::class, 'xgpusher');
Please login to merge, or discard this patch.
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.