Passed
Pull Request — master (#65)
by Ron
12:10
created
app/Mail/NewLinkFile.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,4 +36,4 @@
 block discarded – undo
36 36
         return $this->subject('New File Uploaded')->markdown('email.newLinkFile');
37 37
     }
38 38
 }
39
- 
40 39
\ No newline at end of file
40
+    
41 41
\ No newline at end of file
Please login to merge, or discard this patch.
app/Files.php 2 patches
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.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@  discard block
 block discarded – undo
43 43
                 // Have a number; increment it
44 44
                 $base = $match[1];
45 45
                 $number = intVal($match[2]);
46
-            } 
47
-            else 
46
+            } else 
48 47
             {
49 48
                 // No number; add one
50 49
                 $base = $fileParts['filename'];
@@ -71,8 +70,7 @@  discard block
 block discarded – undo
71 70
             Storage::delete($fileLink);
72 71
             
73 72
             Log::info('File Deleted', ['file_id' => $fileID, 'file_name' => $fileLink, 'user_id' => Auth::user()->user_id]);
74
-        }
75
-        catch(Exception $e)
73
+        } catch(Exception $e)
76 74
         {
77 75
             return false;
78 76
         }
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/Providers/RouteServiceProvider.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     protected function mapWebRoutes()
53 53
     {
54 54
         Route::middleware('web')
55
-             ->namespace($this->namespace)
56
-             ->group(base_path('routes/web.php'));
55
+                ->namespace($this->namespace)
56
+                ->group(base_path('routes/web.php'));
57 57
     }
58 58
 
59 59
     /**
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
     protected function mapApiRoutes()
67 67
     {
68 68
         Route::prefix('api')
69
-             ->middleware('api')
70
-             ->namespace($this->namespace)
71
-             ->group(base_path('routes/api.php'));
69
+                ->middleware('api')
70
+                ->namespace($this->namespace)
71
+                ->group(base_path('routes/api.php'));
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
app/Navbar.php 2 patches
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.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@
 block discarded – undo
27 27
                 $navBarSys[$item->sys_id]['category'] = $item->category;
28 28
                 $navBarSys[$item->sys_id]['name'] = $item->sys_name;
29 29
                 $navBarSys[$item->sys_id]['url'] = '/system/'.$item->category.'/'.urlencode($item->sys_name);
30
-            }
31
-            else
30
+            } else
32 31
             {
33 32
                 $navBarSub[$item->sys_id]['category'] = $item->category;
34 33
                 $navBarSub[$item->sys_id]['parent'] = $item->parent_id;
Please login to merge, or discard this patch.
app/User.php 2 patches
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.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,8 +82,7 @@
 block discarded – undo
82 82
                     return true;
83 83
                 }
84 84
             }
85
-        }
86
-        else
85
+        } else
87 86
         {
88 87
             if($this->hasRole($roles))
89 88
             {
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 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
                 ->with('CustomerSystems.SystemTypes')
53 53
                 ->whereHas('CustomerSystems', function($q) use($request)
54 54
                 {
55
-                   $q->where('sys_id', $request->system);
55
+                    $q->where('sys_id', $request->system);
56 56
                 })
57 57
                 ->get();
58 58
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
                    $q->where('sys_id', $request->system);
56 56
                 })
57 57
                 ->get();
58
-        }
59
-        else
58
+        } else
60 59
         {
61 60
             $customerData = Customers::where('name', 'like', '%'.$request->customer.'%')
62 61
                 ->where('city', 'like', '%'.$request->city.'%')
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
             ->get();
30 30
         
31 31
         $sysArr = [];
32
-        foreach($systems as $sys)
32
+        foreach ($systems as $sys)
33 33
         {
34
-            foreach($sys->SystemTypes as $s)
34
+            foreach ($sys->SystemTypes as $s)
35 35
             {
36 36
                 $sysArr[$sys->name][$s->sys_id] = $s->name;
37 37
             }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     public function search(Request $request)
47 47
     {
48 48
         //  Run different request based on if system field is filled out or not
49
-        if(!empty($request->system))
49
+        if (!empty($request->system))
50 50
         {
51 51
             $customerData = Customers::where('name', 'like', '%'.$request->customer.'%')
52 52
                 ->where('city', 'like', '%'.$request->city.'%')
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     {
77 77
         $cust = Customers::find($id);
78 78
         
79
-        if($cust === null)
79
+        if ($cust === null)
80 80
         {
81 81
             return 'false';
82 82
         }
Please login to merge, or discard this patch.