| Total Complexity | 4 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | final class Update |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var array |
||
| 12 | */ |
||
| 13 | private $actions = []; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param array $actions |
||
| 17 | */ |
||
| 18 | 14 | public function __construct(array $actions = []) |
|
| 19 | { |
||
| 20 | 14 | $this->actions = $actions; |
|
| 21 | 14 | } |
|
| 22 | |||
| 23 | /** |
||
| 24 | * @return array |
||
| 25 | */ |
||
| 26 | 14 | public function toArray(): array |
|
| 27 | { |
||
| 28 | return [ |
||
| 29 | 'body' => [ |
||
| 30 | 14 | 'actions' => $this->actions, |
|
| 31 | ], |
||
| 32 | ]; |
||
| 33 | } |
||
| 34 | |||
| 35 | 14 | public function add(string $index, string $alias): void |
|
| 40 | ]]; |
||
| 41 | 14 | } |
|
| 42 | |||
| 43 | 2 | public function removeIndex(string $index): void |
|
| 48 |