Total Complexity | 4 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 55.56% |
Changes | 0 |
1 | <?php |
||
9 | class CancelTransaction implements Cancel |
||
10 | { |
||
11 | use Commit; |
||
12 | |||
13 | private $id; |
||
14 | |||
15 | private $extraOptions; |
||
16 | |||
17 | 1 | public function __construct($id, array $extraOptions = []) |
|
18 | { |
||
19 | 1 | $this->id = $id; |
|
20 | 1 | $this->extraOptions = new ParamsBag($extraOptions); |
|
21 | } |
||
22 | |||
23 | public function getId() |
||
24 | { |
||
25 | return $this->id; |
||
26 | } |
||
27 | |||
28 | 1 | public function canCommit() |
|
29 | { |
||
30 | 1 | return $this->id !== null; |
|
31 | } |
||
32 | |||
33 | public function getExtraOptions() |
||
36 | } |
||
37 | } |
||
38 |