@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * |
45 | 45 | * @param InputInterface $input |
46 | 46 | * @param OutputInterface $output |
47 | - * @return bool|null |
|
47 | + * @return false|null |
|
48 | 48 | */ |
49 | 49 | public function __invoke(InputInterface $input, OutputInterface $output) |
50 | 50 | { |
@@ -108,16 +108,25 @@ discard block |
||
108 | 108 | return file_exists($this->getPath($this->qualifyClass($rawName))); |
109 | 109 | } |
110 | 110 | |
111 | + /** |
|
112 | + * @param string $text |
|
113 | + */ |
|
111 | 114 | public function info($text) |
112 | 115 | { |
113 | 116 | $this->output->write('<info>'.$text.'</info>'); |
114 | 117 | } |
115 | 118 | |
119 | + /** |
|
120 | + * @param string $text |
|
121 | + */ |
|
116 | 122 | public function error($text) |
117 | 123 | { |
118 | 124 | $this->output->write('<error>'.$text.'</error>'); |
119 | 125 | } |
120 | 126 | |
127 | + /** |
|
128 | + * @param string $name |
|
129 | + */ |
|
121 | 130 | protected function getPath($name) |
122 | 131 | { |
123 | 132 | $name = Str::replaceFirst($this->rootNamespace(), '', $name); |
@@ -142,6 +151,9 @@ discard block |
||
142 | 151 | return array_keys($autoload)[0]; |
143 | 152 | } |
144 | 153 | |
154 | + /** |
|
155 | + * @param string $name |
|
156 | + */ |
|
145 | 157 | protected function buildClass($name) |
146 | 158 | { |
147 | 159 | $stub = file_get_contents($this->getStub()); |
@@ -149,6 +161,9 @@ discard block |
||
149 | 161 | return $this->replaceNamespace($stub, $name)->replaceClass($stub, $name); |
150 | 162 | } |
151 | 163 | |
164 | + /** |
|
165 | + * @param string $stub |
|
166 | + */ |
|
152 | 167 | protected function replaceNamespace(&$stub, $name) |
153 | 168 | { |
154 | 169 | $stub = str_replace( |
@@ -182,6 +197,10 @@ discard block |
||
182 | 197 | @mkdir($path, 0777, true); |
183 | 198 | } |
184 | 199 | |
200 | + /** |
|
201 | + * @param string $name |
|
202 | + * @param string $default |
|
203 | + */ |
|
185 | 204 | public function option($name, $default = null) |
186 | 205 | { |
187 | 206 | if ($this->input->hasOption($name)) { |