Passed
Push — master ( e84f2b...628701 )
by Paul
05:19
created
src/Http/Controllers/RedirectController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
         $url = Url::whereRaw('lower(path) = (?)', [$path])->where(['active' => 1])->first();
17 17
 
18
-        if (! $url) {
18
+        if (!$url) {
19 19
             return redirect('/');
20 20
         }
21 21
 
Please login to merge, or discard this patch.
src/Http/Controllers/PreviewController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     {
12 12
         $url = URL::select(['long_url', 'path', 'created_at'])->where(['path' => $path, 'active' => 1])->first();
13 13
         
14
-        if (! $url) {
14
+        if (!$url) {
15 15
             return redirect('/');
16 16
         }
17 17
                 
Please login to merge, or discard this patch.
src/Services/UrlService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         $search = $request->search;
30 30
         $date = $request->date;
31 31
         $limit = $request->limit ?? 30;
32
-        $active =$request->active;
32
+        $active = $request->active;
33 33
         $sortBy = $request->sort_by ?? 'created_at';
34 34
         $sortDirection = $request->sort_direction ?? 'desc';
35 35
                 
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
         }
41 41
 
42 42
         if ($search) {
43
-            $query->where(function (Builder $query) use ($search) {
43
+            $query->where(function(Builder $query) use ($search) {
44 44
                 $query->where('path', 'LIKE', "%{$search}%")
45 45
                     ->orWhere('long_url', 'LIKE', "%{$search}%")
46
-                    ->orWhereHas('user', function ($query) use ($search) {
46
+                    ->orWhereHas('user', function($query) use ($search) {
47 47
                         $query->where('name', 'LIKE', "%{$search}%")
48 48
                             ->orWhere('email', 'LIKE', "%{$search}%");
49 49
                     });
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             $query->whereBetween('created_at', $date);
55 55
         }
56 56
         
57
-        if(isset($active)) {
57
+        if (isset($active)) {
58 58
             $query->where('active', $active);
59 59
         }
60 60
         
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         
115 115
         $url = Url::where('id', $id)->firstOrFail();
116 116
 
117
-        if($url->path != $request->path) {
117
+        if ($url->path != $request->path) {
118 118
             $this->validatePath($request->path);
119 119
         }
120 120
         
Please login to merge, or discard this patch.