Passed
Push — master ( f55e75...833504 )
by Reza
19:24 queued 11s
created
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.