| Total Complexity | 5 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class TransactionHandler implements TransactionHandlerInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var \Xervice\Redis\Transaction\TransactionCollection |
||
| 14 | */ |
||
| 15 | private $collection; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * TransactionHandler constructor. |
||
| 19 | * |
||
| 20 | * @param \Xervice\Redis\Transaction\TransactionCollection $collection |
||
| 21 | */ |
||
| 22 | 1 | public function __construct(\Xervice\Redis\Transaction\TransactionCollection $collection) |
|
| 23 | { |
||
| 24 | 1 | $this->collection = $collection; |
|
| 25 | 1 | } |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @param \Xervice\Redis\Transaction\TransactionInterface $transaction |
||
| 29 | */ |
||
| 30 | 1 | public function addToCollection(TransactionInterface $transaction) |
|
| 31 | { |
||
| 32 | 1 | $this->collection->add($transaction); |
|
| 33 | 1 | } |
|
| 34 | |||
| 35 | 1 | public function clearCollection() |
|
| 38 | 1 | } |
|
| 39 | |||
| 40 | /** |
||
| 41 | * @return array |
||
| 42 | */ |
||
| 43 | 1 | public function getTransactionArray() : array |
|
| 52 | } |
||
| 53 | } |