Total Complexity | 6 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 53.85% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | abstract class ReferenceTransaction implements Transaction |
||
10 | { |
||
11 | use Commit; |
||
12 | |||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $id; |
||
17 | |||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | private $amount = 0; |
||
22 | |||
23 | /** |
||
24 | * @var ParamsBag |
||
25 | */ |
||
26 | private $extraOptions; |
||
27 | |||
28 | 5 | public function __construct($amount, $id, array $extraOptions = []) |
|
29 | { |
||
30 | 5 | $this->id = $id; |
|
31 | 5 | $this->amount = $amount; |
|
32 | 5 | $this->extraOptions = new ParamsBag($extraOptions); |
|
33 | } |
||
34 | |||
35 | public function getAmount() |
||
36 | { |
||
37 | return $this->amount; |
||
38 | } |
||
39 | |||
40 | public function getId() |
||
41 | { |
||
42 | return $this->id; |
||
43 | } |
||
44 | |||
45 | 5 | public function canCommit() |
|
49 | } |
||
50 | |||
51 | public function getExtraOptions() |
||
54 | } |
||
55 | } |
||
56 |