| Conditions | 5 |
| Paths | 9 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function value(Request $request) |
||
| 21 | { |
||
| 22 | $paths = $this->field->value($request); |
||
| 23 | if (!$paths) { |
||
| 24 | $defaultValue = $this->isMultiple() ? [] : ''; |
||
| 25 | $value = $request->get($this->name(), $defaultValue); |
||
| 26 | |||
| 27 | return !$value && $this->isNullable() ? null : $value; |
||
| 28 | } |
||
| 29 | |||
| 30 | return $paths; |
||
| 31 | } |
||
| 32 | |||
| 38 |
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.