1 | <?php |
||
11 | final class BreakDownComponent implements ComponentInterface, IteratorAggregate, Countable, JsonSerializable |
||
12 | { |
||
13 | /** |
||
14 | * @var Group[] |
||
15 | */ |
||
16 | private $groups = []; |
||
17 | |||
18 | /** |
||
19 | * BreakDownComponent constructor. |
||
20 | * @param Group[] $appliedGroups |
||
|
|||
21 | * @param Group[] $groups |
||
22 | */ |
||
23 | public function __construct(array $groups = []) |
||
27 | |||
28 | /** |
||
29 | * @inheritDoc |
||
30 | */ |
||
31 | public static function getName(): string |
||
35 | |||
36 | /** |
||
37 | * @param Group $group |
||
38 | */ |
||
39 | public function add(Group $group): void |
||
43 | |||
44 | /** |
||
45 | * @param string $field |
||
46 | * @return bool |
||
47 | */ |
||
48 | public function has(string $field): bool |
||
58 | |||
59 | /** |
||
60 | * @param string $field |
||
61 | * @return Group |
||
62 | * @throws \InvalidArgumentException |
||
63 | */ |
||
64 | public function get(string $field): Group |
||
74 | |||
75 | /** |
||
76 | * @return Group[] |
||
77 | */ |
||
78 | public function all(): array |
||
82 | |||
83 | /** |
||
84 | * @return Group[] |
||
85 | */ |
||
86 | public function getAppliedGroups(): array |
||
97 | |||
98 | /** |
||
99 | * @return Group[] |
||
100 | */ |
||
101 | public function getIterator(): iterable |
||
105 | |||
106 | /** |
||
107 | * @inheritDoc |
||
108 | */ |
||
109 | public function count(): int |
||
113 | |||
114 | /** |
||
115 | * @inheritDoc |
||
116 | */ |
||
117 | public function jsonSerialize(): array |
||
123 | } |
||
124 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.