1 | <?php |
||
15 | class Pool |
||
16 | { |
||
17 | /** |
||
18 | * @var array |
||
19 | */ |
||
20 | private $promises = []; |
||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | private $transformers = []; |
||
25 | |||
26 | /** |
||
27 | * Awaits all the requests. |
||
28 | * |
||
29 | * @return mixed |
||
30 | */ |
||
31 | public function unwrap() |
||
39 | |||
40 | /** |
||
41 | * @param $query |
||
42 | * |
||
43 | * @return $this |
||
44 | */ |
||
45 | public function addPromise($key, Promise $query) |
||
52 | |||
53 | /** |
||
54 | * @return array |
||
55 | */ |
||
56 | public function getPromises() |
||
60 | |||
61 | /** |
||
62 | * @param array $promise |
||
|
|||
63 | */ |
||
64 | public function setPromises($promises) |
||
70 | |||
71 | /** |
||
72 | * @return array |
||
73 | */ |
||
74 | public function getTransformers() |
||
78 | |||
79 | /** |
||
80 | * @param array $transformers |
||
81 | */ |
||
82 | public function setTransformers($transformers) |
||
88 | |||
89 | /** |
||
90 | * Adds another transformer to collection of transformers. |
||
91 | * |
||
92 | * @param callable $transformer |
||
93 | * |
||
94 | * @return $this |
||
95 | */ |
||
96 | public function addTransformer(callable $transformer) |
||
102 | |||
103 | /** |
||
104 | * @param Promise $promise |
||
105 | */ |
||
106 | public function attachTransforms(Promise $promise) |
||
129 | } |
||
130 |
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.