Passed
Push — master ( 6113e5...b6ce23 )
by Reza
14:09
created
src/Commands/MakeAdmin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@
 block discarded – undo
17 17
     public function handle()
18 18
     {
19 19
         $user = $this->argument('user');
20
-        try{
20
+        try {
21 21
             UserProviderFacade::makeAdmin($user);
22 22
             $this->info("User {$user} was converted to an admin");
23
-        } catch (\Exception $exception){
23
+        } catch (\Exception $exception) {
24 24
             $this->error("User {$user} does not exist");
25 25
         }
26 26
     }
Please login to merge, or discard this patch.
src/Http/Middleware/isAdmin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
     public function handle($request, Closure $next)
14 14
     {
15
-        if(AuthFacade::checkIsAdmin(auth()->user()->id)){
15
+        if (AuthFacade::checkIsAdmin(auth()->user()->id)) {
16 16
             return $next($request);
17 17
         }
18 18
 
Please login to merge, or discard this patch.
database/migrations/2020_09_05_99999_create_todos_table.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
     public function up()
15 15
     {
16
-        Schema::create('todos', function (Blueprint $table) {
16
+        Schema::create('todos', function(Blueprint $table) {
17 17
             $table->id();
18 18
             $table->unsignedBigInteger('user_id');
19 19
             $table->string('title');
Please login to merge, or discard this patch.
src/routes.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,20 +4,20 @@
 block discarded – undo
4 4
 
5 5
 Route::view('/', "admin::home")->name('home');
6 6
 
7
-Route::post('/logout', function (){
7
+Route::post('/logout', function() {
8 8
     auth()->logout();
9 9
     return redirect(config('easy_panel.redirect_unauthorized'));
10 10
 })->name('logout');
11 11
 
12
-foreach (config('easy_panel.actions') as $action){
12
+foreach (config('easy_panel.actions') as $action) {
13 13
     $crudConfig = config('easy_panel.crud.'.$action);
14 14
     $name = ucfirst($action);
15 15
     $component = "App\\Http\\Livewire\\Admin\\$name";
16 16
     registerActionRoutes($action, $component, $crudConfig);
17 17
 }
18 18
 
19
-if(config('easy_panel.todo')){
20
-    Route::prefix('todo')->name('todo.')->group(function (){
19
+if (config('easy_panel.todo')) {
20
+    Route::prefix('todo')->name('todo.')->group(function() {
21 21
         Route::get('/', \EasyPanel\Http\Livewire\Todo\Lists::class)->name('lists');
22 22
         Route::get('/create', \EasyPanel\Http\Livewire\Todo\Create::class)->name('create');
23 23
     });
Please login to merge, or discard this patch.
src/Commands/GetAdmins.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     {
19 19
         $admins = UserProviderFacade::getAdmins();
20 20
         $this->warn('Admin Lists :');
21
-        foreach ($admins as $admin){
21
+        foreach ($admins as $admin) {
22 22
             $this->warn("• {$admin->name}: {$admin->email}");
23 23
         }
24 24
     }
Please login to merge, or discard this patch.
src/Commands/DeleteAdmin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     {
19 19
         $user = $this->argument('user');
20 20
 
21
-        if($this->askResult($user)){
21
+        if ($this->askResult($user)) {
22 22
             UserProviderFacade::deleteAdmin($user);
23 23
             $this->info('Admin was removed successfully');
24 24
             return;
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
     public function askResult($user)
31 31
     {
32
-        if($this->option('force')) {
32
+        if ($this->option('force')) {
33 33
             return true;
34 34
         }
35 35
         $result = $this->confirm("Do you want to remove {$user} from administration", 'yes');
Please login to merge, or discard this patch.
src/Commands/DeleteCRUD.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     public function handle()
17 17
     {
18 18
         $names = (array) $this->argument('name') ?: config('easy_panel.actions', []);
19
-        if($names == null) {
19
+        if ($names == null) {
20 20
             throw new CommandNotFoundException("There is no action in config file");
21 21
         }
22 22
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
             if ($this->askResult($name)) {
30 30
                 File::deleteDirectory(resource_path("/views/livewire/admin/$name"));
31
-                File::deleteDirectory(app_path("/Http/Livewire/Admin/" . ucfirst($name)));
31
+                File::deleteDirectory(app_path("/Http/Livewire/Admin/".ucfirst($name)));
32 32
                 $this->info("{$name} files were deleted, make sure you will delete {$name} value from actions in config");
33 33
             } else {
34 34
                 $this->line("process for {$name} action was canceled.");
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
     public function askResult($name)
41 41
     {
42
-        if($this->option('force')) {
42
+        if ($this->option('force')) {
43 43
             return true;
44 44
         }
45 45
         $result = $this->confirm("Do you really want to delete {$name} files ?", true);
Please login to merge, or discard this patch.
src/Http/Livewire/Todo/Single.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public function delete()
33 33
     {
34 34
         $this->todo->delete();
35
-        $this->dispatchBrowserEvent('show-message', ['type' => 'error', 'message' => __('DeletedMessage', ['name' => __('Todo') ] )]);
35
+        $this->dispatchBrowserEvent('show-message', ['type' => 'error', 'message' => __('DeletedMessage', ['name' => __('Todo')])]);
36 36
         $this->emit('todoDeleted');
37 37
     }
38 38
 
Please login to merge, or discard this patch.
src/Http/Livewire/Todo/Create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     {
24 24
         $this->validate();
25 25
         $this->emit('todoCreated');
26
-        $this->dispatchBrowserEvent('show-message', ['type' => 'success', 'message' => __('CreatedMessage', ['name' => __('Todo') ])]);
26
+        $this->dispatchBrowserEvent('show-message', ['type' => 'success', 'message' => __('CreatedMessage', ['name' => __('Todo')])]);
27 27
 
28 28
         Todo::create([
29 29
             'title' => $this->title,
Please login to merge, or discard this patch.