Passed
Push — master ( 3d846f...9c2979 )
by Curtis
06:50
created
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/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.
app/Service/Tenant.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 
40 40
     private static function tenantPrefix()
41 41
     {
42
-        if (! isset(self::$tenantPrefix)) {
42
+        if (!isset(self::$tenantPrefix)) {
43 43
             self::$tenantPrefix = self::tenantDatabase();
44 44
         }
45 45
 
Please login to merge, or discard this patch.
app/Jobs/ImportGedcom.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $slug = $this->slug;
51 51
         $user_id = $this->user_id;
52 52
         $status = 'queue';
53
-        if($this->conn == 'tenant') {
53
+        if ($this->conn == 'tenant') {
54 54
             $key = 'database.connections.tenant.database';
55 55
             $value = $this->db;
56 56
             config([$key => $value]);
Please login to merge, or discard this patch.
app/Traits/ConnectionTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 
7 7
 trait ConnectionTrait
8 8
 {
9
-    public function setConnection($conn='mysql', $db='enso')
9
+    public function setConnection($conn = 'mysql', $db = 'enso')
10 10
     {
11 11
         \Session::put('conn', $conn);
12 12
         \Session::put('db', $db);
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     {
17 17
         $conn = \Session::get('conn');
18 18
         $db = \Session::get('db');
19
-        if($conn == 'tenant') {
19
+        if ($conn == 'tenant') {
20 20
             $key = 'database.connections.tenant.database';
21 21
             $value = $db;
22 22
             config([$key => $value]);
Please login to merge, or discard this patch.
app/Tables/Builders/PersonTable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
     public function query(): Builder
17 17
     {
18
-        $conn =  $this->getConnection();
18
+        $conn = $this->getConnection();
19 19
         return Person::selectRaw('
20 20
             people.id, people.title, people.givn, people.surn,  people.appellative, people.email, people.phone,
21 21
             people.birthday, CASE WHEN users.id is null THEN 0 ELSE 1 END as "user",
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         ')->leftJoin('users', 'people.id', '=', 'users.person_id')
24 24
             ->leftJoin(
25 25
                 'company_person',
26
-                fn ($join) => $join
26
+                fn($join) => $join
27 27
                     ->on('people.id', '=', 'company_person.person_id')
28 28
                     ->where('company_person.is_main', true)
29 29
             )->leftJoin('companies', 'company_person.company_id', 'companies.id');
Please login to merge, or discard this patch.
app/Http/Controllers/Dashboard/ChartController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
         } else {
121 121
             $this->setConnection('mysql');
122 122
         }
123
-        $conn =  $this->getConnection();
123
+        $conn = $this->getConnection();
124 124
         return $conn;
125 125
     }
126 126
 }
Please login to merge, or discard this patch.
app/Http/Middleware/Multitenant.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@
 block discarded – undo
20 20
     {
21 21
         $conn = \Session::get('conn');
22 22
         $value = \Session::get('db');
23
-        if($conn === 'tenant') {
23
+        if ($conn === 'tenant') {
24 24
             $key = 'database.connections.tenant.database';
25 25
             config([$key => $value]);
26 26
             config(['database.default'=>'tenant']);
27
-        }else {
27
+        } else {
28 28
             config(['database.default'=>'mysql']);
29 29
         }
30 30
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
             $key = 'database.connections.tenant.database';
25 25
             config([$key => $value]);
26 26
             config(['database.default'=>'tenant']);
27
-        }else {
27
+        } else {
28 28
             config(['database.default'=>'mysql']);
29 29
         }
30 30
 
Please login to merge, or discard this patch.