1 | <?php |
||
23 | class PhpClass extends AbstractPhpStruct implements GenerateableInterface, TraitsInterface, ConstantsInterface, PropertiesInterface, PhpTypeInterface { |
||
24 | |||
25 | use AbstractPart; |
||
26 | use ConstantsPart; |
||
27 | use FinalPart; |
||
28 | use InterfacesPart; |
||
29 | use PropertiesPart; |
||
30 | use TraitsPart; |
||
31 | |||
32 | /** @var string */ |
||
33 | private $parentClassName; |
||
34 | |||
35 | /** |
||
36 | * Creates a PHP class from file |
||
37 | * |
||
38 | * @param string $filename |
||
39 | * @return PhpClass |
||
40 | */ |
||
41 | 13 | public static function fromFile(string $filename): self { |
|
52 | |||
53 | /** |
||
54 | * Creates a new PHP class |
||
55 | * |
||
56 | * @param string $name the qualified name |
||
57 | */ |
||
58 | 47 | public function __construct($name = null) { |
|
64 | |||
65 | /** |
||
66 | * Returns the parent class name |
||
67 | * |
||
68 | * @return string |
||
69 | */ |
||
70 | 16 | public function getParentClassName(): ?string { |
|
73 | |||
74 | public function getParentClass(): PhpClass { |
||
78 | |||
79 | /** |
||
80 | * Sets the parent class name |
||
81 | * |
||
82 | * @param PhpClass|string|null $name the new parent |
||
|
|||
83 | * @return $this |
||
84 | */ |
||
85 | 6 | public function setParentClassName($parent) { |
|
94 | |||
95 | 5 | public function generateDocblock(): void { |
|
106 | |||
107 | } |
||
108 |
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.