Passed
Push — master ( 659a40...2f299a )
by Ron
02:05 queued 10s
created
app/Files.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $fileName = str_replace(' ', '_', $fileName);
33 33
         
34
-        if(Storage::exists($path.DIRECTORY_SEPARATOR.$fileName))
34
+        if (Storage::exists($path.DIRECTORY_SEPARATOR.$fileName))
35 35
         {
36 36
             
37 37
             $fileParts = pathinfo($fileName);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             
73 73
             Log::info('File Deleted', ['file_id' => $fileID, 'file_name' => $fileLink, 'user_id' => Auth::user()->user_id]);
74 74
         }
75
-        catch(Exception $e)
75
+        catch (Exception $e)
76 76
         {
77 77
             return false;
78 78
         }
Please login to merge, or discard this patch.
app/Providers/SettingsServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@
 block discarded – undo
26 26
      */
27 27
     public function register()
28 28
     {
29
-        if(Schema::hasTable('settings'))
29
+        if (Schema::hasTable('settings'))
30 30
         {
31 31
             $settings = DB::table('settings')->get();
32
-            foreach($settings as $setting)
32
+            foreach ($settings as $setting)
33 33
             {
34 34
                 Config([$setting->key => $setting->value]);
35 35
             }
Please login to merge, or discard this patch.
app/Navbar.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@
 block discarded – undo
16 16
         $navBarSys = [];
17 17
         $navBarSub = [];
18 18
         
19
-        foreach($navItems as $item)
19
+        foreach ($navItems as $item)
20 20
         {
21
-            if(!in_array($item->category, $navBarCat))
21
+            if (!in_array($item->category, $navBarCat))
22 22
             {
23 23
                 $navBarCat[] = $item->category;
24 24
             }
25
-            if(empty($item->parent_id))
25
+            if (empty($item->parent_id))
26 26
             {
27 27
                 $navBarSys[$item->sys_id]['category'] = $item->category;
28 28
                 $navBarSys[$item->sys_id]['name'] = $item->sys_name;
Please login to merge, or discard this patch.
app/User.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
     
74 74
     public function hasAnyRole($roles)
75 75
     {
76
-        if(is_array($roles))
76
+        if (is_array($roles))
77 77
         {
78
-            foreach($roles as $role)
78
+            foreach ($roles as $role)
79 79
             {
80
-                if($this->hasRole($role))
80
+                if ($this->hasRole($role))
81 81
                 {
82 82
                     return true;
83 83
                 }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         }
86 86
         else
87 87
         {
88
-            if($this->hasRole($roles))
88
+            if ($this->hasRole($roles))
89 89
             {
90 90
                 return true;
91 91
             }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     
97 97
     public function hasRole($role)
98 98
     {
99
-        if($this->roles()->where('name', $role)->first())
99
+        if ($this->roles()->where('name', $role)->first())
100 100
         {
101 101
             return true;
102 102
         }
Please login to merge, or discard this patch.
app/Http/Controllers/AccountController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,13 +73,13 @@
 block discarded – undo
73 73
     public function submitPassword(Request $request)
74 74
     {
75 75
         //  Make sure that the old password is valid
76
-        if(!(Hash::check($request->oldPass, Auth::user()->password)))
76
+        if (!(Hash::check($request->oldPass, Auth::user()->password)))
77 77
         {
78 78
             return redirect()->back()->with('error', 'Your Current Password is not valid.  Please try again.');
79 79
         }
80 80
         
81 81
         //  Make sure that the new password is not the same as the old password
82
-        if(strcmp($request->newPass, $request->oldPass) == 0)
82
+        if (strcmp($request->newPass, $request->oldPass) == 0)
83 83
         {
84 84
             return redirect()->back()->with('error', 'New Password cannot be the same as the old password');
85 85
         }
Please login to merge, or discard this patch.
app/Http/Controllers/DownloadController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     {
21 21
         $fileData = Files::where('file_id', $fileID)->where('file_name', $fileName)->first();
22 22
         //  Check that the file exists before allowing it to be downloaded
23
-        if(!empty($fileData) && Storage::exists($fileData->file_link.$fileData->file_name))
23
+        if (!empty($fileData) && Storage::exists($fileData->file_link.$fileData->file_name))
24 24
         {
25 25
             Log::info('File Downloaded', ['file_id' => $fileID]);
26 26
             return Storage::download($fileData->file_link.$fileData->file_name);
Please login to merge, or discard this patch.
app/Http/Controllers/CustomerController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
             ->get();
28 28
         
29 29
         $sysArr = [];
30
-        foreach($systems as $sys)
30
+        foreach ($systems as $sys)
31 31
         {
32
-            foreach($sys->SystemTypes as $s)
32
+            foreach ($sys->SystemTypes as $s)
33 33
             {
34 34
                 $sysArr[$sys->name][$s->sys_id] = $s->name;
35 35
             }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     public function search(Request $request)
45 45
     {
46 46
         //  Run different request based on if system field is filled out or not
47
-        if(!empty($request->system))
47
+        if (!empty($request->system))
48 48
         {
49 49
             $customerData = Customers::where('name', 'like', '%'.$request->customer.'%')
50 50
                 ->where('city', 'like', '%'.$request->city.'%')
Please login to merge, or discard this patch.
app/Http/Controllers/CustomerSystemsController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
             ->get();
28 28
         
29 29
         $sysArr = [];
30
-        foreach($systems as $sys)
30
+        foreach ($systems as $sys)
31 31
         {
32
-            foreach($sys->SystemTypes as $s)
32
+            foreach ($sys->SystemTypes as $s)
33 33
             {
34 34
                 $sysArr[$sys->name][$s->sys_id] = $s->name;
35 35
             }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         ]);
53 53
         $newSysID = $newSys->cust_sys_id;
54 54
         
55
-        foreach($request->field as $key => $field)
55
+        foreach ($request->field as $key => $field)
56 56
         {
57 57
             $fieldID = SystemCustDataFields::where('data_type_id', $key)->where('sys_id', $request->sysType)->first()->field_id;
58 58
             
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $custSystems = CustomerSystems::where('cust_id', $id)->get();
83 83
 
84
-        switch($custSystems->count())
84
+        switch ($custSystems->count())
85 85
         {
86 86
             case 0:
87 87
                 return view('customer.system_none');
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             default:
104 104
                 $systemData = [];
105 105
 
106
-                foreach($custSystems as $sys)
106
+                foreach ($custSystems as $sys)
107 107
                 {
108 108
                     $custSysID = $sys->cust_sys_id;
109 109
                     $sysName   = SystemTypes::find($sys->sys_id)->name;
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         $custSys = CustomerSystems::find($id);
144 144
         $sysID   = $custSys->sys_id;
145 145
         
146
-        foreach($request->field as $key => $field)
146
+        foreach ($request->field as $key => $field)
147 147
         {
148 148
             $fieldID = SystemCustDataFields::where('data_type_id', $key)->where('sys_id', $sysID)->first()->field_id;
149 149
             
Please login to merge, or discard this patch.
app/Http/Controllers/CustomerContactsController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $numberTypes = PhoneNumberType::all();
27 27
         
28 28
         $numTypes = [];
29
-        foreach($numberTypes as $type)
29
+        foreach ($numberTypes as $type)
30 30
         {
31 31
             $numTypes[$type->phone_type_id] = $type->description;
32 32
         }
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
         
50 50
         $contID = $cont->cont_id;
51 51
         
52
-        if(!empty(array_filter($request['phoneNumber'])))
52
+        if (!empty(array_filter($request['phoneNumber'])))
53 53
         {
54 54
             $num = count($request['phoneNumber']);
55
-            for($i=0; $i < $num; $i++)
55
+            for ($i = 0; $i<$num; $i++)
56 56
             {
57
-                if(!empty($request['phoneNumber'][$i]))
57
+                if (!empty($request['phoneNumber'][$i]))
58 58
                 {
59 59
                     CustomerContactPhones::create([
60 60
                         'cont_id' => $contID,
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $numberTypes = PhoneNumberType::all();
88 88
         
89 89
         $numTypes = [];
90
-        foreach($numberTypes as $type)
90
+        foreach ($numberTypes as $type)
91 91
         {
92 92
             $numTypes[$type->phone_type_id] = $type->description;
93 93
         }
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
         
114 114
         //  Clear all contact phone numbers and re-enter them
115 115
         CustomerContactPhones::where('cont_id', $id)->delete();
116
-        if(!empty(array_filter($request['phoneNumber'])))
116
+        if (!empty(array_filter($request['phoneNumber'])))
117 117
         {
118 118
             $num = count($request['phoneNumber']);
119
-            for($i=0; $i < $num; $i++)
119
+            for ($i = 0; $i<$num; $i++)
120 120
             {
121 121
                 CustomerContactPhones::create([
122 122
                     'cont_id'       => $id,
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
         $vcard->addEmail($contact->email);
159 159
         $vcard->addAddress(null, null, $custData->address, $custData->city, $custData->state, $custData->zip, null);
160 160
         
161
-        if(!empty($numbers))
161
+        if (!empty($numbers))
162 162
         {
163
-            foreach($numbers as $phone)
163
+            foreach ($numbers as $phone)
164 164
             {
165 165
                 $vcard->addPhoneNumber($phone->phone_number, $phone->description);
166 166
             }
Please login to merge, or discard this patch.