@@ -42,7 +42,7 @@ |
||
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 | } |
@@ -2,7 +2,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | * |
@@ -29,7 +29,7 @@ discard block |
||
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 |
||
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.'); |
@@ -29,14 +29,14 @@ discard block |
||
29 | 29 | { |
30 | 30 | $config = (string) $this->option('config'); |
31 | 31 | |
32 | - $assets = $this->laravel['config']->get($config); |
|
32 | + $assets = $this->laravel[ 'config' ]->get($config); |
|
33 | 33 | |
34 | 34 | $revisioned = $this->revisionAssets($assets); |
35 | 35 | |
36 | 36 | if ($assets !== $revisioned) { |
37 | 37 | $this->updateAssetsConfigFile($config, $revisioned); |
38 | 38 | |
39 | - $this->laravel['config'][$config] = $revisioned; |
|
39 | + $this->laravel[ 'config' ][ $config ] = $revisioned; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | $this->info('Assets configuration '.(is_null($assets) ? 'created!' : 'updated!')); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | protected function revisionAssets($assets) |
52 | 52 | { |
53 | - $newAssets = []; |
|
53 | + $newAssets = [ ]; |
|
54 | 54 | |
55 | 55 | if (is_array($assets)) { |
56 | 56 | foreach ($assets as $file => $value) { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $this->error("Revisioning file [{$file}] failed."); |
68 | 68 | } |
69 | 69 | |
70 | - $newAssets[$file] = $value; |
|
70 | + $newAssets[ $file ] = $value; |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 |
@@ -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 [$characters] set successfully."); |
43 | 43 | } |
@@ -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 | } |
@@ -20,15 +20,15 @@ |
||
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 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function register() |
14 | 14 | { |
15 | - array_map([$this->app, 'register'], $this->getServiceProviders()); |
|
15 | + array_map([ $this->app, 'register' ], $this->getServiceProviders()); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | /** |
@@ -19,13 +19,13 @@ |
||
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'); |