| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | 15 | protected function writeFunctionStatement(RoutineInterface $model) { |
|
| 14 | 15 | $this->writer->write('function '); |
|
|
1 ignored issue
–
show
|
|||
| 15 | |||
| 16 | 15 | if ($model->isReferenceReturned()) { |
|
| 17 | 2 | $this->writer->write('& '); |
|
| 18 | } |
||
| 19 | |||
| 20 | 15 | $this->writer->write($model->getName() . '('); |
|
| 21 | 15 | $this->writeParameters($model); |
|
| 22 | 15 | $this->writer->write(')'); |
|
| 23 | 15 | $this->writeFunctionReturnType($model); |
|
| 24 | 15 | } |
|
| 25 | |||
| 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.