Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
12 | interface ResourceInterface |
||
13 | { |
||
14 | /** |
||
15 | * All models which represent an API resource should be able to be populated |
||
16 | * from a {@see ResponseInterface} object. |
||
17 | * |
||
18 | * @param ResponseInterface $response |
||
19 | * |
||
20 | * @return self |
||
21 | */ |
||
22 | public function populateFromResponse(ResponseInterface $response); |
||
23 | |||
24 | /** |
||
25 | * @param array $data |
||
26 | * @return mixed |
||
27 | */ |
||
28 | public function populateFromArray(array $data); |
||
29 | |||
30 | /** |
||
31 | * @param string $name The name of the model class. |
||
|
|||
32 | * @param mixed $data Either a {@see ResponseInterface} or data array that will populate the newly |
||
33 | * created model class. |
||
34 | * |
||
35 | * @return \OpenStack\Common\Resource\ResourceInterface |
||
36 | */ |
||
37 | public function model(string $class, $data = null): ResourceInterface; |
||
38 | } |
||
39 |
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.