Completed
Push — dev5 ( 7dd80f...0663e2 )
by Ron
12:19
created
database/migrations/2018_12_06_124820_add_password_change_to_users.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function up()
17 17
     {
18
-        Schema::table('users', function(Blueprint $table)
19
-        {
18
+        Schema::table('users', function(Blueprint $table) {
20 19
             $table->timestamp('password_expires')
21 20
                 ->nullable()
22 21
                 ->after('active');
@@ -41,8 +40,7 @@  discard block
 block discarded – undo
41 40
      */
42 41
     public function down()
43 42
     {
44
-        Schema::table('users', function(Blueprint $table)
45
-        {
43
+        Schema::table('users', function(Blueprint $table) {
46 44
             $table->dropColumn('password_expires');
47 45
         });
48 46
         
Please login to merge, or discard this patch.
app/Http/Controllers/FileLinks/UserLinksController.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 
61 61
     //  Upload new file
62 62
     public function update(Request $request, $id)
63
-    {        
63
+    {
64 64
         $request->validate(['name' => 'required', 'file' => 'required']);
65 65
             
66 66
         $details = FileLinks::where('link_hash', $id)->first();
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/UserController.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         
138 138
         $nextChange = config('users.passExpires') != null ? Carbon::now()->addDays(config('users.passExpires')) : null;
139 139
         
140
-         //  Update the password
140
+            //  Update the password
141 141
         User::find($userData->user_id)->update(
142 142
         [
143 143
             'password'         => bcrypt($request->newPass),
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         
270 270
         $nextChange = isset($request->force_change) && $request->force_change == 'on' ? Carbon::now()->subDay() : null;
271 271
         
272
-         //  Update the user data
272
+            //  Update the user data
273 273
         User::find($id)->update(
274 274
         [
275 275
             'password'         => bcrypt($request->password),
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $roleArr = [];
40 40
         foreach($roles as $role)
41 41
         {
42
-            if($role->role_id == 1 && !Auth::user()->hasAnyRole(['installer'])) 
42
+            if($role->role_id == 1 && !Auth::user()->hasAnyRole(['installer']))
43 43
             {
44 44
             
45 45
                 continue;
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     
115 115
     //  Submit the initialize user form
116 116
     public function submitInitializeUser(Request $request, $hash)
117
-    {   
117
+    {
118 118
         //  Verify that the link matches the assigned email address
119 119
         $valid = UserInitialize::where('token', $hash)->first();
120 120
         if(empty($valid))
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         $roleArr = [];
192 192
         foreach($roles as $role)
193 193
         {
194
-            if($role->role_id == 1 && !Auth::user()->hasAnyRole(['installer'])) 
194
+            if($role->role_id == 1 && !Auth::user()->hasAnyRole(['installer']))
195 195
             {
196 196
                 continue;
197 197
             }
Please login to merge, or discard this patch.
app/Http/Middleware/RedirectIfAuthenticated.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function handle($request, Closure $next, $guard = null)
19 19
     {
20
-        if (Auth::guard($guard)->check()) {
20
+        if(Auth::guard($guard)->check()) {
21 21
             return redirect('/dashboard');
22 22
         }
23 23
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,8 @@
 block discarded – undo
17 17
      */
18 18
     public function handle($request, Closure $next, $guard = null)
19 19
     {
20
-        if (Auth::guard($guard)->check()) {
20
+        if (Auth::guard($guard)->check())
21
+        {
21 22
             return redirect('/dashboard');
22 23
         }
23 24
 
Please login to merge, or discard this patch.
app/Http/Middleware/CheckPasswordExpire.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     {
21 21
         $user = $request->user();
22 22
         
23
-        if($user->password_expires != NULL)
23
+        if($user->password_expires != null)
24 24
         {
25 25
             $passExp = new Carbon(($user->password_expires));
26 26
 
Please login to merge, or discard this patch.
app/Http/Middleware/CheckRole.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
         $actions = $request->route()->getAction();
21 21
         $roles   = isset($actions['roles']) ? $actions['roles'] : null;
22 22
         
23
-        if($request->user()->hasAnyRole($roles)  || !$roles)
23
+        if($request->user()->hasAnyRole($roles) || !$roles)
24 24
         {
25 25
             return $next($request);
26 26
         }
Please login to merge, or discard this patch.
app/Http/Middleware/Authenticate.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     protected function redirectTo($request)
16 16
     {
17
-        if (! $request->expectsJson()) {
17
+        if(!$request->expectsJson()) {
18 18
             return route('login');
19 19
         }
20 20
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,8 @@
 block discarded – undo
14 14
      */
15 15
     protected function redirectTo($request)
16 16
     {
17
-        if (! $request->expectsJson()) {
17
+        if (! $request->expectsJson())
18
+        {
18 19
             return route('login');
19 20
         }
20 21
     }
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
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             $extension = isset($fileParts['extension']) ? ('.'.$fileParts['extension']) : '';
39 39
             
40 40
             //  check for matching file names
41
-            if (preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match)) 
41
+            if(preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match)) 
42 42
             {
43 43
                 // Have a number; increment it
44 44
                 $base = $match[1];
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             do 
55 55
             {
56 56
                 $fileName = $base.'('.++$number.')'.$extension;
57
-            } while (Storage::exists($path.DIRECTORY_SEPARATOR.$fileName));
57
+            } while(Storage::exists($path.DIRECTORY_SEPARATOR.$fileName));
58 58
         }
59 59
         
60 60
         return $fileName;
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,20 +38,20 @@
 block discarded – undo
38 38
             $extension = isset($fileParts['extension']) ? ('.'.$fileParts['extension']) : '';
39 39
             
40 40
             //  check for matching file names
41
-            if (preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match)) 
41
+            if (preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match))
42 42
             {
43 43
                 // Have a number; increment it
44 44
                 $base = $match[1];
45 45
                 $number = intVal($match[2]);
46
-            } 
47
-            else 
46
+            }
47
+            else
48 48
             {
49 49
                 // No number; add one
50 50
                 $base = $fileParts['filename'];
51 51
                 $number = 0;
52 52
             }
53 53
             
54
-            do 
54
+            do
55 55
             {
56 56
                 $fileName = $base.'('.++$number.')'.$extension;
57 57
             } while (Storage::exists($path.DIRECTORY_SEPARATOR.$fileName));
Please login to merge, or discard this patch.
app/Notifications/NewFileUpload.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
             ->action('Click to View Link', 
33 33
                 url(route('links.details', 
34 34
                 [
35
-                     'id' => $this->details->link_id, 
36
-                     'name' => urlencode($this->details->link_name)
35
+                        'id' => $this->details->link_id, 
36
+                        'name' => urlencode($this->details->link_name)
37 37
                 ])));
38 38
     }
39 39
 
@@ -44,10 +44,10 @@  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.details', 
47
-                         [
47
+                            [
48 48
                             'id' => $this->details->link_id, 
49
-                             'name' => urlencode($this->details->link_name)
50
-                         ]))
49
+                                'name' => urlencode($this->details->link_name)
50
+                            ]))
51 51
         ];
52 52
     }
53 53
 }
Please login to merge, or discard this patch.