Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
10 | class OperationData extends Map |
||
11 | { |
||
12 | 14 | public function __construct(array $elements = []) |
|
15 | } |
||
16 | |||
17 | /** |
||
18 | * @return Option |
||
19 | */ |
||
20 | 2 | public function getOp(): Option |
|
21 | { |
||
22 | 2 | return $this->get(Operations::OP_KEY_NAME); |
|
23 | } |
||
24 | |||
25 | /** |
||
26 | * @return Map |
||
27 | */ |
||
28 | 6 | public function getData(): Map |
|
29 | { |
||
30 | 6 | $operationData = new Map($this->elements); |
|
31 | 6 | if ($operationData->containsKey(Operations::OP_KEY_NAME)) { |
|
32 | 5 | $operationData->remove(Operations::OP_KEY_NAME); |
|
33 | } |
||
34 | |||
35 | 6 | return $operationData; |
|
36 | } |
||
37 | |||
38 | /** |
||
39 | * @param array $keys |
||
40 | * @return Sequence |
||
41 | */ |
||
42 | 3 | public function diffKeys(array $keys): Sequence |
|
47 | } |
||
48 | } |
||
49 |