@@ -20,25 +20,25 @@ |
||
20 | 20 | { |
21 | 21 | public function boot() |
22 | 22 | { |
23 | - $this->app->bind(ValidatePersonStore::class, function () { |
|
23 | + $this->app->bind(ValidatePersonStore::class, function() { |
|
24 | 24 | return new LocalPersonStore(); |
25 | 25 | }); |
26 | - $this->app->bind(ValidatePersonUpdate::class, function () { |
|
26 | + $this->app->bind(ValidatePersonUpdate::class, function() { |
|
27 | 27 | return new LocalPersonUpdate(); |
28 | 28 | }); |
29 | - $this->app->bind(ValidatePersonRequest::class, function () { |
|
29 | + $this->app->bind(ValidatePersonRequest::class, function() { |
|
30 | 30 | return new LocalPersonRequest(); |
31 | 31 | }); |
32 | - $this->app->bind(EnsoPerson::class, function () { |
|
32 | + $this->app->bind(EnsoPerson::class, function() { |
|
33 | 33 | return new LocalPerson(); |
34 | 34 | }); |
35 | - $this->app->bind(Person::class, function () { |
|
35 | + $this->app->bind(Person::class, function() { |
|
36 | 36 | return new LocalPerson(); |
37 | 37 | }); |
38 | - $this->app->bind(PersonTable::class, function () { |
|
38 | + $this->app->bind(PersonTable::class, function() { |
|
39 | 39 | return new LocalPersonTable(); |
40 | 40 | }); |
41 | - $this->app->bind(PersonForm::class, function () { |
|
41 | + $this->app->bind(PersonForm::class, function() { |
|
42 | 42 | return new LocalPersonForm(); |
43 | 43 | }); |
44 | 44 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | public function delete() |
53 | 53 | { |
54 | 54 | if ($this->attachable->file) { |
55 | - DB::transaction(function () { |
|
55 | + DB::transaction(function() { |
|
56 | 56 | Storage::disk($this->disk)->delete($this->attachedFile()); |
57 | 57 | $this->attachable->file->delete(); |
58 | 58 | }); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | |
164 | 164 | private function persistUploadedFile() |
165 | 165 | { |
166 | - DB::transaction(function () { |
|
166 | + DB::transaction(function() { |
|
167 | 167 | $this->attachable->file()->create([ |
168 | 168 | 'original_name' => $this->file->getClientOriginalName(), |
169 | 169 | 'saved_name' => $this->file->hashName(), |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | public function create() |
30 | 30 | { |
31 | - DB::transaction(fn () => $this->findOrCreate() |
|
31 | + DB::transaction(fn() => $this->findOrCreate() |
|
32 | 32 | ->generate() |
33 | 33 | ->attach()); |
34 | 34 |
@@ -54,8 +54,8 @@ |
||
54 | 54 | $authRoutes = new Collection(['login', 'password.email', 'password.reset']); |
55 | 55 | |
56 | 56 | return (new Collection(Route::getRoutes()->getRoutesByName())) |
57 | - ->filter(fn ($route, $name) => $authRoutes->contains($name)) |
|
58 | - ->map(fn ($route) => (new Collection($route)) |
|
57 | + ->filter(fn($route, $name) => $authRoutes->contains($name)) |
|
58 | + ->map(fn($route) => (new Collection($route)) |
|
59 | 59 | ->only(['uri', 'methods']) |
60 | 60 | ->put('domain', $route->domain())); |
61 | 61 | } |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | protected function i18n(): Collection |
69 | 69 | { |
70 | 70 | return $this->languages |
71 | - ->reject(fn ($language) => $language->name === 'en') |
|
72 | - ->mapWithKeys(fn ($language) => [ |
|
71 | + ->reject(fn($language) => $language->name === 'en') |
|
72 | + ->mapWithKeys(fn($language) => [ |
|
73 | 73 | $language->name => $this->lang($language), |
74 | 74 | ]); |
75 | 75 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | protected function rtl(): Collection |
85 | 85 | { |
86 | 86 | return $this->languages |
87 | - ->filter(fn ($lang) => $lang->is_rtl)->pluck('name'); |
|
87 | + ->filter(fn($lang) => $lang->is_rtl)->pluck('name'); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | protected function meta(): array |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | protected function routes(): Collection |
107 | 107 | { |
108 | 108 | return $this->role->permissions |
109 | - ->mapWithKeys(fn ($permission) => [ |
|
109 | + ->mapWithKeys(fn($permission) => [ |
|
110 | 110 | $permission->name => $this->route($permission), |
111 | 111 | ]); |
112 | 112 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | { |
56 | 56 | $user = $this->loggableUser($request); |
57 | 57 | |
58 | - if (! $user) { |
|
58 | + if (!$user) { |
|
59 | 59 | return false; |
60 | 60 | } |
61 | 61 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $user = User::whereEmail($request->input('email'))->first(); |
80 | 80 | $company = $user->company(); |
81 | 81 | $tanent = false; |
82 | - if($company) { |
|
82 | + if ($company) { |
|
83 | 83 | $tanent = true; |
84 | 84 | } |
85 | 85 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | // Tenant::set($company); |
93 | 93 | $value = Connections::Tenant.$company->id; |
94 | 94 | |
95 | - }else{ |
|
95 | + } else { |
|
96 | 96 | // $value = ''; |
97 | 97 | |
98 | 98 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | \Session::put('db', $value); |
107 | 107 | |
108 | - if (! optional($user)->currentPasswordIs($request->input('password'))) { |
|
108 | + if (!optional($user)->currentPasswordIs($request->input('password'))) { |
|
109 | 109 | return; |
110 | 110 | } |
111 | 111 |
@@ -92,7 +92,7 @@ |
||
92 | 92 | // Tenant::set($company); |
93 | 93 | $value = Connections::Tenant.$company->id; |
94 | 94 | |
95 | - }else{ |
|
95 | + } else{ |
|
96 | 96 | // $value = ''; |
97 | 97 | |
98 | 98 | } |
@@ -52,8 +52,8 @@ |
||
52 | 52 | public function scopeVisible($query) |
53 | 53 | { |
54 | 54 | return $query->when( |
55 | - ! Auth::user()->belongsToAdminGroup(), |
|
56 | - fn ($query) => $query->whereId(Auth::user()->group_id) |
|
55 | + !Auth::user()->belongsToAdminGroup(), |
|
56 | + fn($query) => $query->whereId(Auth::user()->group_id) |
|
57 | 57 | ); |
58 | 58 | } |
59 | 59 | } |
@@ -60,7 +60,7 @@ |
||
60 | 60 | |
61 | 61 | public function store(UploadedFile $file) |
62 | 62 | { |
63 | - return DB::transaction(function () use ($file) { |
|
63 | + return DB::transaction(function() use ($file) { |
|
64 | 64 | $this->delete(); |
65 | 65 | $avatar = self::create(['user_id' => Auth::user()->id]); |
66 | 66 |
@@ -56,9 +56,9 @@ |
||
56 | 56 | { |
57 | 57 | $fromAdminGroup = Auth::user()->belongsToAdminGroup(); |
58 | 58 | |
59 | - return $query->when(! $fromAdminGroup, fn ($query) => $query->whereHas( |
|
59 | + return $query->when(!$fromAdminGroup, fn($query) => $query->whereHas( |
|
60 | 60 | 'userGroups', |
61 | - fn ($groups) => $groups->whereId(Auth::user()->group_id) |
|
61 | + fn($groups) => $groups->whereId(Auth::user()->group_id) |
|
62 | 62 | )); |
63 | 63 | } |
64 | 64 |