| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function changeCover(UploadedFile $file): ?object |
||
| 22 | { |
||
| 23 | if ($this->metaExists()) { |
||
| 24 | $this->internalFunctionIsCallable = true; |
||
| 25 | $res = $this->updateCover($file); |
||
| 26 | |||
| 27 | if ($res) { |
||
| 28 | $this->setCover($this->id); |
||
| 29 | $this->updateMeta(); |
||
| 30 | |||
| 31 | return $this->urls(); |
||
| 32 | } |
||
| 33 | } |
||
| 34 | |||
| 35 | return null; |
||
| 36 | } |
||
| 67 |
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: