@@ -68,7 +68,7 @@ |
||
| 68 | 68 | */ |
| 69 | 69 | protected static function getFoldersPermissions(array $folders): array |
| 70 | 70 | { |
| 71 | - return array_map(function ($folder) { |
|
| 71 | + return array_map(function($folder) { |
|
| 72 | 72 | $path = base_path($folder); |
| 73 | 73 | |
| 74 | 74 | return [ |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | */ |
| 55 | 55 | private static function calculateEntriesByLevel(LogViewer $logViewer): array |
| 56 | 56 | { |
| 57 | - return $logViewer->all()->reduce(function ($count, Log $log) { |
|
| 57 | + return $logViewer->all()->reduce(function($count, Log $log) { |
|
| 58 | 58 | foreach ($log->entries()->groupBy('level') as $level => $entries) { |
| 59 | 59 | /** @var \Arcanedev\LogViewer\Entities\LogEntryCollection $entries */ |
| 60 | 60 | $count[$level] = ($count[$level] ?? 0) + $entries->count(); |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | public function up(): void |
| 42 | 42 | { |
| 43 | - $this->createSchema(function (Blueprint $table) { |
|
| 43 | + $this->createSchema(function(Blueprint $table) { |
|
| 44 | 44 | $table->id(); |
| 45 | 45 | $table->morphs('two_factorable'); |
| 46 | 46 | $table->text('secret')->nullable(); |
@@ -96,8 +96,8 @@ |
||
| 96 | 96 | 'two_factors' => 'two_factors', |
| 97 | 97 | ], |
| 98 | 98 | |
| 99 | - // Models |
|
| 100 | - // ---------------------------------- |
|
| 99 | + // Models |
|
| 100 | + // ---------------------------------- |
|
| 101 | 101 | |
| 102 | 102 | 'models' => [ |
| 103 | 103 | 'user' => App\Models\User::class, |
@@ -56,11 +56,13 @@ discard block |
||
| 56 | 56 | { |
| 57 | 57 | $user = $request->user(); |
| 58 | 58 | |
| 59 | - if (is_null($user)) |
|
| 60 | - return false; |
|
| 59 | + if (is_null($user)) { |
|
| 60 | + return false; |
|
| 61 | + } |
|
| 61 | 62 | |
| 62 | - if ( ! $user instanceof MustVerifyEmail) |
|
| 63 | - return false; |
|
| 63 | + if ( ! $user instanceof MustVerifyEmail) { |
|
| 64 | + return false; |
|
| 65 | + } |
|
| 64 | 66 | |
| 65 | 67 | return ! $user->hasVerifiedEmail(); |
| 66 | 68 | } |
@@ -75,8 +77,9 @@ discard block |
||
| 75 | 77 | */ |
| 76 | 78 | protected function getMustBeVerifiedResponse(Request $request, string $redirectToRoute) |
| 77 | 79 | { |
| 78 | - if ($request->expectsJson()) |
|
| 79 | - abort(Response::HTTP_FORBIDDEN, 'Your email address is not verified.'); |
|
| 80 | + if ($request->expectsJson()) { |
|
| 81 | + abort(Response::HTTP_FORBIDDEN, 'Your email address is not verified.'); |
|
| 82 | + } |
|
| 80 | 83 | |
| 81 | 84 | return redirect()->route($redirectToRoute); |
| 82 | 85 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | protected function moduleGroup(Closure $callback) |
| 28 | 28 | { |
| 29 | 29 | $this->prefix('system') |
| 30 | - ->name('system.') |
|
| 31 | - ->group($callback); |
|
| 30 | + ->name('system.') |
|
| 31 | + ->group($callback); |
|
| 32 | 32 | } |
| 33 | 33 | } |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | */ |
| 59 | 59 | public function compose(View $view): void |
| 60 | 60 | { |
| 61 | - $metrics = $this->manager->makeSelected()->filter(function ($metric) { |
|
| 61 | + $metrics = $this->manager->makeSelected()->filter(function($metric) { |
|
| 62 | 62 | return $metric->authorizedToSee(request()); |
| 63 | 63 | }); |
| 64 | 64 | |
@@ -206,17 +206,21 @@ |
||
| 206 | 206 | */ |
| 207 | 207 | public function passes($attribute, $value): bool |
| 208 | 208 | { |
| 209 | - if ($this->requireUppercase && Str::lower($value) === $value) |
|
| 210 | - return $this->fail('The :attribute must contain at least one uppercase character.'); |
|
| 209 | + if ($this->requireUppercase && Str::lower($value) === $value) { |
|
| 210 | + return $this->fail('The :attribute must contain at least one uppercase character.'); |
|
| 211 | + } |
|
| 211 | 212 | |
| 212 | - if ($this->requireNumeric && ! preg_match('/[0-9]/', $value)) |
|
| 213 | - return $this->fail('The :attribute must contain at least one number.'); |
|
| 213 | + if ($this->requireNumeric && ! preg_match('/[0-9]/', $value)) { |
|
| 214 | + return $this->fail('The :attribute must contain at least one number.'); |
|
| 215 | + } |
|
| 214 | 216 | |
| 215 | - if ($this->requireSpecialCharacter && ! preg_match('/[\W_]/', $value)) |
|
| 216 | - return $this->fail('The :attribute must contain at least one special character.'); |
|
| 217 | + if ($this->requireSpecialCharacter && ! preg_match('/[\W_]/', $value)) { |
|
| 218 | + return $this->fail('The :attribute must contain at least one special character.'); |
|
| 219 | + } |
|
| 217 | 220 | |
| 218 | - if (Str::length($value) < $this->length) |
|
| 219 | - return $this->fail("The :attribute must be at least {$this->length} characters."); |
|
| 221 | + if (Str::length($value) < $this->length) { |
|
| 222 | + return $this->fail("The :attribute must be at least {$this->length} characters."); |
|
| 223 | + } |
|
| 220 | 224 | |
| 221 | 225 | return true; |
| 222 | 226 | } |
@@ -33,8 +33,9 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function __construct(string $label = null) |
| 35 | 35 | { |
| 36 | - if ( ! empty($label)) |
|
| 37 | - $this->label = __($label); |
|
| 36 | + if ( ! empty($label)) { |
|
| 37 | + $this->label = __($label); |
|
| 38 | + } |
|
| 38 | 39 | } |
| 39 | 40 | |
| 40 | 41 | /* ----------------------------------------------------------------- |