Passed
Push — master ( 501bc7...5182d9 )
by Mohammad
03:27 queued 11s
created
src/Commands/Remover.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
         $file = preg_split(' (/|\\\\) ', (string) $this->argument('name')) ?? [];
55 55
 
56
-        if (! $file) {
56
+        if (!$file) {
57 57
             return 'Something wrong with the inputs !';
58 58
         }
59 59
 
@@ -62,25 +62,25 @@  discard block
 block discarded – undo
62 62
         unset($file[count($file) - 1]);
63 63
         $path = implode('\\', $file);
64 64
 
65
-        if (!$this->confirm('This will delete '.$this->repoName.' files and folder, Do you want to continue ?')) {
65
+        if (!$this->confirm('This will delete ' . $this->repoName . ' files and folder, Do you want to continue ?')) {
66 66
             return false;
67 67
         }
68 68
 
69 69
         $model = Str::plural(Config::get('repository.model'));
70 70
         $interface = Str::plural(Config::get('repository.interface'));
71 71
         $repository = Str::plural(Config::get('repository.repository'));
72
-        $controllerFolder =  Config::get('repository.controllers_folder');
72
+        $controllerFolder = Config::get('repository.controllers_folder');
73 73
         $requestFolder = Config::get('repository.requests_folder');
74 74
 
75
-        $this->remove('Entity',$model,$path);
76
-        $this->remove('Controller',$controllerFolder,$path);
77
-        $this->remove('Request',$requestFolder,$path);
78
-        $this->remove('Repository',$repository,$path);
79
-        $this->remove('Interface',$interface,$path);
75
+        $this->remove('Entity', $model, $path);
76
+        $this->remove('Controller', $controllerFolder, $path);
77
+        $this->remove('Request', $requestFolder, $path);
78
+        $this->remove('Repository', $repository, $path);
79
+        $this->remove('Interface', $interface, $path);
80 80
 
81 81
     }
82 82
 
83
-    function remove($type,$folder,$relativePath)
83
+    function remove($type, $folder, $relativePath)
84 84
     {
85 85
 
86 86
         $folder = str_replace('\\', '/', $folder);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
         switch ($type) {
90 90
             case 'Entity':
91
-                $filePath = Config::get('repository.app_path')."/{$folder}/{$relativePath}/";
91
+                $filePath = Config::get('repository.app_path') . "/{$folder}/{$relativePath}/";
92 92
                 $fileName = "{$this->repoName}.php";
93 93
                 break;
94 94
             case 'Controller':
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
                 $filePath = Config::get('repository.app_path') . "/{$folder}/{$relativePath}/";
100 100
                 $fileName = "{$this->repoName}{$type}.php";
101 101
         }
102
-        if(!is_file($filePath.$fileName))
102
+        if (!is_file($filePath . $fileName))
103 103
         {
104
-            $this->warn($filePath.' is not a valid file');
104
+            $this->warn($filePath . ' is not a valid file');
105 105
             return false;
106 106
         }
107 107
 
108
-        unlink($filePath.$fileName);
109
-        if(!(new \FilesystemIterator($filePath))->valid())
108
+        unlink($filePath . $fileName);
109
+        if (!(new \FilesystemIterator($filePath))->valid())
110 110
         {
111 111
             rmdir($filePath);
112 112
         }
Please login to merge, or discard this patch.
src/Commands/Generator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function handle()
63 63
     {
64
-        $file = preg_split(' (/|\\\\) ', (string)$this->argument('name')) ?? [];
64
+        $file = preg_split(' (/|\\\\) ', (string) $this->argument('name')) ?? [];
65 65
 
66
-        if (! $file) {
66
+        if (!$file) {
67 67
             return 'Something wrong with the inputs !';
68 68
         }
69 69
 
@@ -279,9 +279,9 @@  discard block
 block discarded – undo
279 279
                 $content = $filePath . $repoName . '.php';
280 280
         }
281 281
 
282
-        if(is_dir($filePath) && file_exists($content)){
282
+        if (is_dir($filePath) && file_exists($content)) {
283 283
             // Ask to replace exiting file
284
-            if (! $this->confirm("This file, {$content} already exit, do you want to replace?")) {
284
+            if (!$this->confirm("This file, {$content} already exit, do you want to replace?")) {
285 285
                 $this->line('File Not Replaced');
286 286
                 return false;
287 287
             }
Please login to merge, or discard this patch.
src/config/repository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@
 block discarded – undo
6 6
  * Time: 09:58 am.
7 7
  */
8 8
 return [
9
-    'app_path' => realpath(__DIR__.'/../app/'),
9
+    'app_path' => realpath(__DIR__ . '/../app/'),
10 10
     'route_path' => realpath('routes/'),
11 11
     'resources_path' => realpath('resources'),
12
-    'stubs_path' => realpath('resources').'/stubs/',
13
-    'lang_path' => realpath('resources').'/lang/',
12
+    'stubs_path' => realpath('resources') . '/stubs/',
13
+    'lang_path' => realpath('resources') . '/lang/',
14 14
     'config_path' => realpath('config'),
15 15
 
16 16
     //relative to app path
Please login to merge, or discard this patch.