| Total Complexity | 7 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | class InsertItemCommand extends AbstractStandardCommand |
||
| 8 | { |
||
| 9 | public const TYPE = 'InsertItem'; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @param int|null $at Index where to insert the item |
||
| 13 | * @param string|null $componentId The ID of the component to insert into |
||
| 14 | * @param mixed $item Single item/component to insert (can be array, object, or APL component) |
||
| 15 | * @param array|null $items Array of items/components to insert |
||
| 16 | */ |
||
| 17 | 6 | public function __construct( |
|
| 18 | public ?int $at = null, |
||
| 19 | public ?string $componentId = null, |
||
| 20 | public mixed $item = null, |
||
| 21 | public ?array $items = null, |
||
| 22 | ) { |
||
| 23 | 6 | parent::__construct(self::TYPE); |
|
| 24 | } |
||
| 25 | |||
| 26 | 4 | public function jsonSerialize(): array |
|
| 47 | } |
||
| 48 | } |
||
| 49 |