@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function compose(View $view): void |
35 | 35 | { |
36 | - $extensions = (array) config('arcanesoft.foundation.system.checks.php-extensions');; |
|
36 | + $extensions = (array) config('arcanesoft.foundation.system.checks.php-extensions'); ; |
|
37 | 37 | |
38 | 38 | $view->with('requiredPhpExtensions', static::getRequiredExtensions($extensions)); |
39 | 39 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | protected static function getRequiredExtensions(array $extensions): array |
66 | 66 | { |
67 | - return array_map(function ($extension) { |
|
67 | + return array_map(function($extension) { |
|
68 | 68 | return extension_loaded($extension); |
69 | 69 | }, array_combine($extensions, $extensions)); |
70 | 70 | } |
@@ -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(); |
@@ -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 |
@@ -61,12 +61,12 @@ |
||
61 | 61 | */ |
62 | 62 | private function registerBladeComponents(): void |
63 | 63 | { |
64 | - $this->callAfterResolving(BladeCompiler::class, function (BladeCompiler $blade, $app) { |
|
64 | + $this->callAfterResolving(BladeCompiler::class, function(BladeCompiler $blade, $app) { |
|
65 | 65 | $prefix = $app['config']->get('arcanesoft.foundation.view.prefix', ''); |
66 | 66 | $components = $app['config']->get('arcanesoft.foundation.view.components', []); |
67 | 67 | |
68 | 68 | $blade->components( |
69 | - Collection::make($components)->mapWithKeys(function ($component, $key) use ($prefix) { |
|
69 | + Collection::make($components)->mapWithKeys(function($component, $key) use ($prefix) { |
|
70 | 70 | return ["{$prefix}{$key}" => $component]; |
71 | 71 | })->toArray() |
72 | 72 | ); |
@@ -34,7 +34,7 @@ |
||
34 | 34 | public function calculate(Request $request, RolesRepository $repo) |
35 | 35 | { |
36 | 36 | // Calculate roles with users count |
37 | - $result = $repo->withCount(['administrators'])->get()->filter(function ($role) { |
|
37 | + $result = $repo->withCount(['administrators'])->get()->filter(function($role) { |
|
38 | 38 | return $role->administrators_count > 0; |
39 | 39 | })->pluck('administrators_count', 'name'); |
40 | 40 |
@@ -111,7 +111,7 @@ |
||
111 | 111 | 'password' => null, |
112 | 112 | ]; |
113 | 113 | |
114 | - return tap($this->getUsersRepository()->createOne($attributes), function ($user) { |
|
114 | + return tap($this->getUsersRepository()->createOne($attributes), function($user) { |
|
115 | 115 | event(new UserRegistered($user)); |
116 | 116 | }); |
117 | 117 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function onlyTrashed(bool $condition = true) |
76 | 76 | { |
77 | - return $this->when($condition, function (Builder $query) { |
|
77 | + return $this->when($condition, function(Builder $query) { |
|
78 | 78 | return $query->onlyTrashed(); |
79 | 79 | }); |
80 | 80 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $attributes['password'] = Str::random(8); |
112 | 112 | } |
113 | 113 | |
114 | - return tap($this->model()->fill($attributes), function (User $user) use ($attributes) { |
|
114 | + return tap($this->model()->fill($attributes), function(User $user) use ($attributes) { |
|
115 | 115 | $user->forceFill([ |
116 | 116 | 'uuid' => $attributes['uuid'] ?? Str::uuid(), |
117 | 117 | 'activated_at' => $attributes['activated_at'] ?? now(), // TODO: Add a setting to change this |