We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 8 |
| Paths | 25 |
| Total Lines | 44 |
| Code Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | $value = []; |
||
| 19 | } |
||
| 20 | |||
| 21 | $previousValues = $entry?->{$attribute} ?? []; |
||
| 22 | if (is_string($previousValues)) { |
||
| 23 | $previousValues = json_decode($previousValues, true) ?? []; |
||
| 24 | } |
||
| 25 | |||
| 26 | $value = array_merge($previousValues, $value); |
||
| 27 | |||
| 28 | if ($entry) { |
||
| 29 | $filesDeleted = CrudPanelFacade::getRequest()->input('clear_'.$attribute) ?? []; |
||
| 30 | |||
| 31 | $data = $this->data; |
||
| 32 | $data[$attribute] = array_diff($value, $filesDeleted); |
||
| 33 | |||
| 34 | return $this->validateFieldAndFile($attribute, $data); |
||
| 35 | } |
||
| 36 | |||
| 37 | return $this->validateFieldAndFile($attribute, $value); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |