Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | interface DescriptionInterface |
||
11 | { |
||
12 | /** |
||
13 | * Return the descriptors value for the given descriptor. |
||
14 | * |
||
15 | * @param string $descriptor |
||
|
|||
16 | * |
||
17 | * @return mixed |
||
18 | */ |
||
19 | public function get($descriptorKey): DescriptorInterface; |
||
20 | |||
21 | /** |
||
22 | * Return true if the given descriptor has been set. |
||
23 | * |
||
24 | * @param string $descriptor |
||
25 | * |
||
26 | * @return bool |
||
27 | */ |
||
28 | public function has($descriptor): bool; |
||
29 | |||
30 | /** |
||
31 | * Return all of the descriptors. |
||
32 | * |
||
33 | * @return array |
||
34 | */ |
||
35 | public function all(): array; |
||
36 | |||
37 | /** |
||
38 | * Set value for descriptors descriptor. |
||
39 | * |
||
40 | * Note that: |
||
41 | * |
||
42 | * - It is possible to overwrite existing descriptors. |
||
43 | * |
||
44 | * - Where possible the descriptor should be the value of one of the constants |
||
45 | * defined in the Descriptor class. |
||
46 | * |
||
47 | * @param string $key |
||
48 | * @param string $descriptor |
||
49 | * @param int $priority |
||
50 | */ |
||
51 | public function set(string $key, DescriptorInterface $descriptor, int $priority = 0); |
||
52 | } |
||
53 |
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.