Completed
Pull Request — master (#437)
by
unknown
27:29
created
src/stubs/LoginController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function __construct()
49 49
     {
50
-        $this->middleware('guest', ['except' => 'logout']);
50
+        $this->middleware('guest', [ 'except' => 'logout' ]);
51 51
     }
52 52
 
53 53
     /**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         if ($this->username() === 'email') {
72 72
             return $this->attemptLoginAtAuthenticatesUsers($request);
73 73
         }
74
-        if (! $this->attemptLoginAtAuthenticatesUsers($request)) {
74
+        if (!$this->attemptLoginAtAuthenticatesUsers($request)) {
75 75
             return $this->attempLoginUsingUsernameAsAnEmail($request);
76 76
         }
77 77
         return false;
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     protected function attempLoginUsingUsernameAsAnEmail(Request $request)
87 87
     {
88 88
         return $this->guard()->attempt(
89
-            ['email' => $request->input('username'), 'password' => $request->input('password')],
89
+            [ 'email' => $request->input('username'), 'password' => $request->input('password') ],
90 90
             $request->has('remember')
91 91
         );
92 92
     }
Please login to merge, or discard this patch.
src/stubs/RegisterController.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -79,12 +79,12 @@
 block discarded – undo
79 79
     protected function create(array $data)
80 80
     {
81 81
         $fields = [
82
-            'name'     => $data['name'],
83
-            'email'    => $data['email'],
84
-            'password' => bcrypt($data['password']),
82
+            'name'     => $data[ 'name' ],
83
+            'email'    => $data[ 'email' ],
84
+            'password' => bcrypt($data[ 'password' ]),
85 85
         ];
86
-        if (config('auth.providers.users.field', 'email') === 'username' && isset($data['username'])) {
87
-            $fields['username'] = $data['username'];
86
+        if (config('auth.providers.users.field', 'email') === 'username' && isset($data[ 'username' ])) {
87
+            $fields[ 'username' ] = $data[ 'username' ];
88 88
         }
89 89
         return User::create($fields);
90 90
     }
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Http\Controllers\Auth;
4 4
 
5
-use App\Models\User;
6
-use Validator;
7 5
 use App\Http\Controllers\Controller;
6
+use App\Models\User;
8 7
 use Illuminate\Foundation\Auth\RegistersUsers;
8
+use Validator;
9 9
 
10 10
 /**
11 11
  * Class RegisterController
Please login to merge, or discard this patch.
config/menu.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,23 +12,23 @@
 block discarded – undo
12 12
 //        ->url('http://www.google.com', 'Google');
13 13
 //});
14 14
 
15
-Menu::macro('adminlteSubmenu', function ($submenuName) {
16
-    return Menu::new()->prepend('<a href="#"><span> ' . $submenuName . '</span> <i class="fa fa-angle-left pull-right"></i></a>')
15
+Menu::macro('adminlteSubmenu', function($submenuName) {
16
+    return Menu::new()->prepend('<a href="#"><span> '.$submenuName.'</span> <i class="fa fa-angle-left pull-right"></i></a>')
17 17
         ->addParentClass('treeview')->addClass('treeview-menu');
18 18
 });
19
-Menu::macro('adminlteMenu', function () {
19
+Menu::macro('adminlteMenu', function() {
20 20
     return Menu::new()
21 21
         ->addClass('sidebar-menu')->setAttribute('data-widget', 'tree');
22 22
 });
23
-Menu::macro('adminlteSeparator', function ($title) {
23
+Menu::macro('adminlteSeparator', function($title) {
24 24
     return Html::raw($title)->addParentClass('header');
25 25
 });
26 26
 
27
-Menu::macro('adminlteDefaultMenu', function ($content) {
28
-    return Html::raw('<i class="fa fa-link"></i><span>' . $content . '</span>')->html();
27
+Menu::macro('adminlteDefaultMenu', function($content) {
28
+    return Html::raw('<i class="fa fa-link"></i><span>'.$content.'</span>')->html();
29 29
 });
30 30
 
31
-Menu::macro('sidebar', function () {
31
+Menu::macro('sidebar', function() {
32 32
     return Menu::adminlteMenu()
33 33
         ->add(Html::raw('HEADER')->addParentClass('header'))
34 34
         ->action('HomeController@index', '<i class="fa fa-home"></i><span>Home</span>')
Please login to merge, or discard this patch.
src/Console/AdminLTEAdmin.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Acacha\AdminLTETemplateLaravel\Console;
4 4
 
5
-use Illuminate\Console\Command;
6 5
 use App\Models\User;
6
+use Illuminate\Console\Command;
7 7
 
8 8
 /**
9 9
  * Class AdminLTEAdmin.
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
     public function handle()
31 31
     {
32 32
         $this->createAdminUser();
33
-        $this->info('User ' . $this->username() . '(' . $this->email() . ') ' .
34
-            $this->passwordInfo() . ' created succesfully!');
33
+        $this->info('User '.$this->username().'('.$this->email().') '.
34
+            $this->passwordInfo().' created succesfully!');
35 35
         $this->call('make:adminUserSeeder');
36 36
         $this->info('A database seed has been created to permanently add admin user to database.');
37 37
     }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             User::factory()->create([
46 46
                     "name" => env('ADMIN_USER', $this->username()),
47 47
                     "email" => env('ADMIN_EMAIL', $this->email()),
48
-                    "password" => bcrypt(env('ADMIN_PWD', '123456'))]);
48
+                    "password" => bcrypt(env('ADMIN_PWD', '123456')) ]);
49 49
         } catch (\Illuminate\Database\QueryException $exception) {
50 50
         }
51 51
     }
Please login to merge, or discard this patch.
src/Console/stubs/AdminUserSeeder.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use Illuminate\Database\Seeder;
4 3
 use App\Models\User;
4
+use Illuminate\Database\Seeder;
5 5
 
6 6
 /**
7 7
  * Class AdminUserSeeder
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
             User::factory()->create([
20 20
                     "name" => env('ADMIN_USER', "$USER_NAME$"),
21 21
                     "email" => env('ADMIN_EMAIL', "$USER_EMAIL"),
22
-                    "password" => bcrypt(env('ADMIN_PWD', '123456'))]);
22
+                    "password" => bcrypt(env('ADMIN_PWD', '123456')) ]);
23 23
         } catch (\Illuminate\Database\QueryException $exception) {
24 24
         }
25 25
     }
Please login to merge, or discard this patch.
src/Console/MakeAdminUserSeeder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         try {
66 66
             $this->filesystem->overwrite(
67
-                $path = database_path('seeders/' . config('AdminUserSeeder', 'AdminUserSeeder.php')),
67
+                $path = database_path('seeders/'.config('AdminUserSeeder', 'AdminUserSeeder.php')),
68 68
                 $this->compiler->compile(
69 69
                     $this->filesystem->get($this->getStubPath()),
70 70
                     [
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
                     ]
74 74
                 )
75 75
             );
76
-            $this->info('File ' . $path . ' created');
76
+            $this->info('File '.$path.' created');
77 77
         } catch (\Exception $e) {
78 78
             print_r($e->getMessage());
79 79
         }
@@ -86,6 +86,6 @@  discard block
 block discarded – undo
86 86
      */
87 87
     protected function getStubPath()
88 88
     {
89
-        return __DIR__ . '/stubs/AdminUserSeeder.php';
89
+        return __DIR__.'/stubs/AdminUserSeeder.php';
90 90
     }
91 91
 }
