Completed
Pull Request — master (#1854)
by
unknown
09:34
created
src/Commands/Actions/DumpCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,14 +22,14 @@
 block discarded – undo
22 22
     {
23 23
         $module = $this->getModuleModel($name);
24 24
 
25
-        $this->components->task("Generating for <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) {
25
+        $this->components->task("Generating for <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) {
26 26
             chdir($module->getPath());
27 27
 
28 28
             passthru('composer dump -o -n -q');
29 29
         });
30 30
     }
31 31
 
32
-    public function getInfo(): string|null
32
+    public function getInfo(): string | null
33 33
     {
34 34
         return 'Generating optimized autoload modules';
35 35
     }
Please login to merge, or discard this patch.
src/Commands/Database/MigrateRollbackCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
         $database = $this->option('database');
34 34
 
35
-        if (! empty($database)) {
35
+        if (!empty($database)) {
36 36
             $migrator->setDatabase($database);
37 37
         }
38 38
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
         if (count($migrated)) {
42 42
             foreach ($migrated as $migration) {
43
-                $this->components->task("Rollback: <info>{$migration}</info>", );
43
+                $this->components->task("Rollback: <info>{$migration}</info>",);
44 44
             }
45 45
 
46 46
             return;
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
     }
52 52
 
53
-    public function getInfo(): string|null
53
+    public function getInfo(): string | null
54 54
     {
55 55
         return null;
56 56
     }
Please login to merge, or discard this patch.
src/Commands/Database/MigrateStatusCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         ]);
39 39
     }
40 40
 
41
-    public function getInfo(): string|null
41
+    public function getInfo(): string | null
42 42
     {
43 43
         return null;
44 44
     }
Please login to merge, or discard this patch.
src/Commands/Database/SeedCommand.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         $module = $this->getModuleModel($name);
37 37
 
38
-        $this->components->task("Seeding <fg=cyan;options=bold>{$module->getName()}</> Module", function () use ($module) {
38
+        $this->components->task("Seeding <fg=cyan;options=bold>{$module->getName()}</> Module", function() use ($module) {
39 39
             try {
40 40
                 $this->moduleSeed($module);
41 41
             } catch (\Error $e) {
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         });
54 54
     }
55 55
 
56
-    public function getInfo(): string|null
56
+    public function getInfo(): string | null
57 57
     {
58 58
         return 'Seeding module ...';
59 59
     }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $config = $module->get('migration');
102 102
 
103 103
         if (is_array($config) && array_key_exists('seeds', $config)) {
104
-            foreach ((array)$config['seeds'] as $class) {
104
+            foreach ((array) $config['seeds'] as $class) {
105 105
                 if (class_exists($class)) {
106 106
                     $seeders[] = $class;
107 107
                 }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     protected function dbSeed($className)
139 139
     {
140 140
         if ($option = $this->option('class')) {
141
-            $params['--class'] = Str::finish(substr($className, 0, strrpos($className, '\\')), '\\') . $option;
141
+            $params['--class'] = Str::finish(substr($className, 0, strrpos($className, '\\')), '\\').$option;
142 142
         } else {
143 143
             $params = ['--class' => $className];
144 144
         }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $config = GenerateConfigReader::read('seeder');
170 170
         $seederPath = str_replace('/', '\\', $config->getPath());
171 171
 
172
-        return $namespace . '\\' . $name . '\\' . $seederPath . '\\' . $name . 'DatabaseSeeder';
172
+        return $namespace.'\\'.$name.'\\'.$seederPath.'\\'.$name.'DatabaseSeeder';
173 173
     }
174 174
 
175 175
     /**
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         $foundModules = [];
190 190
         foreach ($this->laravel['modules']->config('scan.paths') as $path) {
191 191
             $namespace = array_slice(explode('/', $path), -1)[0];
192
-            $foundModules[] = $namespace . '\\' . $name . '\\' . $seederPath . '\\' . $name . 'DatabaseSeeder';
192
+            $foundModules[] = $namespace.'\\'.$name.'\\'.$seederPath.'\\'.$name.'DatabaseSeeder';
193 193
         }
194 194
 
195 195
         return $foundModules;
Please login to merge, or discard this patch.
src/Commands/Database/MigrateResetCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
         $database = $this->option('database');
34 34
 
35
-        if (! empty($database)) {
35
+        if (!empty($database)) {
36 36
             $migrator->setDatabase($database);
37 37
         }
38 38
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $this->components->warn("Nothing to rollback on module <fg=cyan;options=bold>{$module->getName()}</>");
50 50
     }
51 51
 
52
-    public function getInfo(): string|null
52
+    public function getInfo(): string | null
53 53
     {
54 54
         return null;
55 55
     }
Please login to merge, or discard this patch.
src/Commands/Make/ObserverMakeCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
         $path = str_replace('/', '\\', $path);
74 74
 
75
-        return $this->laravel['modules']->config('namespace') . '\\' . $this->laravel['modules']->findOrFail($this->getModuleName()) . '\\' . $path;
75
+        return $this->laravel['modules']->config('namespace').'\\'.$this->laravel['modules']->findOrFail($this->getModuleName()).'\\'.$path;
76 76
     }
77 77
 
78 78
     /**
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     private function getModelVariable(): string
90 90
     {
91
-        return '$' . Str::lower($this->argument('name'));
91
+        return '$'.Str::lower($this->argument('name'));
92 92
     }
93 93
 
94 94
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
         $observerPath = GenerateConfigReader::read('observer');
102 102
 
103
-        return $path . $observerPath->getPath() . '/' . $this->getFileName();
103
+        return $path.$observerPath->getPath().'/'.$this->getFileName();
104 104
     }
105 105
 
106 106
     /**
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     private function getFileName()
110 110
     {
111
-        return Str::studly($this->argument('name')) . 'Observer.php';
111
+        return Str::studly($this->argument('name')).'Observer.php';
112 112
     }
113 113
 
114 114
     public function handle(): int
Please login to merge, or discard this patch.
src/Commands/Make/ModelMakeCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $string = '';
59 59
         foreach ($pieces as $i => $piece) {
60 60
             if ($i + 1 < count($pieces)) {
61
-                $string .= strtolower($piece) . '_';
61
+                $string .= strtolower($piece).'_';
62 62
             } else {
63 63
                 $string .= Str::plural(strtolower($piece));
64 64
             }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     private function handleOptionalMigrationOption()
100 100
     {
101 101
         if ($this->option('migration') === true) {
102
-            $migrationName = 'create_' . $this->createMigrationName() . '_table';
102
+            $migrationName = 'create_'.$this->createMigrationName().'_table';
103 103
             $this->call('module:make-migration', ['name' => $migrationName, 'module' => $this->argument('module')]);
104 104
         }
105 105
     }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
         $modelPath = GenerateConfigReader::read('model');
134 134
 
135
-        return $path . $modelPath->getPath() . '/' . $this->getModelName() . '.php';
135
+        return $path.$modelPath->getPath().'/'.$this->getModelName().'.php';
136 136
     }
137 137
 
138 138
     /**
Please login to merge, or discard this patch.
src/Commands/Make/ControllerMakeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
         $controllerPath = GenerateConfigReader::read('controller');
46 46
 
47
-        return $path . $controllerPath->getPath() . '/' . $this->getControllerName() . '.php';
47
+        return $path.$controllerPath->getPath().'/'.$this->getControllerName().'.php';
48 48
     }
49 49
 
50 50
     /**
Please login to merge, or discard this patch.
src/Commands/Make/RouteProviderMakeCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
         $generatorPath = GenerateConfigReader::read('provider');
89 89
 
90
-        return $path . $generatorPath->getPath() . '/' . $this->getFileName() . '.php';
90
+        return $path.$generatorPath->getPath().'/'.$this->getFileName().'.php';
91 91
     }
92 92
 
93 93
     /**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     protected function getWebRoutesPath()
97 97
     {
98
-        return '/' . $this->laravel['modules']->config('stubs.files.routes/web', 'Routes/web.php');
98
+        return '/'.$this->laravel['modules']->config('stubs.files.routes/web', 'Routes/web.php');
99 99
     }
100 100
 
101 101
     /**
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     protected function getApiRoutesPath()
105 105
     {
106
-        return '/' . $this->laravel['modules']->config('stubs.files.routes/api', 'Routes/api.php');
106
+        return '/'.$this->laravel['modules']->config('stubs.files.routes/api', 'Routes/api.php');
107 107
     }
108 108
 
109 109
     public function getDefaultNamespace(): string
Please login to merge, or discard this patch.