| Total Complexity | 4 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 9 | abstract class AbstractMediaFieldRule |
||
| 10 | { |
||
| 11 | use ChecksExistingAssets; |
||
| 12 | |||
| 13 | use ValidatesAttributes; |
||
|
|
|||
| 14 | use ValidatesExistingAssetAttributes; |
||
| 15 | |||
| 16 | protected function normalizePayloadIncludingExistingMedia($value): array |
||
| 19 | } |
||
| 20 | |||
| 21 | protected function normalizePayload(array $values, $excludeExistingMedia = true): array |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Default getSize method |
||
| 36 | * |
||
| 37 | * Override the default getSize from ValidatesAttributes to avoid calls to a hasRule method |
||
| 38 | * For media fields this is not needed anyways. |
||
| 39 | * |
||
| 40 | * @param $attribute |
||
| 41 | * @param $value |
||
| 42 | * @return bool|false|float|int |
||
| 43 | */ |
||
| 44 | protected function getSize($attribute, $value) |
||
| 53 |