Please login to merge, or discard this patch.
src/Providers/AdminLTETemplateServiceProvider.php 2 patches
Unused Use Statements   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,12 +2,12 @@
 block discarded – undo
2 2
 
3 3
 namespace Acacha\AdminLTETemplateLaravel\Providers;
4 4
 
5
-use Illuminate\Routing\Router;
6
-use Illuminate\Support\ServiceProvider;
7
-use Creativeorange\Gravatar\Facades\Gravatar;
8 5
 use Acacha\AdminLTETemplateLaravel\Facades\AdminLTE;
9
-use Creativeorange\Gravatar\GravatarServiceProvider;
10 6
 use Acacha\AdminLTETemplateLaravel\Http\Middleware\GuestUser;
7
+use Creativeorange\Gravatar\Facades\Gravatar;
8
+use Creativeorange\Gravatar\GravatarServiceProvider;
9
+use Illuminate\Routing\Router;
10
+use Illuminate\Support\ServiceProvider;
11 11
 
12 12
 /**
13 13
  * Class AdminLTETemplateServiceProvider.
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -25,25 +25,25 @@  discard block
 block discarded – undo
25 25
         }
26 26
 
27 27
         if ($this->app->runningInConsole()) {
28
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTE::class]);
29
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTEAlt::class]);
30
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTESidebar::class]);
31
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTESidebarAlt::class]);
32
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeAdminUserSeeder::class]);
33
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEAdmin::class]);
34
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEAdminAlt::class]);
35
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeView::class]);
36
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEMenu::class]);
37
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEMenuAlt::class]);
38
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeRoute::class]);
39
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeMenu::class]);
40
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeV::class]);
41
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeVC::class]);
42
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeMVC::class]);
43
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\Username::class]);
28
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTE::class ]);
29
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTEAlt::class ]);
30
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTESidebar::class ]);
31
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTESidebarAlt::class ]);
32
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeAdminUserSeeder::class ]);
33
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\AdminLTEAdmin::class ]);
34
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\AdminLTEAdminAlt::class ]);
35
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeView::class ]);
36
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\AdminLTEMenu::class ]);
37
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\AdminLTEMenuAlt::class ]);
38
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeRoute::class ]);
39
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeMenu::class ]);
40
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeV::class ]);
41
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeVC::class ]);
42
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeMVC::class ]);
43
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\Username::class ]);
44 44
         }
45 45
 
46
-        $this->app->bind('AdminLTE', function () {
46
+        $this->app->bind('AdminLTE', function() {
47 47
             return new \Acacha\AdminLTETemplateLaravel\AdminLTE();
48 48
         });
49 49
 
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
             $this->registerGravatarServiceProvider();
52 52
         }
53 53
 
54
-        if (config('auth.providers.users.field', 'email') === 'username'  &&
54
+        if (config('auth.providers.users.field', 'email') === 'username' &&
55 55
             config('adminlte.add_nullable_username', true)) {
56
-            $this->loadMigrationsFrom(ADMINLTETEMPLATE_PATH .'/database/migrations/username_login');
56
+            $this->loadMigrationsFrom(ADMINLTETEMPLATE_PATH.'/database/migrations/username_login');
57 57
         }
58 58
     }
59 59
 
Please login to merge, or discard this patch.
routes/web.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 block discarded – undo
14 14
 */
15 15
 Auth::routes();
16 16
 
17
-Route::get('/', function () {
17
+Route::get('/', function() {
18 18
     return view('welcome');
19 19
 });
20 20
 
21
-Route::get('/home', [HomeController::class, 'index']);
21
+Route::get('/home', [ HomeController::class, 'index' ]);
22 22
 
23
-Route::group(['middleware' => 'auth'], function () {
23
+Route::group([ 'middleware' => 'auth' ], function() {
24 24
 //    Route::get('/link1', function ()    {
25 25
 //        // Uses Auth Middleware
26 26
 //    });
Please login to merge, or discard this patch.