Completed
Pull Request — master (#1766)
by Solomon
06:34
created
src/Commands/Publish/PublishMigrationCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $module = $this->getModuleModel($name);
28 28
 
29
-        $this->components->task("Publishing Migration <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) {
29
+        $this->components->task("Publishing Migration <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) {
30 30
             with(new MigrationPublisher(new Migrator($module, $this->getLaravel())))
31 31
                 ->setRepository($this->laravel['modules'])
32 32
                 ->setConsole($this)
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         });
35 35
     }
36 36
 
37
-    function getInfo(): string|null
37
+    function getInfo(): string | null
38 38
     {
39 39
         return 'Publishing module migrations ...';
40 40
     }
Please login to merge, or discard this patch.
src/Commands/Publish/PublishTranslationCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     {
25 25
         $module = $this->getModuleModel($name);
26 26
 
27
-        $this->components->task("Publishing Translations <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) {
27
+        $this->components->task("Publishing Translations <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) {
28 28
             with(new LangPublisher($module))
29 29
                 ->setRepository($this->laravel['modules'])
30 30
                 ->setConsole($this)
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         });
33 33
     }
34 34
 
35
-    function getInfo(): string|null
35
+    function getInfo(): string | null
36 36
     {
37 37
         return 'Publishing module translations ...';
38 38
     }
Please login to merge, or discard this patch.
src/Commands/Publish/PublishConfigurationCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         ]);
31 31
     }
32 32
 
33
-    function getInfo(): string|null
33
+    function getInfo(): string | null
34 34
     {
35 35
         return 'Publishing module config files ...';
36 36
     }
Please login to merge, or discard this patch.
src/Commands/Actions/ModelPruneCommand.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -70,15 +70,15 @@  discard block
 block discarded – undo
70 70
      */
71 71
     protected function models(): Collection
72 72
     {
73
-        if (! empty($models = $this->option('model'))) {
74
-            return collect($models)->filter(function ($model) {
73
+        if (!empty($models = $this->option('model'))) {
74
+            return collect($models)->filter(function($model) {
75 75
                 return class_exists($model);
76 76
             })->values();
77 77
         }
78 78
 
79 79
         $except = $this->option('except');
80 80
 
81
-        if (! empty($models) && ! empty($except)) {
81
+        if (!empty($models) && !empty($except)) {
82 82
             throw new InvalidArgumentException('The --models and --except options cannot be combined.');
83 83
         }
84 84
 
@@ -96,22 +96,22 @@  discard block
 block discarded – undo
96 96
         }
97 97
 
98 98
         return collect(Finder::create()->in($path)->files()->name('*.php'))
99
-            ->map(function ($model) {
99
+            ->map(function($model) {
100 100
 
101 101
                 $namespace = config('modules.namespace');
102
-                return $namespace . str_replace(
102
+                return $namespace.str_replace(
103 103
                         ['/', '.php'],
104 104
                         ['\\', ''],
105 105
                         Str::after($model->getRealPath(), realpath(config('modules.paths.modules')))
106 106
                     );
107 107
             })->values()
108
-            ->when(! empty($except), function ($models) use ($except) {
109
-                return $models->reject(function ($model) use ($except) {
108
+            ->when(!empty($except), function($models) use ($except) {
109
+                return $models->reject(function($model) use ($except) {
110 110
                     return in_array($model, $except);
111 111
                 });
112
-            })->filter(function ($model) {
112
+            })->filter(function($model) {
113 113
                 return class_exists($model);
114
-            })->filter(function ($model) {
114
+            })->filter(function($model) {
115 115
                 return $this->isPrunable($model);
116 116
             })->values();
117 117
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,8 +87,7 @@
 block discarded – undo
87 87
                 config('modules.paths.modules'),
88 88
                 config('modules.paths.generator.model.path')
89 89
             );
90
-        }
91
-        else {
90
+        } else {
92 91
             $path = sprintf('%s/{%s}/%s',
93 92
                 config('modules.paths.modules'),
94 93
                 collect($this->argument('module'))->implode(','),
Please login to merge, or discard this patch.
src/Commands/Actions/UnUseCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,12 +24,12 @@
 block discarded – undo
24 24
     {
25 25
         $module = $this->getModuleModel($name);
26 26
 
27
-        $this->components->task("Forget Using <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) {
27
+        $this->components->task("Forget Using <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) {
28 28
             $this->laravel['modules']->forgetUsed($module);
29 29
         });
30 30
     }
31 31
 
32
-    function getInfo(): string|null
32
+    function getInfo(): string | null
33 33
     {
34 34
         return 'Forget Using Module ...';
35 35
     }
Please login to merge, or discard this patch.
src/Commands/Actions/UpdateCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@
 block discarded – undo
22 22
     {
23 23
         $module = $this->getModuleModel($name);
24 24
 
25
-        $this->components->task("Updating <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) {
25
+        $this->components->task("Updating <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) {
26 26
             $this->laravel['modules']->update($module);
27 27
         });
28 28
     }
29 29
 
30
-    function getInfo(): string|null
30
+    function getInfo(): string | null
31 31
     {
32 32
         return 'Updating Module ...';
33 33
     }
Please login to merge, or discard this patch.
src/Commands/Actions/EnableCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@
 block discarded – undo
26 26
             ? '<fg=red;options=bold>Disabled</>'
27 27
             : '<fg=green;options=bold>Enabled</>';
28 28
 
29
-        $this->components->task("Enabling <fg=cyan;options=bold>{$module->getName()}</> Module, old status: $status", function () use ($module) {
29
+        $this->components->task("Enabling <fg=cyan;options=bold>{$module->getName()}</> Module, old status: $status", function() use ($module) {
30 30
             $module->enable();
31 31
         });
32 32
     }
33 33
 
34
-    function getInfo(): string|null
34
+    function getInfo(): string | null
35 35
     {
36 36
         return 'Disabling module ...';
37 37
     }
Please login to merge, or discard this patch.
src/Commands/Actions/UseCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@
 block discarded – undo
22 22
     {
23 23
         $module = $this->getModuleModel($name);
24 24
 
25
-        $this->components->task("Using <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) {
25
+        $this->components->task("Using <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) {
26 26
             $this->laravel['modules']->setUsed($module);
27 27
         });
28 28
     }
29 29
 
30
-    function getInfo(): string|null
30
+    function getInfo(): string | null
31 31
     {
32 32
         return 'Using Module ...';
33 33
     }
Please login to merge, or discard this patch.
src/Commands/Actions/ModelShowCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,9 +59,9 @@
 block discarded – undo
59 59
 
60 60
         $rootNamespace = config('modules.namespace');
61 61
 
62
-        $modelPath = glob($rootNamespace . DIRECTORY_SEPARATOR .
63
-            '*' . DIRECTORY_SEPARATOR .
64
-            config('modules.paths.generator.model.path') . DIRECTORY_SEPARATOR .
62
+        $modelPath = glob($rootNamespace.DIRECTORY_SEPARATOR.
63
+            '*'.DIRECTORY_SEPARATOR.
64
+            config('modules.paths.generator.model.path').DIRECTORY_SEPARATOR.
65 65
             "$model.php");
66 66
 
67 67
         if (!count($modelPath)) {
Please login to merge, or discard this patch.