| Total Complexity | 6 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 3 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 7 | class DetachAsset |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Detaches an asset from a model. |
||
| 11 | * |
||
| 12 | * @param $ids |
||
| 13 | */ |
||
| 14 | 5 | public function detach(HasAsset $model, $ids, $type, $locale): void |
|
| 24 | } |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Detaches all assets or for a specific type from a model. |
||
| 29 | * |
||
| 30 | 2 | * @param $ids |
|
| 31 | */ |
||
| 32 | 2 | public function detachAll(HasAsset $model, ?string $type = null): void |
|
| 39 | } |
||
| 40 | 2 | ||
| 41 | /** |
||
| 42 | * @param mixed $ids |
||
| 43 | * @return string[] |
||
| 44 | */ |
||
| 45 | public function ensureParameterIsString(mixed $ids): array |
||
| 50 |