@@ -204,7 +204,7 @@ |
||
204 | 204 | $config['input_key'] ?? 'api_token', |
205 | 205 | $config['storage_key'] ?? 'api_token', |
206 | 206 | $config['hash'] ?? false |
207 | - ); |
|
207 | + ); |
|
208 | 208 | |
209 | 209 | $this->app->refresh('request', $guard, 'setRequest'); |
210 | 210 |
@@ -32,11 +32,11 @@ |
||
32 | 32 | */ |
33 | 33 | class AuthServiceProvider extends ServiceProvider |
34 | 34 | { |
35 | - /** |
|
36 | - * Register the service provider. |
|
37 | - * |
|
38 | - * @return void |
|
39 | - */ |
|
35 | + /** |
|
36 | + * Register the service provider. |
|
37 | + * |
|
38 | + * @return void |
|
39 | + */ |
|
40 | 40 | public function register() |
41 | 41 | { |
42 | 42 | $this->registerAuthenticator(); |
@@ -83,7 +83,7 @@ |
||
83 | 83 | */ |
84 | 84 | protected function registerAccessGate() |
85 | 85 | { |
86 | - $this->app->singleton(GateContract::class, function ($app) { |
|
86 | + $this->app->singleton(GateContract::class, function($app) { |
|
87 | 87 | return new Gate($app, fn() => call_user_func($app['auth']->userResolver())); |
88 | 88 | }); |
89 | 89 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function register() |
40 | 40 | { |
41 | - $this->app->singleton('encrypter', function ($app) { |
|
41 | + $this->app->singleton('encrypter', function($app) { |
|
42 | 42 | $config = $app->make('config')->get('security'); |
43 | 43 | |
44 | 44 | return new Encrypter($this->parseKey($config), $config['cipher']); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | protected function key(array $config) |
74 | 74 | { |
75 | - return take($config['key'], function ($key) { |
|
75 | + return take($config['key'], function($key) { |
|
76 | 76 | if (empty($key)) { |
77 | 77 | throw new RuntimeException('No application encryption key has been specified.'); |
78 | 78 | } |
@@ -232,7 +232,7 @@ |
||
232 | 232 | return hash_equals( |
233 | 233 | hash_hmac('sha256', $payload['hmac'], $bytes, true), |
234 | 234 | $calc |
235 | - ); |
|
235 | + ); |
|
236 | 236 | } |
237 | 237 | |
238 | 238 | /** |
@@ -65,7 +65,7 @@ |
||
65 | 65 | if (static::supported($key, $cipher)) { |
66 | 66 | $this->key = $key; |
67 | 67 | $this->cipher = $cipher; |
68 | - } else { |
|
68 | + } else { |
|
69 | 69 | throw new RuntimeException('The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths'); |
70 | 70 | } |
71 | 71 | } |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | $text = ''; |
45 | 45 | |
46 | 46 | $options = \array_merge([ |
47 | - 'leftChar' => '', // e.g ' ', ' * ' |
|
48 | - 'sepChar' => ' ', // e.g ' | ' OUT: key | value |
|
49 | - 'keyStyle' => '', // e.g 'info','comment' |
|
50 | - 'valStyle' => '', // e.g 'info','comment' |
|
47 | + 'leftChar' => '', // e.g ' ', ' * ' |
|
48 | + 'sepChar' => ' ', // e.g ' | ' OUT: key | value |
|
49 | + 'keyStyle' => '', // e.g 'info','comment' |
|
50 | + 'valStyle' => '', // e.g 'info','comment' |
|
51 | 51 | 'keyMinWidth' => 8, |
52 | 52 | 'keyMaxWidth' => 0, |
53 | 53 | 'keyPadPos' => 'right', |
54 | - 'ucFirst' => true, // upper first char for value |
|
54 | + 'ucFirst' => true, // upper first char for value |
|
55 | 55 | ], $options); |
56 | 56 | |
57 | 57 | $keyStyle = \trim($options['keyStyle']); |
@@ -86,10 +86,10 @@ discard block |
||
86 | 86 | $val = \is_scalar($val) ? (string) $val : $val; |
87 | 87 | } |
88 | 88 | |
89 | - $temp .= ( ! \is_numeric($k) ? "$k: " : '') . "$val, "; |
|
89 | + $temp .= ( ! \is_numeric($k) ? "$k: " : '')."$val, "; |
|
90 | 90 | } |
91 | 91 | |
92 | - $value = \rtrim($temp, ' ,') . ']'; |
|
92 | + $value = \rtrim($temp, ' ,').']'; |
|
93 | 93 | } elseif (\is_bool($value)) { |
94 | 94 | $value = $value ? '(True)' : '(False)'; |
95 | 95 | } else { |
@@ -36,15 +36,15 @@ |
||
36 | 36 | * @param |
37 | 37 | */ |
38 | 38 | /** |
39 | - * Returns a well formatted table. |
|
40 | - * |
|
41 | - * @param array $tbody List of rows |
|
42 | - * @param array $thead List of columns |
|
43 | - * |
|
44 | - * @return void |
|
45 | - */ |
|
46 | - public static function table(array $tbody, array $thead = []) |
|
47 | - { |
|
39 | + * Returns a well formatted table. |
|
40 | + * |
|
41 | + * @param array $tbody List of rows |
|
42 | + * @param array $thead List of columns |
|
43 | + * |
|
44 | + * @return void |
|
45 | + */ |
|
46 | + public static function table(array $tbody, array $thead = []) |
|
47 | + { |
|
48 | 48 | |
49 | - } |
|
49 | + } |
|
50 | 50 | } |
51 | 51 | \ No newline at end of file |
@@ -59,7 +59,7 @@ |
||
59 | 59 | 'blink' => 5, |
60 | 60 | 'reverse' => 7, |
61 | 61 | 'conceal' => 8, |
62 | - ]; |
|
62 | + ]; |
|
63 | 63 | |
64 | 64 | /** |
65 | 65 | * Gets the background of CLI command. |
@@ -519,7 +519,7 @@ |
||
519 | 519 | * |
520 | 520 | * @param \Syscodes\Components\Console\Command\Command $command The command name |
521 | 521 | * @param \Syscodes\Components\Contracts\Console\Input\Input $input The input interface implemented |
522 | - * @param \Syscodes\Components\Contracts\Console\Output\Output $output The output interface implemented |
|
522 | + * @param \Syscodes\Components\Contracts\Console\Output\Output $output The output interface implemented |
|
523 | 523 | * |
524 | 524 | * @return int 0 if everything went fine, or an error code |
525 | 525 | */ |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | try { |
282 | 282 | $this->runningCommand = null; |
283 | 283 | $command = $this->findCommand($name); |
284 | - } catch(Throwable $e) { |
|
284 | + } catch (Throwable $e) { |
|
285 | 285 | if ( ! ($e instanceof CommandNotFoundException && ! $e instanceof NamespaceNotFoundException) || 1 !== \count($alternatives = $e->getAlternatives()) || ! $input->isInteractive()) { |
286 | 286 | throw $e; |
287 | 287 | } |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | |
437 | 437 | if ($alternatives = $this->findCommandAlternatives($name, $allCommands)) { |
438 | 438 | // remove hidden commands |
439 | - $alternatives = array_filter($alternatives, function ($name) { |
|
439 | + $alternatives = array_filter($alternatives, function($name) { |
|
440 | 440 | return ! $this->get($name)->isHidden(); |
441 | 441 | }); |
442 | 442 | |
@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | |
583 | 583 | $commands = $this->commands; |
584 | 584 | foreach ($this->commandLoader->getNames() as $name) { |
585 | - if (!isset($commands[$name]) && $this->has($name)) { |
|
585 | + if ( ! isset($commands[$name]) && $this->has($name)) { |
|
586 | 586 | $commands[$name] = $this->get($name); |
587 | 587 | } |
588 | 588 | } |
@@ -754,7 +754,7 @@ discard block |
||
754 | 754 | } |
755 | 755 | } |
756 | 756 | |
757 | - $alternatives = array_filter($alternatives, function ($levenhtein) use ($threshold) { |
|
757 | + $alternatives = array_filter($alternatives, function($levenhtein) use ($threshold) { |
|
758 | 758 | return $levenhtein < 2 * $threshold; |
759 | 759 | }); |
760 | 760 |
@@ -67,14 +67,14 @@ |
||
67 | 67 | ), $options); |
68 | 68 | } |
69 | 69 | |
70 | - /** |
|
71 | - * Describes an InputOption instance. |
|
72 | - * |
|
73 | - * @param \Syscodes\Components\Console\Input\InputOption $option The option implemented |
|
74 | - * @param array $options The options of the console |
|
75 | - * |
|
76 | - * @return void |
|
77 | - */ |
|
70 | + /** |
|
71 | + * Describes an InputOption instance. |
|
72 | + * |
|
73 | + * @param \Syscodes\Components\Console\Input\InputOption $option The option implemented |
|
74 | + * @param array $options The options of the console |
|
75 | + * |
|
76 | + * @return void |
|
77 | + */ |
|
78 | 78 | protected function describeOption(InputOption $option, array $options = []) |
79 | 79 | { |
80 | 80 | if ($option->isAcceptValue() && null !== $option->getDefault() && ( ! is_array($option->getDefault()) || count($option->getDefault()))) { |