1 | <?php |
||
30 | abstract class AbstractPrice implements PriceInterface, EntityInterface |
||
31 | { |
||
32 | /** |
||
33 | * @var integer |
||
34 | */ |
||
35 | protected $id; |
||
36 | |||
37 | /** |
||
38 | * @var TypeInterface |
||
39 | */ |
||
40 | protected $type; |
||
41 | |||
42 | /** |
||
43 | * @var TargetInterface |
||
44 | */ |
||
45 | protected $target; |
||
46 | |||
47 | /** |
||
48 | * @var PlanInterface |
||
49 | */ |
||
50 | protected $plan; |
||
51 | |||
52 | 26 | public function __construct( |
|
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | 2 | public function getId() |
|
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | 19 | public function getType() |
|
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | 19 | public function getTarget() |
|
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | */ |
||
91 | 1 | public function getPlan() |
|
95 | |||
96 | /** |
||
97 | * {@inheritdoc} |
||
98 | */ |
||
99 | public function hasPlan() |
||
103 | |||
104 | /** |
||
105 | * {@inheritdoc} |
||
106 | */ |
||
107 | public function setPlan(PlanInterface $plan) |
||
114 | |||
115 | /** |
||
116 | * {@inheritdoc} |
||
117 | * Default sum calculation method: sum = price * usage. |
||
118 | */ |
||
119 | 9 | public function calculateSum(QuantityInterface $quantity): ?Money |
|
134 | |||
135 | public static function create(array $data) |
||
139 | |||
140 | public function jsonSerialize() |
||
148 | |||
149 | /** |
||
150 | * {@inheritdoc} |
||
151 | */ |
||
152 | 17 | public function isApplicable(ActionInterface $action): bool |
|
166 | |||
167 | /** {@inheritdoc} */ |
||
168 | 4 | public function calculateCharges(ActionInterface $action): array |
|
177 | } |
||
178 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.