@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | if (App::environment('testing')) { |
56 | 56 | $directory = Config::get('enso.files.testingFolder'); |
57 | 57 | |
58 | - if (! Storage::has($directory)) { |
|
58 | + if (!Storage::has($directory)) { |
|
59 | 59 | Storage::makeDirectory($directory); |
60 | 60 | } |
61 | 61 | |
@@ -102,6 +102,6 @@ discard block |
||
102 | 102 | |
103 | 103 | protected static function bootHasFile() |
104 | 104 | { |
105 | - self::deleting(fn ($model) => (new Files($model))->delete()); |
|
105 | + self::deleting(fn($model) => (new Files($model))->delete()); |
|
106 | 106 | } |
107 | 107 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | { |
10 | 10 | public static function bootHasAvatar() |
11 | 11 | { |
12 | - self::created(fn ($model) => $model->generateAvatar()); |
|
12 | + self::created(fn($model) => $model->generateAvatar()); |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | public function avatar() |
@@ -119,11 +119,11 @@ discard block |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | // add birthyear to person table ( for form builder ) |
122 | - if ($title == 'BIRT' && ! empty($date)) { |
|
122 | + if ($title == 'BIRT' && !empty($date)) { |
|
123 | 123 | $this->birthday = date('Y-m-d', strtotime($date)); |
124 | 124 | } |
125 | 125 | // add deathyear to person table ( for form builder ) |
126 | - if ($title == 'DEAT' && ! empty($date)) { |
|
126 | + if ($title == 'DEAT' && !empty($date)) { |
|
127 | 127 | $this->deathday = date('Y-m-d', strtotime($date)); |
128 | 128 | } |
129 | 129 | $this->save(); |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | |
172 | 172 | public function gender() |
173 | 173 | { |
174 | - if (! $this->title) { |
|
174 | + if (!$this->title) { |
|
175 | 175 | return; |
176 | 176 | } |
177 | 177 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | public function syncCompanies($companyIds, $mainCompanyId) |
191 | 191 | { |
192 | 192 | $pivotIds = (new Collection($companyIds)) |
193 | - ->reduce(fn ($pivot, $value) => $pivot->put($value, [ |
|
193 | + ->reduce(fn($pivot, $value) => $pivot->put($value, [ |
|
194 | 194 | 'is_main' => $value === $mainCompanyId, |
195 | 195 | 'is_mandatary' => false, |
196 | 196 | ]), new Collection()); |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | public function initiateEmailActivationApi(User $user) |
22 | 22 | { |
23 | - if (! config('settings.activation') || ! $this->validateEmail($user)) { |
|
23 | + if (!config('settings.activation') || !$this->validateEmail($user)) { |
|
24 | 24 | return true; |
25 | 25 | } |
26 | 26 |
@@ -162,7 +162,7 @@ |
||
162 | 162 | public function erase(bool $person = false) |
163 | 163 | { |
164 | 164 | if ($person) { |
165 | - return DB::transaction(fn () => tap($this)->delete()->person->delete()); |
|
165 | + return DB::transaction(fn() => tap($this)->delete()->person->delete()); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | return $this->delete(); |
@@ -73,7 +73,7 @@ |
||
73 | 73 | public function updateMandatary(?int $mandataryId) |
74 | 74 | { |
75 | 75 | $pivotIds = $this->people->pluck('id')->reduce( |
76 | - fn ($pivot, $value) => $pivot |
|
76 | + fn($pivot, $value) => $pivot |
|
77 | 77 | ->put($value, ['is_mandatary' => $value === $mandataryId]), |
78 | 78 | new Collection() |
79 | 79 | )->toArray(); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | public function scopeForUser($query, $user) |
52 | 52 | { |
53 | - $query->when(! $user->isAdmin() && ! $user->isSupervisor(), fn ($query) => $query |
|
53 | + $query->when(!$user->isAdmin() && !$user->isSupervisor(), fn($query) => $query |
|
54 | 54 | ->whereCreatedBy($user->id)); |
55 | 55 | } |
56 | 56 | |
@@ -61,16 +61,16 @@ discard block |
||
61 | 61 | |
62 | 62 | public function scopeBetween($query, $interval) |
63 | 63 | { |
64 | - $query->when($interval->min, fn ($query) => $query->where( |
|
64 | + $query->when($interval->min, fn($query) => $query->where( |
|
65 | 65 | 'created_at', '>=', Carbon::parse($interval->min) |
66 | - ))->when($interval->max, fn ($query) => $query->where( |
|
66 | + ))->when($interval->max, fn($query) => $query->where( |
|
67 | 67 | 'created_at', '<=', Carbon::parse($interval->max) |
68 | 68 | )); |
69 | 69 | } |
70 | 70 | |
71 | 71 | public function scopeFilter($query, $search) |
72 | 72 | { |
73 | - return $query->when($search, fn ($query) => $query |
|
73 | + return $query->when($search, fn($query) => $query |
|
74 | 74 | ->where('original_name', 'LIKE', '%'.$search.'%')); |
75 | 75 | } |
76 | 76 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | public function userList() |
28 | 28 | { |
29 | - return $this->users->map(fn ($user) => [ |
|
29 | + return $this->users->map(fn($user) => [ |
|
30 | 30 | 'name' => $user->person->name, |
31 | 31 | 'avatar' => $user->avatar, |
32 | 32 | ]); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | public function updateMembers(array $memberIds) |
36 | 36 | { |
37 | 37 | $synced = $this->users()->sync($memberIds); |
38 | - if (! empty($synced['attached']) || ! empty($synced['detached'])) { |
|
38 | + if (!empty($synced['attached']) || !empty($synced['detached'])) { |
|
39 | 39 | $this->fireModelEvent('updated-members', false); |
40 | 40 | } |
41 | 41 | } |
@@ -26,13 +26,13 @@ discard block |
||
26 | 26 | ); |
27 | 27 | |
28 | 28 | $this->extraLangs() |
29 | - ->each(fn ($locale) => $this->updateDifferences($locale)); |
|
29 | + ->each(fn($locale) => $this->updateDifferences($locale)); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | public function addKey() |
33 | 33 | { |
34 | 34 | $this->extraLangs() |
35 | - ->each(fn ($locale) => $this->processKey($locale)); |
|
35 | + ->each(fn($locale) => $this->processKey($locale)); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | private function processKey($locale) |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | ->keys(); |
62 | 62 | |
63 | 63 | $extraLangFile = (new Collection($extraLangFile)) |
64 | - ->filter(fn ($key) => $keysToRemove->contains($key)); |
|
64 | + ->filter(fn($key) => $keysToRemove->contains($key)); |
|
65 | 65 | |
66 | 66 | return [$keysToRemove->count(), $extraLangFile->toArray()]; |
67 | 67 | } |