Passed
Push — master ( 659a40...2f299a )
by Ron
02:05 queued 10s
created
app/Http/Middleware/CheckRole.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     //  Check and verify that the user has permission to visit the request page
12 12
     public function handle($request, Closure $next)
13 13
     {
14
-        if($request->user() === null)
14
+        if ($request->user() === null)
15 15
         {
16 16
             Log::alert($request->route().' denied for Guest');
17 17
             return response()->view('errors.401', [], 401);
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         $actions = $request->route()->getAction();
20 20
         $roles = isset($actions['roles']) ? $actions['roles'] : null;
21 21
         
22
-        if($request->user()->hasAnyRole($roles)  || !$roles)
22
+        if ($request->user()->hasAnyRole($roles) || !$roles)
23 23
         {
24 24
             return $next($request);
25 25
         }
Please login to merge, or discard this patch.
app/Notifications/NewFileUploaded.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
         return (new MailMessage)
32 32
                     ->line('A new file has been uploaded to the file link - '.$this->details->link_name)
33 33
                     ->action('Click to View Link', 
34
-                             url(route('links.info', [
35
-                                 'id' => $this->details->link_id, 
36
-                                 'name' => urlencode($this->details->link_name)
34
+                                url(route('links.info', [
35
+                                    'id' => $this->details->link_id, 
36
+                                    'name' => urlencode($this->details->link_name)
37 37
                             ])));
38 38
     }
39 39
 
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
             'type'    => 'warning',
45 45
             'message' => 'New File Uploaded to link - '.$this->details->link_name,
46 46
             'link'    => url(route('links.info', [
47
-                                 'id' => $this->details->link_id, 
48
-                                 'name' => urlencode($this->details->link_name)
47
+                                    'id' => $this->details->link_id, 
48
+                                    'name' => urlencode($this->details->link_name)
49 49
                             ]))
50 50
         ];
51 51
     }
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('filesystems.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
         }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     public function getFiles($type, $linkID)
120 120
     {
121 121
         $files = null;
122
-        switch($type)
122
+        switch ($type)
123 123
         {
124 124
             case 'down':
125 125
                 $files = FileLInkFiles::where('link_id', $linkID)
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     public function submitAddFile($id, Request $request)
155 155
     {
156 156
         $filePath = config('filesystems.paths.links').DIRECTORY_SEPARATOR.$id;
157
-        foreach($request->file as $file)
157
+        foreach ($request->file as $file)
158 158
         {
159 159
             //  Clean the file and store it
160 160
             $fileName = Files::cleanFilename($filePath, $file->getClientOriginalName());
@@ -230,9 +230,9 @@  discard block
 block discarded – undo
230 230
     {
231 231
         //  Remove the file from database
232 232
         $data = FileLinkFiles::where('link_id', $id)->get();
233
-        if(!$data->isEmpty())
233
+        if (!$data->isEmpty())
234 234
         {
235
-            foreach($data as $file)
235
+            foreach ($data as $file)
236 236
             {
237 237
                 $fileID = $file->file_id;
238 238
                 $file->delete();
Please login to merge, or discard this patch.