Completed
Pull Request — master (#1105)
by Dovydas
09:11
created
src/Commands/MigrateStatusCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         }
50 50
 
51 51
         foreach ($this->module->getOrdered($this->option('direction')) as $module) {
52
-            $this->line('Running for module: <info>' . $module->getName() . '</info>');
52
+            $this->line('Running for module: <info>'.$module->getName().'</info>');
53 53
             $this->migrateStatus($module);
54 54
         }
55 55
 
Please login to merge, or discard this patch.
src/Commands/ListenerMakeCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,10 +77,10 @@  discard block
 block discarded – undo
77 77
 
78 78
     protected function getEventName(Module $module)
79 79
     {
80
-        $namespace = $this->laravel['modules']->config('namespace') . "\\" . $module->getStudlyName();
80
+        $namespace = $this->laravel['modules']->config('namespace')."\\".$module->getStudlyName();
81 81
         $eventPath = GenerateConfigReader::read('event');
82 82
 
83
-        $eventName = $namespace . "\\" . $eventPath->getPath() . "\\" . $this->option('event');
83
+        $eventName = $namespace."\\".$eventPath->getPath()."\\".$this->option('event');
84 84
 
85 85
         return str_replace('/', '\\', $eventName);
86 86
     }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
         $listenerPath = GenerateConfigReader::read('listener');
93 93
 
94
-        return $path . $listenerPath->getPath() . '/' . $this->getFileName() . '.php';
94
+        return $path.$listenerPath->getPath().'/'.$this->getFileName().'.php';
95 95
     }
96 96
 
97 97
     /**
Please login to merge, or discard this patch.
src/Laravel/Module.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@
 block discarded – undo
18 18
         // This checks if we are running on a Laravel Vapor managed instance
19 19
         // and sets the path to a writable one (services path is not on a writable storage in Vapor).
20 20
         if (!is_null(env('VAPOR_MAINTENANCE_MODE', null))) {
21
-            return Str::replaceLast('config.php', $this->getSnakeName() . '_module.php', $this->app->getCachedConfigPath());
21
+            return Str::replaceLast('config.php', $this->getSnakeName().'_module.php', $this->app->getCachedConfigPath());
22 22
         }
23 23
 
24
-        return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->getCachedServicesPath());
24
+        return Str::replaceLast('services.php', $this->getSnakeName().'_module.php', $this->app->getCachedServicesPath());
25 25
     }
26 26
 
27 27
     /**
Please login to merge, or discard this patch.
src/Providers/ConsoleServiceProvider.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,8 +124,7 @@
 block discarded – undo
124 124
 
125 125
         foreach (config('modules.commands', $this->commands) as $command) {
126 126
             $commands[] = Str::contains($command, $this->consoleNamespace) ?
127
-                $command :
128
-                $this->consoleNamespace  . "\\";
127
+                $command : $this->consoleNamespace."\\";
129 128
         }
130 129
 
131 130
         return $commands;
Please login to merge, or discard this patch.
src/Commands/FactoryMakeCommand.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     }
60 60
 
61 61
     /**
62
-     * @return mixed
62
+     * @return string
63 63
      */
64 64
     protected function getTemplateContents()
65 65
     {
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     }
79 79
 
80 80
     /**
81
-     * @return mixed
81
+     * @return string
82 82
      */
83 83
     protected function getDestinationFilePath()
84 84
     {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     }
91 91
 
92 92
     /**
93
-     * @return mixed|string
93
+     * @return string
94 94
      */
95 95
     private function getModelName()
96 96
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
         $factoryPath = GenerateConfigReader::read('factory');
71 71
 
72
-        return $path . $factoryPath->getPath() . '/' . $this->getFileName();
72
+        return $path.$factoryPath->getPath().'/'.$this->getFileName();
73 73
     }
74 74
 
75 75
     /**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     private function getFileName()
79 79
     {
80
-        return Str::studly($this->argument('name')) . 'Factory.php';
80
+        return Str::studly($this->argument('name')).'Factory.php';
81 81
     }
82 82
 
83 83
     /**
@@ -107,6 +107,6 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function getModelNamespace(): string
109 109
     {
110
-        return $this->laravel['modules']->config('namespace') . '\\' . $this->laravel['modules']->findOrFail($this->getModuleName()) . '\\' . $this->laravel['modules']->config('paths.generator.model.path', 'Entities');
110
+        return $this->laravel['modules']->config('namespace').'\\'.$this->laravel['modules']->findOrFail($this->getModuleName()).'\\'.$this->laravel['modules']->config('paths.generator.model.path', 'Entities');
111 111
     }
112 112
 }
Please login to merge, or discard this patch.
src/Support/Stub.php 2 patches
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,6 @@  discard block
 block discarded – undo
48 48
     /**
49 49
      * Set variable style.
50 50
      *
51
-     * @param string $style
52 51
      * @return self
53 52
      */
54 53
     public function setStyle($left, $right = null)
@@ -138,7 +137,7 @@  discard block
 block discarded – undo
138 137
     /**
139 138
      * Get stub contents.
140 139
      *
141
-     * @return mixed|string
140
+     * @return string
142 141
      */
143 142
     public function getContents()
144 143
     {
@@ -168,7 +167,7 @@  discard block
 block discarded – undo
168 167
      * @param string $path
169 168
      * @param string $filename
170 169
      *
171
-     * @return bool
170
+     * @return integer
172 171
      */
173 172
     public function saveTo($path, $filename)
174 173
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             $right = $left;
62 62
         }
63 63
 
64
-        $this->style = trim($left . 'VARIABLE_NAME' . $right);
64
+        $this->style = trim($left.'VARIABLE_NAME'.$right);
65 65
 
66 66
         return $this;
67 67
     }
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
      */
111 111
     public function getPath()
112 112
     {
113
-        $path = static::getBasePath() . $this->path;
113
+        $path = static::getBasePath().$this->path;
114 114
 
115
-        return file_exists($path) ? $path : __DIR__ . '/../Commands/stubs' . $this->path;
115
+        return file_exists($path) ? $path : __DIR__.'/../Commands/stubs'.$this->path;
116 116
     }
117 117
 
118 118
     /**
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      */
173 173
     public function saveTo($path, $filename)
174 174
     {
175
-        return file_put_contents($path . '/' . $filename, $this->getContents());
175
+        return file_put_contents($path.'/'.$filename, $this->getContents());
176 176
     }
177 177
 
178 178
     /**
Please login to merge, or discard this patch.
config/config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     'stubs' => [
29 29
         'enabled' => false,
30 30
         'style' => '$VARIABLE_NAME$',
31
-        'path' => base_path() . '/vendor/nwidart/laravel-modules/src/Commands/stubs',
31
+        'path' => base_path().'/vendor/nwidart/laravel-modules/src/Commands/stubs',
32 32
         'files' => [
33 33
             'routes/web' => 'Routes/web.php',
34 34
             'routes/api' => 'Routes/api.php',
Please login to merge, or discard this patch.