| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Lines | 15 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | View Code Duplication | public function getPaths($model): array |
|
| 26 | { |
||
| 27 | if (is_null($model)) { |
||
| 28 | return []; |
||
| 29 | } |
||
| 30 | |||
| 31 | $filepath = $this->getAttribute($model); |
||
| 32 | // FIXME: mb change structure for storing files data? |
||
| 33 | $filepath = $this->sanitizeRepeaterValue($filepath); |
||
| 34 | if (!$filepath) { |
||
| 35 | return []; |
||
| 36 | } |
||
| 37 | |||
| 38 | return is_array($filepath) ? $filepath : [$filepath]; |
||
| 39 | } |
||
| 40 | |||
| 50 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.