Passed
Push — master ( b8999c...a2f941 )
by Curtis
09:12 queued 03:15
created
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.
app/Http/Requests/enso/companies/ValidateCompanyRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,14 +39,14 @@
 block discarded – undo
39 39
     public function withValidator($validator)
40 40
     {
41 41
         if ($this->filled('mandatary') && $this->mandataryIsNotAssociated()) {
42
-            $validator->after(fn ($validator) => $validator->errors()
42
+            $validator->after(fn($validator) => $validator->errors()
43 43
                 ->add('mandatary', __('The selected person is not associated to this company')));
44 44
         }
45 45
     }
46 46
 
47 47
     protected function mandataryIsNotAssociated()
48 48
     {
49
-        return ! $this->route('company')->people()
49
+        return !$this->route('company')->people()
50 50
             ->pluck('id')->contains($this->get('mandatary'));
51 51
     }
52 52
 
Please login to merge, or discard this patch.
app/Http/Response/enso/activity-logs/Timeline.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
     {
17 17
         $this->timeline = $this->timeline($request);
18 18
 
19
-        return $this->days()->map(fn ($day) => [
19
+        return $this->days()->map(fn($day) => [
20 20
             'date' => $day,
21 21
             'entries' => $this->dayEntries($day)
22
-                ->map(fn ($entry) => $this->resource($entry)),
22
+                ->map(fn($entry) => $this->resource($entry)),
23 23
         ]);
24 24
     }
25 25
 
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
     private function dayEntries($day)
52 52
     {
53 53
         return $this->timeline
54
-            ->filter(fn ($entry) => $entry->created_at->format('Y-m-d') === $day)
54
+            ->filter(fn($entry) => $entry->created_at->format('Y-m-d') === $day)
55 55
             ->values();
56 56
     }
57 57
 
58 58
     private function days()
59 59
     {
60 60
         return $this->timeline
61
-            ->map(fn ($entry) => $entry->created_at->format('Y-m-d'))
61
+            ->map(fn($entry) => $entry->created_at->format('Y-m-d'))
62 62
             ->unique()
63 63
             ->values();
64 64
     }
Please login to merge, or discard this patch.
app/Http/Middleware/Multitenant.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         \DB::purge('mysql');
24 24
         \DB::setDefaultConnection('mysql');
25 25
 
26
-        if (! $request->user()) {
26
+        if (!$request->user()) {
27 27
             return $next($request);
28 28
         }
29 29
 
Please login to merge, or discard this patch.
app/Models/enso/howto/Video.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,12 +37,12 @@
 block discarded – undo
37 37
 
38 38
     public function store(UploadedFile $file, array $attributes)
39 39
     {
40
-        if (self::whereHas('file', fn ($query) => $query
40
+        if (self::whereHas('file', fn($query) => $query
41 41
             ->whereOriginalName($file->getClientOriginalName()))->exists()) {
42 42
             throw Exception::exists();
43 43
         }
44 44
 
45
-        return DB::transaction(function () use ($file, $attributes) {
45
+        return DB::transaction(function() use ($file, $attributes) {
46 46
             $video = $this->create($attributes);
47 47
 
48 48
             return tap($video)->upload($file);
Please login to merge, or discard this patch.
app/Models/enso/activity-logs/ActivityLog.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,27 +16,27 @@
 block discarded – undo
16 16
 
17 17
     public function scopeBetween($query, $startDate, $endDate)
18 18
     {
19
-        $query->when($startDate, fn ($query) => $query
20
-            ->where('created_at', '>=', Carbon::parse($startDate)))->when($endDate, fn ($query) => $query
19
+        $query->when($startDate, fn($query) => $query
20
+            ->where('created_at', '>=', Carbon::parse($startDate)))->when($endDate, fn($query) => $query
21 21
             ->where('created_at', '<', Carbon::parse($endDate)));
22 22
     }
23 23
 
24 24
     public function scopeForUsers($query, array $userIds)
25 25
     {
26
-        $query->when(count($userIds) > 0, fn ($query) => $query
26
+        $query->when(count($userIds) > 0, fn($query) => $query
27 27
             ->whereIn('created_by', $userIds));
28 28
     }
29 29
 
30 30
     public function scopeForEvents($query, array $events)
31 31
     {
32
-        $query->when(count($events) > 0, fn ($query) => $query
32
+        $query->when(count($events) > 0, fn($query) => $query
33 33
             ->whereIn('event', $events));
34 34
     }
35 35
 
36 36
     public function scopeForRoles($query, array $roleIds)
37 37
     {
38
-        $query->when(count($roleIds) > 0, fn ($query) => $query
39
-            ->whereHas('createdBy', fn ($query) => $query
38
+        $query->when(count($roleIds) > 0, fn($query) => $query
39
+            ->whereHas('createdBy', fn($query) => $query
40 40
                 ->whereIn('role_id', $roleIds)));
41 41
     }    
42 42
 }
Please login to merge, or discard this patch.