1 | <?php |
||
20 | class Hourly implements ForecastItemInterface |
||
21 | { |
||
22 | /** @var float */ |
||
23 | protected $summary = null; |
||
24 | |||
25 | /** @var array */ |
||
26 | protected $hours = []; |
||
27 | |||
28 | /** |
||
29 | * @api |
||
30 | * |
||
31 | * @return string |
||
32 | */ |
||
33 | public function getSummary() |
||
37 | |||
38 | /** |
||
39 | * @api |
||
40 | * |
||
41 | * @return Temperature |
||
42 | */ |
||
43 | public function getTemperature(): Temperature |
||
47 | |||
48 | /** |
||
49 | * @api |
||
50 | * |
||
51 | * @return Wind |
||
52 | */ |
||
53 | public function getWind(): Wind |
||
57 | |||
58 | /** |
||
59 | * @api |
||
60 | * |
||
61 | * @return string |
||
62 | */ |
||
63 | public function __toString() |
||
67 | |||
68 | /** |
||
69 | * @param array $data |
||
70 | * @return ForecastItemInterface |
||
71 | */ |
||
72 | public function setData(array $data): ForecastItemInterface |
||
88 | |||
89 | public function onHours() |
||
93 | |||
94 | /** |
||
95 | * @param int $hour |
||
96 | * |
||
97 | * @return Hour |
||
98 | */ |
||
99 | public function inTime($seekingHour): Hour |
||
116 | |||
117 | /** |
||
118 | * @return Humidity |
||
119 | */ |
||
120 | public function getHumidity() |
||
124 | |||
125 | /** |
||
126 | * @return Precipitation |
||
127 | */ |
||
128 | public function getPrecipitation() |
||
132 | |||
133 | /** |
||
134 | * @return string |
||
135 | */ |
||
136 | public function getIcon(): string |
||
140 | } |
||
141 |
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.