| @@ 41-57 (lines=17) @@ | ||
| 38 | * |
|
| 39 | * @return bool |
|
| 40 | */ |
|
| 41 | protected function createKernel($createExample) |
|
| 42 | { |
|
| 43 | $path = $this->config->getConsoleDirectory('Kernel.php'); |
|
| 44 | ||
| 45 | if (!file_exists($path)) { |
|
| 46 | $this->writeFile( |
|
| 47 | $path, |
|
| 48 | $this->getKernelStub($createExample) |
|
| 49 | ); |
|
| 50 | ||
| 51 | $this->output->writeInfo('Created kernel file.'); |
|
| 52 | ||
| 53 | return true; |
|
| 54 | } |
|
| 55 | ||
| 56 | return false; |
|
| 57 | } |
|
| 58 | ||
| 59 | /** |
|
| 60 | * Get the kernel stub. |
|
| @@ 88-104 (lines=17) @@ | ||
| 85 | * |
|
| 86 | * @return bool |
|
| 87 | */ |
|
| 88 | protected function createExampleCommand() |
|
| 89 | { |
|
| 90 | $path = $this->config->getCommandsDirectory('ExampleCommand.php'); |
|
| 91 | ||
| 92 | if (!file_exists($path)) { |
|
| 93 | $this->writeFile( |
|
| 94 | $path, |
|
| 95 | $this->getExampleStub() |
|
| 96 | ); |
|
| 97 | ||
| 98 | $this->output->writeInfo('Created example command file.'); |
|
| 99 | ||
| 100 | return true; |
|
| 101 | } |
|
| 102 | ||
| 103 | return false; |
|
| 104 | } |
|
| 105 | ||
| 106 | /** |
|
| 107 | * Get the example command stub. |
|