src/Console/CommandCreator.php 1 location
|
@@ 46-56 (lines=11) @@
|
| 43 |
|
* |
| 44 |
|
* @return string |
| 45 |
|
*/ |
| 46 |
|
protected function getStub($name) |
| 47 |
|
{ |
| 48 |
|
$stub = file_get_contents(__DIR__.'/Stubs/command.stub'); |
| 49 |
|
|
| 50 |
|
$stub = str_replace('CLASSNAME', $name, $stub); |
| 51 |
|
|
| 52 |
|
return $this->setNamespace( |
| 53 |
|
$stub, |
| 54 |
|
NamespaceResolver::resolve('console', 'Commands') |
| 55 |
|
); |
| 56 |
|
} |
| 57 |
|
} |
| 58 |
|
|
src/Console/DirectoryCreator.php 1 location
|
@@ 64-73 (lines=10) @@
|
| 61 |
|
* |
| 62 |
|
* @return string |
| 63 |
|
*/ |
| 64 |
|
protected function getKernelStub($createExample) |
| 65 |
|
{ |
| 66 |
|
$stub = file_get_contents(__DIR__.'/Stubs/kernel.stub'); |
| 67 |
|
|
| 68 |
|
$replace = $createExample ? 'ExampleCommand::class' : '//'; |
| 69 |
|
|
| 70 |
|
$stub = str_replace('COMMAND', $replace, $stub); |
| 71 |
|
|
| 72 |
|
return $this->setNamespace($stub, NamespaceResolver::resolve('console')); |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
/** |
| 76 |
|
* Create an example command. |