Test Setup Failed
Branch master (026e19)
by Ron
10:13
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/Providers/MailSettingsServiceProvider.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                
58 58
                
59 59
                
60
-               ]);
60
+                ]);
61 61
         
62 62
         
63 63
         
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/FileLinksController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         {
41 41
             $hash = strtolower(str_random(15));
42 42
             $dup = FileLinks::where('link_hash', $hash)->get()->count();
43
-        }while($dup != 0);
43
+        } while ($dup != 0);
44 44
         
45 45
         //  Create the new file link
46 46
         $link = FileLinks::create([
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
         $linkID = $link->link_id;
54 54
         
55 55
         //  If there are any files, process them
56
-        if(!empty($request->file))
56
+        if (!empty($request->file))
57 57
         {
58 58
             $filePath = config('filesystem.paths.links').DIRECTORY_SEPARATOR.$linkID;
59
-            foreach($request->file as $file)
59
+            foreach ($request->file as $file)
60 60
             {
61 61
                 //  Clean the file and store it
62 62
                 $fileName = Files::cleanFilename($filePath, $file->getClientOriginalName());
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     {
106 106
         $linkData = FileLinks::find($id);
107 107
         
108
-        if(empty($linkData))
108
+        if (empty($linkData))
109 109
         {
110 110
             return view('links.badLink');
111 111
         }
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     //  Get the files for the link
119 119
     public function getFiles($type, $linkID)
120 120
     {
121
-        switch($type)
121
+        switch ($type)
122 122
         {
123 123
             case 'down':
124 124
                 $files = FileLInkFiles::where('link_id', $linkID)
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     public function submitAddFile($id, Request $request)
154 154
     {
155 155
         $filePath = config('filesystems.paths.links').DIRECTORY_SEPARATOR.$id;
156
-        foreach($request->file as $file)
156
+        foreach ($request->file as $file)
157 157
         {
158 158
             //  Clean the file and store it
159 159
             $fileName = Files::cleanFilename($filePath, $file->getClientOriginalName());
@@ -226,9 +226,9 @@  discard block
 block discarded – undo
226 226
     {
227 227
         //  Remove the file from database
228 228
         $data = FileLinkFiles::where('link_id', $id)->get();
229
-        if(!$data->isEmpty())
229
+        if (!$data->isEmpty())
230 230
         {
231
-            foreach($data as $file)
231
+            foreach ($data as $file)
232 232
             {
233 233
                 $fileID = $file->file_id;
234 234
                 $file->delete();
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.