| 1 | <?php |
||
| 7 | Trait RoutineBuilderPart { |
||
| 8 | |||
| 9 | use TypeBuilderPart; |
||
| 10 | |||
| 11 | protected abstract function generate(AbstractModel $model); |
||
| 12 | |||
| 13 | 15 | protected function writeFunctionStatement(RoutineInterface $model) { |
|
| 25 | |||
| 26 | 15 | protected function writeParameters(RoutineInterface $model) { |
|
| 37 | |||
| 38 | 15 | protected function writeFunctionReturnType(RoutineInterface $model) { |
|
| 44 | |||
| 45 | 14 | protected function writeBody(RoutineInterface $model) { |
|
| 50 | } |
||
| 51 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@returndoc comment to communicate to implementors of these methods what they are expected to return.