@@ -29,15 +29,15 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | class BootRegisterProviders |
| 31 | 31 | { |
| 32 | - /** |
|
| 33 | - * Bootstrap the given application. |
|
| 34 | - * |
|
| 35 | - * @param \Syscodes\Components\Contracts\Core\Application $app |
|
| 36 | - * |
|
| 37 | - * @return void |
|
| 38 | - */ |
|
| 39 | - public function Bootstrap(Application $app) |
|
| 40 | - { |
|
| 41 | - return $app->registerConfiguredProviders(); |
|
| 42 | - } |
|
| 32 | + /** |
|
| 33 | + * Bootstrap the given application. |
|
| 34 | + * |
|
| 35 | + * @param \Syscodes\Components\Contracts\Core\Application $app |
|
| 36 | + * |
|
| 37 | + * @return void |
|
| 38 | + */ |
|
| 39 | + public function Bootstrap(Application $app) |
|
| 40 | + { |
|
| 41 | + return $app->registerConfiguredProviders(); |
|
| 42 | + } |
|
| 43 | 43 | } |
| 44 | 44 | \ No newline at end of file |
@@ -29,15 +29,15 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | class BootProviders |
| 31 | 31 | { |
| 32 | - /** |
|
| 33 | - * Bootstrap the given application. |
|
| 34 | - * |
|
| 35 | - * @param \Syscodes\Components\Contracts\Core\Application $app |
|
| 36 | - * |
|
| 37 | - * @return void |
|
| 38 | - */ |
|
| 39 | - public function Bootstrap(Application $app) |
|
| 40 | - { |
|
| 41 | - return $app->boot(); |
|
| 42 | - } |
|
| 32 | + /** |
|
| 33 | + * Bootstrap the given application. |
|
| 34 | + * |
|
| 35 | + * @param \Syscodes\Components\Contracts\Core\Application $app |
|
| 36 | + * |
|
| 37 | + * @return void |
|
| 38 | + */ |
|
| 39 | + public function Bootstrap(Application $app) |
|
| 40 | + { |
|
| 41 | + return $app->boot(); |
|
| 42 | + } |
|
| 43 | 43 | } |
| 44 | 44 | \ No newline at end of file |
@@ -109,6 +109,6 @@ |
||
| 109 | 109 | Environment::getRepositoryCreator(), |
| 110 | 110 | $app->environmentPath(), |
| 111 | 111 | $app->environmentFile() |
| 112 | - ); |
|
| 112 | + ); |
|
| 113 | 113 | } |
| 114 | 114 | } |
| 115 | 115 | \ No newline at end of file |
@@ -30,24 +30,24 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | class BootConfiguration |
| 32 | 32 | { |
| 33 | - /** |
|
| 34 | - * Bootstrap the given application. |
|
| 35 | - * |
|
| 36 | - * @param \Syscodes\Components\Contracts\Core\Application $app |
|
| 37 | - * |
|
| 38 | - * @return void |
|
| 39 | - */ |
|
| 40 | - public function bootstrap(Application $app) |
|
| 41 | - { |
|
| 42 | - $app->instance('config', $config = new Configure); |
|
| 33 | + /** |
|
| 34 | + * Bootstrap the given application. |
|
| 35 | + * |
|
| 36 | + * @param \Syscodes\Components\Contracts\Core\Application $app |
|
| 37 | + * |
|
| 38 | + * @return void |
|
| 39 | + */ |
|
| 40 | + public function bootstrap(Application $app) |
|
| 41 | + { |
|
| 42 | + $app->instance('config', $config = new Configure); |
|
| 43 | 43 | |
| 44 | - // Finally, we will set the application's environment based on the configuration |
|
| 45 | - // values that were loaded. |
|
| 46 | - $app->detectEnvironment(fn () => $config->get('app.env', 'production')); |
|
| 44 | + // Finally, we will set the application's environment based on the configuration |
|
| 45 | + // values that were loaded. |
|
| 46 | + $app->detectEnvironment(fn () => $config->get('app.env', 'production')); |
|
| 47 | 47 | |
| 48 | - // Set a default timezone if one is defined |
|
| 49 | - date_default_timezone_set($config->get('app.timezone', 'UTC')); |
|
| 48 | + // Set a default timezone if one is defined |
|
| 49 | + date_default_timezone_set($config->get('app.timezone', 'UTC')); |
|
| 50 | 50 | |
| 51 | - mb_internal_encoding('UTF-8'); |
|
| 52 | - } |
|
| 51 | + mb_internal_encoding('UTF-8'); |
|
| 52 | + } |
|
| 53 | 53 | } |
| 54 | 54 | \ No newline at end of file |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public function register() |
| 38 | 38 | { |
| 39 | - $this->app->booted(function () { |
|
| 39 | + $this->app->booted(function() { |
|
| 40 | 40 | $this->app['router']->getRoutes()->refreshNameLookups(); |
| 41 | 41 | $this->app['router']->getRoutes()->refreshActionLookups(); |
| 42 | 42 | }); |
@@ -64,11 +64,11 @@ discard block |
||
| 64 | 64 | protected $commands = []; |
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | - * The event dispatcher instance. |
|
| 68 | - * |
|
| 69 | - * @var \Syscodes\Components\Contracts\Events\Dispatcher $events |
|
| 70 | - */ |
|
| 71 | - protected $events; |
|
| 67 | + * The event dispatcher instance. |
|
| 68 | + * |
|
| 69 | + * @var \Syscodes\Components\Contracts\Events\Dispatcher $events |
|
| 70 | + */ |
|
| 71 | + protected $events; |
|
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | 74 | * The Prime application instance. |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | * Shutdown the application. |
| 153 | 153 | * |
| 154 | 154 | * @param \Syscodes\Components\Contracts\Console\Input\Input $input |
| 155 | - * @param int $status |
|
| 155 | + * @param int $status |
|
| 156 | 156 | * |
| 157 | 157 | * @return void |
| 158 | 158 | */ |
@@ -117,8 +117,8 @@ |
||
| 117 | 117 | public function updateRememberToken(UserContract $user, string $token): void |
| 118 | 118 | { |
| 119 | 119 | $this->connection->table($this->table) |
| 120 | - ->where($user->getAuthIdentifierName(), $user->getAuthIdentifier()) |
|
| 121 | - ->update([$user->getRememberTokenName() => $token]); |
|
| 120 | + ->where($user->getAuthIdentifierName(), $user->getAuthIdentifier()) |
|
| 121 | + ->update([$user->getRememberTokenName() => $token]); |
|
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | /** |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | */ |
| 131 | 131 | public function retrieveByCredentials(array $credentials) |
| 132 | 132 | { |
| 133 | - $credentials = array_filter($credentials, function ($key) { |
|
| 133 | + $credentials = array_filter($credentials, function($key) { |
|
| 134 | 134 | return ! Str::contains($key, 'password'); |
| 135 | 135 | }, ARRAY_FILTER_USE_KEY); |
| 136 | 136 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | * |
| 136 | 136 | * @return static |
| 137 | 137 | */ |
| 138 | - public function define(string $ability, callable|string $callback): static |
|
| 138 | + public function define(string $ability, callable | string $callback): static |
|
| 139 | 139 | { |
| 140 | 140 | if (is_array($callback) && isset($callback[0]) && is_string($callback[0])) { |
| 141 | 141 | $callback = $callback[0].'@'.$callback[1]; |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | */ |
| 188 | 188 | protected function buildAbilityCallback(string $ability, string $callback) |
| 189 | 189 | { |
| 190 | - return function () use ($ability, $callback) { |
|
| 190 | + return function() use ($ability, $callback) { |
|
| 191 | 191 | if (Str::contains($callback, '@')) { |
| 192 | 192 | [$class, $method] = Str::parseCallback($callback); |
| 193 | 193 | } else { |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | */ |
| 484 | 484 | protected function resolvePolicyCallback($user, string $ability, array $arguments): callable |
| 485 | 485 | { |
| 486 | - return function () use ($user, $ability, $arguments) { |
|
| 486 | + return function() use ($user, $ability, $arguments) { |
|
| 487 | 487 | $class = headItem($arguments); |
| 488 | 488 | |
| 489 | 489 | if (method_exists($instance = $this->getPolicyFor($class), 'before')) { |
@@ -440,8 +440,7 @@ |
||
| 440 | 440 | { |
| 441 | 441 | if ($this->firstArgumentToPolicy($arguments)) { |
| 442 | 442 | return $this->resolvePolicyCallback($user, $ability, $arguments); |
| 443 | - } |
|
| 444 | - elseif (isset($this->abilities[$ability])) { |
|
| 443 | + } elseif (isset($this->abilities[$ability])) { |
|
| 445 | 444 | return $this->abilities[$ability]; |
| 446 | 445 | } |
| 447 | 446 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | * @license https://opensource.org/licenses/BSD-3-Clause New BSD license or see https://lenevor.com/license or see /license.md |
| 21 | 21 | */ |
| 22 | 22 | |
| 23 | - namespace Syscodes\Components\Auth\Access\Exceptions; |
|
| 23 | + namespace Syscodes\Components\Auth\Access\Exceptions; |
|
| 24 | 24 | |
| 25 | 25 | use Exception; |
| 26 | 26 | use Throwable; |