| Total Complexity | 5 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class BatchRequest implements \JsonSerializable |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var ArrayCollection |
||
| 14 | */ |
||
| 15 | private $operations; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * BatchRequest constructor. |
||
| 19 | */ |
||
| 20 | public function __construct() |
||
| 21 | { |
||
| 22 | $this->operations = new ArrayCollection(); |
||
| 23 | } |
||
| 24 | |||
| 25 | public function jsonSerialize() |
||
| 26 | { |
||
| 27 | return [ |
||
| 28 | 'operations' => $this->getOperations()->getValues() |
||
| 29 | ]; |
||
| 30 | } |
||
| 31 | |||
| 32 | public function getOperations(): Collection |
||
| 35 | } |
||
| 36 | |||
| 37 | public function addOperation(BatchOperation $operation): BatchRequest |
||
| 41 | } |
||
| 42 | |||
| 43 | public function removeOperation(BatchOperation $operation): BatchRequest |
||
| 49 |