1 | <?php |
||
21 | class Link |
||
22 | { |
||
23 | /** @var string */ |
||
24 | protected $title; |
||
25 | |||
26 | /** @var \DateTime */ |
||
27 | protected $from; |
||
28 | |||
29 | /** @var \DateTime */ |
||
30 | protected $to; |
||
31 | |||
32 | /** @var string */ |
||
33 | protected $description; |
||
34 | |||
35 | /** @var bool */ |
||
36 | protected $allDay; |
||
37 | |||
38 | /** @var string */ |
||
39 | protected $address; |
||
40 | |||
41 | /** @var array */ |
||
42 | protected $attendees; |
||
43 | |||
44 | public function __construct(string $title, DateTime $from, DateTime $to, bool $allDay = false) |
||
61 | |||
62 | /** |
||
63 | * @param string $title |
||
64 | * @param \DateTime $from |
||
65 | * @param \DateTime $to |
||
66 | * @param bool $allDay |
||
67 | * |
||
68 | * @return static |
||
69 | * @throws InvalidLink |
||
70 | */ |
||
71 | public static function create(string $title, DateTime $from, DateTime $to, bool $allDay = false) |
||
75 | |||
76 | /** |
||
77 | * @param string $description |
||
78 | * |
||
79 | * @return $this |
||
80 | */ |
||
81 | public function description(string $description) |
||
87 | |||
88 | /** |
||
89 | * @param string $address |
||
90 | * |
||
91 | * @return $this |
||
92 | */ |
||
93 | public function address(string $address) |
||
99 | |||
100 | /** |
||
101 | * @param array $emails |
||
|
|||
102 | * |
||
103 | * @return $this |
||
104 | */ |
||
105 | public function attendees(string $attendees) |
||
115 | |||
116 | public function google(): string |
||
120 | |||
121 | public function ics(): string |
||
125 | |||
126 | public function yahoo(): string |
||
130 | |||
131 | public function webOutlook(): string |
||
135 | |||
136 | public function __get($property) |
||
140 | } |
||
141 |
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.