Passed
Push — master ( 206fd0...8f6d9b )
by Paul
04:13
created
src/Services/UrlService.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,26 +25,26 @@
 block discarded – undo
25 25
 
26 26
         $query = Url::query();
27 27
 
28
-        $query->when($user->cant('viewAny', Url::class), function ($query) use ($user) {
28
+        $query->when($user->cant('viewAny', Url::class), function($query) use ($user) {
29 29
             return $query->where('user_id', $user->id);
30 30
         });
31 31
 
32
-        $query->when($userId, function ($query) use ($userId) {
32
+        $query->when($userId, function($query) use ($userId) {
33 33
             return $query->where('user_id', $userId);
34 34
         });
35 35
 
36
-        $query->when($search, function ($query) use ($search) {
37
-            return $query->where(function (Builder $query) use ($search) {
36
+        $query->when($search, function($query) use ($search) {
37
+            return $query->where(function(Builder $query) use ($search) {
38 38
                 return $query->where('path', 'LIKE', "%{$search}%")
39 39
                     ->orWhere('long_url', 'LIKE', "%{$search}%");
40 40
             });
41 41
         });
42 42
 
43
-        $query->when($startDate && $endDate, function ($query) use ($startDate, $endDate) {
43
+        $query->when($startDate && $endDate, function($query) use ($startDate, $endDate) {
44 44
             return $query->whereBetween('created_at', [$startDate, $endDate]);
45 45
         });
46 46
 
47
-        $query->when(isset($active), function ($query) use ($active) {
47
+        $query->when(isset($active), function($query) use ($active) {
48 48
             return $query->where('active', $active);
49 49
         });
50 50
 
Please login to merge, or discard this patch.