Passed
Push — dev5a ( 915c64...c2cba2 )
by Ron
07:58
created
app/Domains/Customers/GetCustomerNotes.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@
 block discarded – undo
24 24
     protected function getNotes($custID, $shared = false)
25 25
     {
26 26
         return CustomerNotes::where('cust_id', $custID)
27
-            ->when($shared, function($q)
28
-            {
27
+            ->when($shared, function($q) {
29 28
                 $q->where('shared', 1);
30 29
             })
31 30
             ->orderBy('urgent', 'DESC')
Please login to merge, or discard this patch.
app/Domains/Customers/CustomerSearch.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -76,32 +76,26 @@
 block discarded – undo
76 76
     {
77 77
         return Customers::orderBy($sort->sortField, $sort->sortType)
78 78
             //  Search equipment field
79
-            ->when(isset($searchData->equipment), function($q) use ($searchData)
80
-            {
81
-                $q->whereHas('ParentSystems.SystemTypes', function($qry) use ($searchData)
82
-                {
79
+            ->when(isset($searchData->equipment), function($q) use ($searchData) {
80
+                $q->whereHas('ParentSystems.SystemTypes', function($qry) use ($searchData) {
83 81
                     $qry->where('sys_id', $searchData->equipment);
84 82
                 })
85
-                ->orWhereHas('CustomerSystems.SystemTypes', function($qry) use ($searchData)
86
-                {
83
+                ->orWhereHas('CustomerSystems.SystemTypes', function($qry) use ($searchData) {
87 84
                     $qry->where('sys_id', $searchData->equipment);
88 85
                 });
89 86
             })
90 87
             //  Search city field
91
-            ->when(isset($searchData->city), function($q) use ($searchData)
92
-            {
88
+            ->when(isset($searchData->city), function($q) use ($searchData) {
93 89
                 $q->where('city', 'like', '%'.$searchData->city.'%');
94 90
             })
95 91
             //  Search name field
96
-            ->when(isset($searchData->name), function($q) use ($searchData)
97
-            {
92
+            ->when(isset($searchData->name), function($q) use ($searchData) {
98 93
                 $q->where('name', 'like', '%'.$searchData->name.'%')
99 94
                     ->orWhere('cust_id', 'like', '%'.$searchData->name.'%')
100 95
                     ->orWhere('dba_name', 'like', '%'.$searchData->name.'%');
101 96
             })
102 97
             //  Search by equipment type
103
-            ->when($includeSystems, function($q)
104
-            {
98
+            ->when($includeSystems, function($q) {
105 99
                 $q->with('CustomerSystems.SystemTypes')
106 100
                     ->with('ParentSystems.SystemTypes');
107 101
             })
Please login to merge, or discard this patch.
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.
app/Domains/TechTips/SetTechTips.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,8 +121,7 @@
 block discarded – undo
121 121
     protected function sendNotification($tip, $edit = false)
122 122
     {
123 123
         // $details = TechTips::find($tipID);
124
-        $users = User::whereHas('UserSettings', function($q)
125
-        {
124
+        $users = User::whereHas('UserSettings', function($q) {
126 125
             $q->where('em_tech_tip', true);
127 126
         })->get();
128 127
 
Please login to merge, or discard this patch.