Passed
Push — master ( f55e75...833504 )
by Reza
19:24 queued 11s
created
src/Concerns/Translatable.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 addText($text, $key = null)
14 14
     {
15
-        if (array_key_exists($key, $this->texts)){
15
+        if (array_key_exists($key, $this->texts)) {
16 16
             return;
17 17
         }
18 18
 
Please login to merge, or discard this patch.
src/Services/LangService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     {
12 12
         $files = collect(static::getFiles());
13 13
 
14
-        return $files->mapWithKeys(function ($file, $key){
14
+        return $files->mapWithKeys(function($file, $key) {
15 15
             preg_match('/(\w+)_panel\.json/i', $file, $m);
16 16
             $key = "$m[1]_panel";
17 17
             $value = Str::upper($m[1]);
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         foreach (static::getFiles() as $file) {
25 25
             $decodedFile = json_decode(File::get($file), 1);
26 26
             foreach ($texts as $key => $text) {
27
-                if (array_key_exists($key, $decodedFile)){
27
+                if (array_key_exists($key, $decodedFile)) {
28 28
                     unset($texts[$text]);
29 29
                 }
30 30
             }
Please login to merge, or discard this patch.
src/Parsers/HTMLInputs/MultiSelect.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 block discarded – undo
14 14
 
15 15
         [$class, $method] = $array;
16 16
 
17
-        if (! class_exists($class)){
17
+        if (!class_exists($class)) {
18 18
             throw new Exception("Class {$class} doesn't exist.");
19 19
         }
20 20
 
21 21
         $method = $method ?: 'handle';
22 22
 
23
-        if (! method_exists($class, $method)){
23
+        if (!method_exists($class, $method)) {
24 24
             throw new Exception("Method {$method} doesn't exist on {$class} class.");
25 25
         }
26 26
 
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
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     {
16 16
         $user = $this->argument('user');
17 17
 
18
-        if($this->askResult($user)){
18
+        if ($this->askResult($user)) {
19 19
             UserProviderFacade::deleteAdmin($user);
20 20
             $this->info('Admin was removed successfully');
21 21
             return;
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function askResult($user)
28 28
     {
29
-        if($this->option('force')) {
29
+        if ($this->option('force')) {
30 30
             return true;
31 31
         }
32 32
 
Please login to merge, or discard this patch.
src/helpers.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@  discard block
 block discarded – undo
2 2
 
3 3
 use EasyPanel\Contracts\CRUDComponent;
4 4
 
5
-if(! function_exists('getRouteName')) {
6
-    function getRouteName(){
5
+if (!function_exists('getRouteName')) {
6
+    function getRouteName() {
7 7
         $routeName = config('easy_panel.route_prefix');
8 8
         $routeName = trim($routeName, '/');
9 9
         $routeName = str_replace('/', '.', $routeName);
@@ -11,17 +11,17 @@  discard block
 block discarded – undo
11 11
     }
12 12
 }
13 13
 
14
-if(! function_exists('getCrudConfig')) {
15
-    function getCrudConfig($name){
14
+if (!function_exists('getCrudConfig')) {
15
+    function getCrudConfig($name) {
16 16
         $namespace = "\\App\\CRUD\\{$name}Component";
17 17
 
18
-        if (!file_exists(app_path("/CRUD/{$name}Component.php")) or !class_exists($namespace)){
18
+        if (!file_exists(app_path("/CRUD/{$name}Component.php")) or !class_exists($namespace)) {
19 19
             abort(403, "Class with {$namespace} namespace doesn't exist");
20 20
         }
21 21
 
22 22
         $instance = app()->make($namespace);
23 23
 
24
-        if (!$instance instanceof CRUDComponent){
24
+        if (!$instance instanceof CRUDComponent) {
25 25
             abort(403, "{$namespace} should implement CRUDComponent interface");
26 26
         }
27 27
 
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
     }
30 30
 }
31 31
 
32
-if(! function_exists('crud')) {
33
-    function crud($name){
32
+if (!function_exists('crud')) {
33
+    function crud($name) {
34 34
         return \EasyPanel\Models\CRUD::query()->where('name', $name)->first();
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
src/Http/Livewire/CRUD/Single.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         ]);
25 25
 
26 26
         $this->crud->delete();
27
-        $this->dispatchBrowserEvent('show-message', ['type' => 'error', 'message' => __('DeletedMessage', ['name' => __('CRUD') ] )]);
27
+        $this->dispatchBrowserEvent('show-message', ['type' => 'error', 'message' => __('DeletedMessage', ['name' => __('CRUD')])]);
28 28
         $this->emit('crudUpdated');
29 29
     }
30 30
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             'built' => true
40 40
         ]);
41 41
 
42
-        $this->dispatchBrowserEvent('show-message', ['type' => 'success', 'message' => __('CRUD Created successfully') ] );
42
+        $this->dispatchBrowserEvent('show-message', ['type' => 'success', 'message' => __('CRUD Created successfully')]);
43 43
         $this->emit('crudUpdated');
44 44
     }
45 45
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             'active' => false
50 50
         ]);
51 51
 
52
-        $this->dispatchBrowserEvent('show-message', ['type' => 'success', 'message' => __('CRUD was inactivated') ] );
52
+        $this->dispatchBrowserEvent('show-message', ['type' => 'success', 'message' => __('CRUD was inactivated')]);
53 53
         $this->emit('crudUpdated');
54 54
     }
55 55
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             'active' => true
60 60
         ]);
61 61
 
62
-        $this->dispatchBrowserEvent('show-message', ['type' => 'success', 'message' => __('CRUD was activated') ] );
62
+        $this->dispatchBrowserEvent('show-message', ['type' => 'success', 'message' => __('CRUD was activated')]);
63 63
         $this->emit('crudUpdated');
64 64
     }
65 65
 
Please login to merge, or discard this patch.