1 | <?php |
||
15 | class Resource |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * pulled in from the API |
||
20 | * every resource needs to have a serializer attached to it |
||
21 | * |
||
22 | * @var BaseSerializer |
||
23 | */ |
||
24 | protected $serializer = null; |
||
25 | |||
26 | /** |
||
27 | * can either be the ID or some other unique name |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $name = null; |
||
32 | |||
33 | /** |
||
34 | * |
||
35 | * @param string $name |
||
36 | * @param BaseSerializer $serializers |
||
|
|||
37 | */ |
||
38 | public function __construct($name = '', $serializer = null) |
||
43 | |||
44 | /** |
||
45 | * |
||
46 | * @param string $name |
||
47 | * @return \Solvire\API\JSONSchema\Resource |
||
48 | */ |
||
49 | public function setName($name) |
||
54 | |||
55 | /** |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getName() |
||
63 | |||
64 | public function setSerializer(BaseSerializer $serializer) |
||
69 | } |
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.