Total Complexity | 8 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | final class NullReactionTotal implements |
||
21 | ReactionTotalInterface |
||
22 | { |
||
23 | private ReactantInterface $reactant; |
||
24 | |||
25 | public function __construct( |
||
26 | ReactantInterface $reactant, |
||
27 | ) { |
||
28 | $this->reactant = $reactant; |
||
29 | } |
||
30 | |||
31 | public function getReactant(): ReactantInterface |
||
32 | { |
||
33 | return $this->reactant; |
||
34 | } |
||
35 | |||
36 | public function getCount(): int |
||
39 | } |
||
40 | |||
41 | public function getWeight(): float |
||
42 | { |
||
43 | return 0.0; |
||
44 | } |
||
45 | |||
46 | public function incrementCount( |
||
47 | int $amount, |
||
48 | ): void { |
||
49 | throw ReactionTotalInvalid::notExists(); |
||
50 | } |
||
51 | |||
52 | public function decrementCount( |
||
53 | int $amount, |
||
54 | ): void { |
||
55 | throw ReactionTotalInvalid::notExists(); |
||
56 | } |
||
57 | |||
58 | public function incrementWeight( |
||
59 | float $amount, |
||
60 | ): void { |
||
61 | throw ReactionTotalInvalid::notExists(); |
||
62 | } |
||
63 | |||
64 | public function decrementWeight( |
||
68 | } |
||
69 | } |
||
70 |