1 | <?php |
||
19 | abstract class Component |
||
20 | { |
||
21 | /** |
||
22 | * Array of Components. |
||
23 | * |
||
24 | * @var Component[] |
||
25 | */ |
||
26 | protected $components = []; |
||
27 | |||
28 | /** |
||
29 | * The order in which the components will be rendered during build. |
||
30 | * |
||
31 | * Not defined components will be appended at the end. |
||
32 | * |
||
33 | * @var array |
||
34 | */ |
||
35 | private $componentsBuildOrder = ['VTIMEZONE', 'DAYLIGHT', 'STANDARD']; |
||
36 | |||
37 | /** |
||
38 | * The type of the concrete Component. |
||
39 | * |
||
40 | * @abstract |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | abstract public function getType(); |
||
45 | |||
46 | /** |
||
47 | * Building the PropertyBag. |
||
48 | * |
||
49 | * @abstract |
||
50 | * |
||
51 | * @return PropertyBag |
||
52 | */ |
||
53 | abstract public function buildPropertyBag(); |
||
54 | |||
55 | /** |
||
56 | * Adds a Component. |
||
57 | * |
||
58 | * If $key is given, the component at $key will be replaced else the component will be append. |
||
59 | * |
||
60 | * @param Component $component The Component that will be added |
||
61 | * @param null $key The key of the Component |
||
62 | */ |
||
63 | 9 | public function addComponent(self $component, $key = null) |
|
71 | |||
72 | /** |
||
73 | * Set all Components. |
||
74 | * |
||
75 | * @param Component[] $components The array of Component that will be set |
||
76 | * @param null $key The key of the Component |
||
|
|||
77 | */ |
||
78 | 1 | public function setComponents(array $components) |
|
84 | |||
85 | /** |
||
86 | * Renders an array containing the lines of the iCal file. |
||
87 | * |
||
88 | * @return array |
||
89 | */ |
||
90 | 18 | public function build() |
|
117 | |||
118 | /** |
||
119 | * Renders the output. |
||
120 | * |
||
121 | * @return string |
||
122 | */ |
||
123 | 18 | public function render() |
|
127 | |||
128 | /** |
||
129 | * Renders the output when treating the class as a string. |
||
130 | * |
||
131 | * @return string |
||
132 | */ |
||
133 | 1 | public function __toString() |
|
137 | |||
138 | /** |
||
139 | * @param $lines |
||
140 | * |
||
141 | * @return array |
||
142 | */ |
||
143 | 18 | private function buildComponents(array &$lines) |
|
174 | |||
175 | /** |
||
176 | * @param array $lines |
||
177 | * @param Component $component |
||
178 | */ |
||
179 | 9 | private function addComponentLines(array &$lines, self $component) |
|
185 | } |
||
186 |
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.