Passed
Pull Request — master (#1353)
by
unknown
07:19
created
app/Service/enso/localisation/Storer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
     public function create()
22 22
     {
23
-        return DB::transaction(function () {
23
+        return DB::transaction(function() {
24 24
             $language = (new Language())
25 25
                 ->storeWithFlagSufix($this->request, $this->flagSuffix);
26 26
 
Please login to merge, or discard this patch.
app/Service/enso/menus/TreeBuilder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
     private function build(?int $parentId = null): Collection
25 25
     {
26 26
         return $this->menus
27
-            ->filter(fn ($menu) => $menu->parent_id === $parentId)
28
-            ->reduce(fn ($tree, $menu) => $tree
27
+            ->filter(fn($menu) => $menu->parent_id === $parentId)
28
+            ->reduce(fn($tree, $menu) => $tree
29 29
                 ->push($this->withChildren($menu)), new Collection());
30 30
     }
31 31
 
@@ -63,14 +63,14 @@  discard block
 block discarded – undo
63 63
 
64 64
     private function filter(): self
65 65
     {
66
-        $this->menus = $this->menus->filter(fn ($menu) => $this->allowed($menu));
66
+        $this->menus = $this->menus->filter(fn($menu) => $this->allowed($menu));
67 67
 
68 68
         return $this;
69 69
     }
70 70
 
71 71
     private function map(): self
72 72
     {
73
-        $this->menus = $this->menus->map(fn ($menu) => $this->computeIcon($menu));
73
+        $this->menus = $this->menus->map(fn($menu) => $this->computeIcon($menu));
74 74
 
75 75
         return $this;
76 76
     }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     private function someChildrenAllowed($parent): bool
94 94
     {
95 95
         return $this->menus->some(
96
-            fn ($child) => $child->parent_id === $parent->id && $this->allowed($child)
96
+            fn($child) => $child->parent_id === $parent->id && $this->allowed($child)
97 97
         );
98 98
     }
99 99
 }
Please login to merge, or discard this patch.
app/Service/enso/menus/Organizer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
     private function organize(Obj $menus): void
23 23
     {
24
-        $menus->each(fn ($menu, $index) => $this->reorder($menu, $index));
24
+        $menus->each(fn($menu, $index) => $this->reorder($menu, $index));
25 25
     }
26 26
 
27 27
     private function reorder(Obj $menu, int $index): void
Please login to merge, or discard this patch.
app/Service/enso/files/UploadManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
     public function handle(): Collection
25 25
     {
26
-        DB::transaction(function () {
26
+        DB::transaction(function() {
27 27
             $this->checkExisting()
28 28
                 ->uploadFiles();
29 29
         });
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     private function checkExisting(): self
35 35
     {
36 36
         $existing = $this->files
37
-            ->map(fn ($file) => $file->getClientOriginalName())
37
+            ->map(fn($file) => $file->getClientOriginalName())
38 38
             ->intersect($this->existingFiles());
39 39
 
40 40
         if ($existing->isNotEmpty()) {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
     private function uploadFiles(): void
48 48
     {
49
-        $this->files->each(fn ($file) => $this->uploadFile($file));
49
+        $this->files->each(fn($file) => $this->uploadFile($file));
50 50
     }
51 51
 
52 52
     private function uploadFile($file): void
Please login to merge, or discard this patch.
app/Http/Controllers/enso/localisation/Json/AddKey.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     public function __invoke(ValidateKeyRequest $request, Language $language)
13 13
     {
14 14
         $keys = (new Collection($request->get('keys')))
15
-            ->mapWithKeys(fn ($key) => [$key => null])
15
+            ->mapWithKeys(fn($key) => [$key => null])
16 16
             ->toArray();
17 17
 
18 18
         (new Updater($language, $keys))->addKey();
Please login to merge, or discard this patch.
app/Http/Controllers/enso/localisation/Json/Index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function __invoke()
10 10
     {
11
-        return Language::extra()->get()->map(fn ($locale) => [
11
+        return Language::extra()->get()->map(fn($locale) => [
12 12
             'id' => $locale->id,
13 13
             'name' => $locale->display_name,
14 14
         ]);
Please login to merge, or discard this patch.
app/Tables/Builders/enso/dataimport/DataImportTable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@
 block discarded – undo
18 18
             data_imports.successful, data_imports.failed, data_imports.created_at,
19 19
             TIME(data_imports.created_at) as time, people.name as createdBy,
20 20
             rejected_imports.id as rejectedId, {$this->rawDuration()} as duration
21
-        ")->join('files', fn ($join) => $join
21
+        ")->join('files', fn($join) => $join
22 22
             ->on('files.attachable_id', 'data_imports.id')
23 23
             ->where('files.attachable_type', DataImport::morphMapKey()))
24 24
             ->join('users', 'files.created_by', '=', 'users.id')
25 25
             ->join('people', 'users.person_id', '=', 'people.id')
26 26
             ->leftJoin('rejected_imports', 'data_imports.id', '=', 'rejected_imports.data_import_id')
27
-            ->leftJoin('files as rejected_files', fn ($join) => $join
27
+            ->leftJoin('files as rejected_files', fn($join) => $join
28 28
                 ->on('rejected_files.attachable_id', 'rejected_imports.id')
29 29
                 ->where('rejected_files.attachable_type', RejectedImport::morphMapKey()));
30 30
     }
Please login to merge, or discard this patch.
app/Http/Requests/enso/roles/ValidateRoleRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     public function withValidator($validator)
27 27
     {
28 28
         if ($this->chosenParentMenu()) {
29
-            $validator->after(fn ($validator) => $validator->errors()
29
+            $validator->after(fn($validator) => $validator->errors()
30 30
                 ->add('menu_id', 'Parent menus cannot be set as role defaults'));
31 31
         }
32 32
     }
Please login to merge, or discard this patch.
app/Http/Requests/enso/companies/ValidatePersonStore.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     public function withValidator($validator)
10 10
     {
11 11
         if ($this->personExists()) {
12
-            $validator->after(fn ($validator) => $validator->errors()
12
+            $validator->after(fn($validator) => $validator->errors()
13 13
                 ->add('id', __('The selected person is already associated to this company')));
14 14
         }
15 15
     }
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     private function personExists()
18 18
     {
19 19
         return Person::whereId($this->get('id'))
20
-            ->whereHas('companies', fn ($companies) => $companies
20
+            ->whereHas('companies', fn($companies) => $companies
21 21
                 ->whereId($this->get('company_id')))->exists();
22 22
     }
23 23
 }
Please login to merge, or discard this patch.