Completed
Push — dev5 ( d7f21a...db7ded )
by Ron
07:58
created
database/migrations/2019_03_02_141422_update_file_links_table.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::table('file_links', function(Blueprint $table)
17
-        {
16
+        Schema::table('file_links', function(Blueprint $table) {
18 17
             $table->integer('cust_id')
19 18
                 ->unsigned()
20 19
                 ->nullable()
@@ -33,8 +32,7 @@  discard block
 block discarded – undo
33 32
      */
34 33
     public function down()
35 34
     {
36
-        Schema::table('file_links', function(Blueprint $table)
37
-        {
35
+        Schema::table('file_links', function(Blueprint $table) {
38 36
             $table->dropForeign(['cust_id']);
39 37
             $table->dropColumn('cust_id');
40 38
             $table->dropColumn('note');
Please login to merge, or discard this patch.
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.
database/factories/UserFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 |
14 14
 */
15 15
 
16
-$factory->define(App\User::class, function (Faker $faker) {
16
+$factory->define(App\User::class, function(Faker $faker) {
17 17
     return [
18 18
 //        'user_id'        => rand(5, 20),
19 19
         'username'       => $faker->unique()->lastName,
Please login to merge, or discard this patch.
database/factories/LinksFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 use Faker\Generator as Faker;
4 4
 
5
-$factory->define(App\FileLinks::class, function (Faker $faker) {
5
+$factory->define(App\FileLinks::class, function(Faker $faker) {
6 6
     return [
7 7
         'user_id'      => 1,
8 8
         'cust_id'      => null,
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/FileLinks/FileLinksController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         {
63 63
             $hash = strtolower(str_random(15));
64 64
             $dup  = FileLinks::where('link_hash', $hash)->get()->count();
65
-        }while($dup != 0);
65
+        } while($dup != 0);
66 66
         
67 67
         //  If the "customer id" field is populated, separate the ID from the name and prepare for insertion.
68 68
         if($request->customer_tag != null)
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.