| Conditions | 2 |
| Paths | 2 |
| Total Lines | 6 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 5 | public function build(array $schema): Structure |
|
| 22 | { |
||
| 23 | try { |
||
| 24 | 5 | return $this->structures->build($schema, $this->properties); |
|
| 25 | 3 | } catch (SchemaNotParseable $e) { |
|
| 26 | 3 | SchemaNotParseable::rethrow($e); |
|
|
1 ignored issue
–
show
|
|||
| 27 | } |
||
| 30 |
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: