1 | <?php |
||
20 | class PhpClass extends AbstractPhpStruct implements GenerateableInterface, TraitsInterface, ConstantsInterface { |
||
21 | |||
22 | use AbstractPart; |
||
23 | use ConstantsPart; |
||
24 | use FinalPart; |
||
25 | use InterfacesPart; |
||
26 | use PropertiesPart; |
||
27 | use TraitsPart; |
||
28 | |||
29 | /** @var string */ |
||
30 | private $parentClassName; |
||
31 | |||
32 | /** |
||
33 | * Creates a PHP class from reflection |
||
34 | * |
||
35 | * @param \ReflectionClass $ref |
||
36 | * @return PhpClass |
||
37 | */ |
||
38 | 3 | public static function fromReflection(\ReflectionClass $ref) { |
|
90 | |||
91 | /** |
||
92 | * Creates a PHP class from file |
||
93 | * |
||
94 | * @param string $filename |
||
95 | * @return PhpClass |
||
96 | */ |
||
97 | 6 | public static function fromFile($filename) { |
|
102 | |||
103 | /** |
||
104 | * Creates a new PHP class |
||
105 | * |
||
106 | * @param string $name the qualified name |
||
107 | */ |
||
108 | 42 | public function __construct($name = null) { |
|
111 | |||
112 | /** |
||
113 | * Returns the parent class name |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | 12 | public function getParentClassName() { |
|
120 | |||
121 | /** |
||
122 | * Sets the parent class name |
||
123 | * |
||
124 | * @param string|null $name the new parent |
||
125 | * @return $this |
||
126 | */ |
||
127 | 1 | public function setParentClassName($name) { |
|
132 | |||
133 | 5 | public function generateDocblock() { |
|
144 | |||
145 | } |
||
146 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: