1 | <?php |
||
24 | class ObjectType extends AbstractType |
||
25 | { |
||
26 | /** |
||
27 | * The name of the class this must be an instance of |
||
28 | * |
||
29 | * @readable |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $classname; |
||
33 | |||
34 | /** |
||
35 | * Generic types for this object |
||
36 | * |
||
37 | * @readable |
||
38 | * @var ArrayList |
||
39 | */ |
||
40 | protected $generics; |
||
41 | |||
42 | /** |
||
43 | * Creates this ObjectType with the given classname |
||
44 | * |
||
45 | * @param string $class The name of the class this must be an |
||
|
|||
46 | * instance of |
||
47 | */ |
||
48 | 27 | public function __construct(string $classname) |
|
53 | |||
54 | /** |
||
55 | * {@inheritDoc} |
||
56 | */ |
||
57 | public function compatible(AbstractType $type) : bool |
||
61 | |||
62 | /** |
||
63 | * Compares the given type to this |
||
64 | * |
||
65 | * @param AbstractType $type |
||
66 | * @return int |
||
67 | */ |
||
68 | public function compare($type) : int |
||
90 | |||
91 | /** |
||
92 | * {@inheritDoc} |
||
93 | */ |
||
94 | public function equals($object) : bool |
||
98 | } |
||
99 |
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.