Passed
Push — master ( 2178f0...b67c9a )
by Reza
11:23
created
src/helpers.php 1 patch
Spacing   +9 added lines, -9 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,19 +11,19 @@  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
 
17
-        $crudName=ucfirst($name);
17
+        $crudName = ucfirst($name);
18 18
         $namespace = "\\App\\CRUD\\{$crudName}Component";
19 19
 
20
-        if (!file_exists(app_path("/CRUD/{$crudName}Component.php")) or !class_exists($namespace)){
20
+        if (!file_exists(app_path("/CRUD/{$crudName}Component.php")) or !class_exists($namespace)) {
21 21
             abort(403, "Class with {$namespace} namespace doesn't exist");
22 22
         }
23 23
 
24 24
         $instance = app()->make($namespace);
25 25
 
26
-        if (!$instance instanceof CRUDComponent){
26
+        if (!$instance instanceof CRUDComponent) {
27 27
             abort(403, "{$namespace} should implement CRUDComponent interface");
28 28
         }
29 29
 
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
     }
32 32
 }
33 33
 
34
-if(! function_exists('crud')) {
35
-    function crud($name){
34
+if (!function_exists('crud')) {
35
+    function crud($name) {
36 36
         return \EasyPanel\Models\CRUD::query()->where('name', $name)->first();
37 37
     }
38 38
 }
Please login to merge, or discard this patch.