1 | <?php |
||
14 | class Item extends BaseItem implements CreatableFromArray |
||
15 | { |
||
16 | /** |
||
17 | * @var int count |
||
18 | */ |
||
19 | private $count; |
||
20 | |||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | private $discount; |
||
25 | |||
26 | 3 | public function __construct() |
|
29 | |||
30 | /** |
||
31 | * @return int |
||
32 | */ |
||
33 | public function getCount(): int |
||
37 | |||
38 | /** |
||
39 | * @param int $count |
||
40 | * |
||
41 | * @return Item |
||
42 | */ |
||
43 | 2 | public function withCount(int $count) |
|
50 | |||
51 | /** |
||
52 | * @return int |
||
53 | */ |
||
54 | public function getDiscount(): int |
||
58 | |||
59 | /** |
||
60 | * @param int $discount |
||
61 | * |
||
62 | * @return Item |
||
63 | */ |
||
64 | 2 | public function withDiscount(int $discount) |
|
71 | |||
72 | 2 | public function toArray() |
|
84 | |||
85 | 3 | public static function createFromArray(array $data) |
|
101 | } |
||
102 |
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.