1 | <?php |
||
13 | class Holidays implements Countable |
||
14 | { |
||
15 | /** |
||
16 | * @var DateTime[] |
||
17 | */ |
||
18 | private $dates; |
||
19 | |||
20 | 1 | public function __construct(array $dates = array()) |
|
26 | |||
27 | /** |
||
28 | * @return boolean |
||
29 | */ |
||
30 | 1 | public function isEmpty() |
|
31 | { |
||
32 | 1 | return empty($this->dates); |
|
33 | } |
||
34 | |||
35 | /** |
||
36 | * Implement countable |
||
37 | * |
||
38 | * @return integer |
||
39 | */ |
||
40 | 1 | public function count() |
|
41 | { |
||
42 | 1 | return count($this->dates); |
|
43 | } |
||
44 | |||
45 | /** |
||
46 | * @return DateTime[] |
||
47 | */ |
||
48 | 1 | public function getDates() |
|
52 | |||
53 | /** |
||
54 | * @param DateTime $current |
||
|
|||
55 | * @param DateTime $to |
||
56 | */ |
||
57 | 1 | public function addDateTimeSpan(DateTimeSpan $span) |
|
70 | |||
71 | /** |
||
72 | * @param DateTime $day |
||
73 | */ |
||
74 | 1 | public function add(DateTime $day) |
|
82 | |||
83 | /** |
||
84 | * Check if a date is within any holiday |
||
85 | * |
||
86 | * @param DateTime $date |
||
87 | * @return boolean |
||
88 | */ |
||
89 | 1 | public function isActive(DateTime $date = null) |
|
101 | |||
102 | /** |
||
103 | * @param DateTime $from |
||
104 | * @param DateTime $date |
||
105 | * @return DateTime |
||
106 | */ |
||
107 | 1 | public function extendDateTimeSpan(DateTimeSpan $span) |
|
119 | } |
||
120 |
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.