| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | protected function parseParam(Node\Param $node): ParameterModelInterface |
||
| 29 | { |
||
| 30 | /** @todo Add a typeTrait and a valueTrait */ |
||
| 31 | /** @todo Move in a NodeParserInterface */ |
||
| 32 | $parameter = new ParameterModel(); |
||
| 33 | $parameter->setName($node->name); |
||
| 34 | $parameter->setIsVariadic($node->variadic); |
||
|
|
|||
| 35 | } |
||
| 37 |
For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example: