1 | <?php |
||
4 | class OpeningTimes implements OpeningTimesInterface |
||
5 | { |
||
6 | protected $days = array(); |
||
7 | |||
8 | |||
9 | /** |
||
10 | * Stores text hint regarding opening times |
||
11 | * @var string|null |
||
12 | */ |
||
13 | public $description = null; |
||
14 | |||
15 | |||
16 | /** |
||
17 | * @inheritDoc |
||
18 | */ |
||
19 | 2 | public function getDescription() : ?string |
|
23 | |||
24 | |||
25 | /** |
||
26 | * @inheritDoc |
||
27 | */ |
||
28 | 2 | public function setDescription( string $text = null) : self |
|
33 | |||
34 | |||
35 | /** |
||
36 | * @inheritDoc |
||
37 | */ |
||
38 | 2 | public function getIterator() |
|
42 | |||
43 | |||
44 | /** |
||
45 | * @inheritDoc |
||
46 | */ |
||
47 | 2 | public function jsonSerialize() |
|
51 | |||
52 | |||
53 | /** |
||
54 | * @param string $day Day name, e.g. "monday", "tuesday" |
||
55 | * @return string|null Opening times as text |
||
56 | */ |
||
57 | 30 | public function getDay( string $day ) : ?string |
|
61 | |||
62 | |||
63 | /** |
||
64 | * @param string $day Day name, e.g. "monday", "tuesday" |
||
65 | * @param string $times|null Opening times as text |
||
|
|||
66 | */ |
||
67 | 32 | public function setDay( string $day, string $times = null ) : self |
|
72 | |||
73 | |||
74 | |||
75 | |||
76 | |||
77 | /** |
||
78 | * @inheritDoc |
||
79 | * @return string|null |
||
80 | */ |
||
81 | 4 | public function getMonday() : ?string |
|
85 | |||
86 | |||
87 | /** |
||
88 | * @param string|null $times Opening times as text |
||
89 | */ |
||
90 | 8 | public function setMonday( string $times = null ) |
|
94 | |||
95 | |||
96 | |||
97 | |||
98 | |||
99 | /** |
||
100 | * @inheritDoc |
||
101 | * @return string|null |
||
102 | */ |
||
103 | 4 | public function getTuesday() : ?string |
|
107 | |||
108 | |||
109 | /** |
||
110 | * @param string|null $times Opening times as text |
||
111 | */ |
||
112 | 4 | public function setTuesday( string $times = null ) |
|
116 | |||
117 | |||
118 | |||
119 | |||
120 | |||
121 | /** |
||
122 | * @inheritDoc |
||
123 | * @return string|null |
||
124 | */ |
||
125 | 4 | public function getWednesday() : ?string |
|
129 | |||
130 | |||
131 | /** |
||
132 | * @param string|null $times Opening times as text |
||
133 | */ |
||
134 | 4 | public function setWednesday( string $times = null ) |
|
138 | |||
139 | |||
140 | |||
141 | |||
142 | |||
143 | /** |
||
144 | * @inheritDoc |
||
145 | * @return string|null |
||
146 | */ |
||
147 | 4 | public function getThursday() : ?string |
|
151 | |||
152 | |||
153 | /** |
||
154 | * @param string|null $times Opening times as text |
||
155 | */ |
||
156 | 4 | public function setThursday( string $times = null ) |
|
160 | |||
161 | |||
162 | |||
163 | |||
164 | |||
165 | |||
166 | |||
167 | |||
168 | /** |
||
169 | * @inheritDoc |
||
170 | * @return string|null |
||
171 | */ |
||
172 | 4 | public function getFriday() : ?string |
|
176 | |||
177 | |||
178 | |||
179 | /** |
||
180 | * @param string|null $times Opening times as text |
||
181 | */ |
||
182 | 4 | public function setFriday( string $times = null ) |
|
186 | |||
187 | |||
188 | |||
189 | |||
190 | |||
191 | |||
192 | /** |
||
193 | * @inheritDoc |
||
194 | * @return string|null |
||
195 | */ |
||
196 | 4 | public function getSaturday() : ?string |
|
200 | |||
201 | |||
202 | |||
203 | |||
204 | /** |
||
205 | * @param string|null $times Opening times as text |
||
206 | */ |
||
207 | 4 | public function setSaturday( string $times = null ) |
|
211 | |||
212 | |||
213 | |||
214 | |||
215 | /** |
||
216 | * @inheritDoc |
||
217 | * @return string|null |
||
218 | */ |
||
219 | 4 | public function getSunday() : ?string |
|
223 | |||
224 | |||
225 | |||
226 | |||
227 | |||
228 | /** |
||
229 | * @param string|null $times Opening times as text |
||
230 | */ |
||
231 | 4 | public function setSunday( string $times = null ) |
|
235 | |||
236 | |||
237 | } |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.