Passed
Pull Request — master (#28)
by yasin
17:28
created
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/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.
src/Parsers/HTMLInputs/BaseInput.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,12 +28,12 @@  discard block
 block discarded – undo
28 28
         $this->action = $action;
29 29
     }
30 30
 
31
-    public function render(){
31
+    public function render() {
32 32
         $name = $this->name;
33 33
 
34 34
         // Create an instance of input class
35 35
         // then call handle() method to get input as a steing
36
-        if(!is_array($this->type)) {
36
+        if (!is_array($this->type)) {
37 37
             $inputStringClass = static::classMap[$this->type];
38 38
             $input = (new $inputStringClass())->handle($name);
39 39
         } else {
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
         }
45 45
 
46 46
         // render all input element
47
-        if($this->type != 'checkbox') {
47
+        if ($this->type != 'checkbox') {
48 48
             $title = ucfirst($name);
49 49
             $str = "
50 50
             <!-- $title Input -->
51 51
             <div class='form-group'>
52 52
                 <label for='input$name' class='col-sm-2 control-label'> {{ __('$title') }}</label>
53 53
                 $input
54
-                @error('$name') <div class='invalid-feedback'>{{ " . '$message' . " }}</div> @enderror
54
+                @error('$name') <div class='invalid-feedback'>{{ ".'$message'." }}</div> @enderror
55 55
             </div>
56 56
             ";
57 57
             return $str;
Please login to merge, or discard this patch.
src/Parsers/HTMLInputs/Checkbox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
                     <input $mode='$name' class='form-check-input' type='checkbox' id='input$name'>
17 17
                     <label class='form-check-label' for='input$name'>{{ __('$UName') }}</label>
18 18
                 </div>
19
-                @error('$name') <div class='invalid-feedback'>{{ " . '$message' . " }}</div> @enderror
19
+                @error('$name') <div class='invalid-feedback'>{{ ".'$message'." }}</div> @enderror
20 20
             </div>
21 21
             ";
22 22
     }
Please login to merge, or discard this patch.
src/Commands/UserActions/MakeAdmin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,14 +15,14 @@
 block discarded – undo
15 15
     public function handle()
16 16
     {
17 17
         $user = $this->argument('user');
18
-        try{
18
+        try {
19 19
             $status = UserProviderFacade::makeAdmin($user);
20
-            if($status){
20
+            if ($status) {
21 21
                 $this->info("User {$user} was converted to an admin");
22 22
                 return;
23 23
             }
24 24
             $this->warn("It was failed, be sure your column is fillable.");
25
-        } catch (\Exception $exception){
25
+        } catch (\Exception $exception) {
26 26
             $this->error("User {$user} does not exist");
27 27
         }
28 28
     }
Please login to merge, or discard this patch.
src/Commands/UserActions/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/UserActions/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/Http/Middleware/isAdmin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@
 block discarded – undo
10 10
 
11 11
     public function handle($request, Closure $next)
12 12
     {
13
-        if(auth()->guest()){
13
+        if (auth()->guest()) {
14 14
             return redirect(config('easy_panel.redirect_unauthorized'));
15 15
         }
16 16
 
17
-        if(!AuthFacade::checkIsAdmin(auth()->user()->id)){
17
+        if (!AuthFacade::checkIsAdmin(auth()->user()->id)) {
18 18
             return redirect(config('easy_panel.redirect_unauthorized'));
19 19
         }
20 20
 
Please login to merge, or discard this patch.