Passed
Push — dev5a ( 2c238c...96dd50 )
by Ron
07:38
created
app/Domains/TechTips/SearchTips.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@  discard block
 block discarded – undo
49 49
         return TechTips::orderBy('sticky', 'DESC')
50 50
             ->orderBy('created_at', 'DESC')
51 51
             //  Search text fields
52
-            ->when(!empty($searchText), function($q) use ($searchText)
53
-            {
52
+            ->when(!empty($searchText), function($q) use ($searchText) {
54 53
                 foreach($searchText as $text)
55 54
                 {
56 55
                     $q->orWhere('subject', 'like', '%'.$text.'%')
@@ -59,15 +58,12 @@  discard block
 block discarded – undo
59 58
                 }
60 59
             })
61 60
             //  Search Article Type fields
62
-            ->when($type, function($q) use ($type)
63
-            {
61
+            ->when($type, function($q) use ($type) {
64 62
                 $q->whereIn('tip_type_id', $type);
65 63
             })
66 64
             //  Search equipment type fields
67
-            ->when($sys, function($q) use ($sys)
68
-            {
69
-                $q->whereHas('SystemTypes', function($q2) use ($sys)
70
-                {
65
+            ->when($sys, function($q) use ($sys) {
66
+                $q->whereHas('SystemTypes', function($q2) use ($sys) {
71 67
                     $q2->whereIn('system_types.sys_id', $sys);
72 68
                 });
73 69
             })
Please login to merge, or discard this patch.