@@ -168,6 +168,11 @@ discard block |
||
168 | 168 | $this->generateFile($path, $stub, $namespace); |
169 | 169 | } |
170 | 170 | |
171 | + /** |
|
172 | + * @param string $path |
|
173 | + * @param string $stub |
|
174 | + * @param null|string $namespace |
|
175 | + */ |
|
171 | 176 | public function generateFile($path, $stub, $namespace) |
172 | 177 | { |
173 | 178 | if (! $this->filesystem->exists($path) || $this->confirm($path.' already exists! Continue?')) { |
@@ -197,6 +202,9 @@ discard block |
||
197 | 202 | return $path.'/Stubs/base/'.$stub.'.stub'; |
198 | 203 | } |
199 | 204 | |
205 | + /** |
|
206 | + * @param string $stub |
|
207 | + */ |
|
200 | 208 | public function getStub($stub) |
201 | 209 | { |
202 | 210 | return $this->filesystem->get($this->getPath($stub)); |
@@ -170,10 +170,10 @@ discard block |
||
170 | 170 | |
171 | 171 | public function generateFile($path, $stub, $namespace) |
172 | 172 | { |
173 | - if (! $this->filesystem->exists($path) || $this->confirm($path.' already exists! Continue?')) { |
|
173 | + if (!$this->filesystem->exists($path) || $this->confirm($path.' already exists! Continue?')) { |
|
174 | 174 | $content = str_replace('$NAMESPACE$', $namespace, $stub); |
175 | 175 | |
176 | - if (! $this->filesystem->isDirectory($dir = dirname($path))) { |
|
176 | + if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
|
177 | 177 | $this->filesystem->makeDirectory($dir, 0777, true, true); |
178 | 178 | } |
179 | 179 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $path = config('repository.generator.stubsOverridePath', $defaultPath); |
191 | 191 | |
192 | 192 | // rollback |
193 | - if (! file_exists($path.'/Stubs/base/'.$stub.'.stub')) { |
|
193 | + if (!file_exists($path.'/Stubs/base/'.$stub.'.stub')) { |
|
194 | 194 | $path = $defaultPath; |
195 | 195 | } |
196 | 196 |