1 | <?php |
||
18 | class OrderElement |
||
19 | { |
||
20 | |||
21 | const STATUS_ACCEPTED = 'accepted'; |
||
22 | |||
23 | const STATUS_REJECTED = 'rejected'; |
||
24 | |||
25 | /*** |
||
|
|||
26 | * @param \stdClass[] $values |
||
27 | * @return OrderElement[] |
||
28 | */ |
||
29 | public static function fromList(array $values) |
||
39 | |||
40 | /** |
||
41 | * @param \stdClass $value |
||
42 | * @return OrderElement |
||
43 | */ |
||
44 | public static function fromValue(\stdClass $value) |
||
48 | |||
49 | /** |
||
50 | * @var \stdClass |
||
51 | */ |
||
52 | private $source; |
||
53 | |||
54 | /** |
||
55 | * @var \DateTimeInterface|null |
||
56 | */ |
||
57 | private $created; |
||
58 | |||
59 | /** |
||
60 | * @param \stdClass $source |
||
61 | */ |
||
62 | public function __construct(\stdClass $source) |
||
66 | |||
67 | /** |
||
68 | * @return int |
||
69 | */ |
||
70 | public function getId() |
||
74 | |||
75 | /** |
||
76 | * @return \DateTime |
||
77 | */ |
||
78 | public function getCreated() |
||
82 | |||
83 | /** |
||
84 | * @return int |
||
85 | */ |
||
86 | public function getDataboxId() |
||
90 | |||
91 | /** |
||
92 | * @return int |
||
93 | */ |
||
94 | public function getRecordId() |
||
98 | |||
99 | public function getStatus() |
||
103 | |||
104 | /** |
||
105 | * @return int |
||
106 | */ |
||
107 | public function getIndex() |
||
111 | } |
||
112 |
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.