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) { |
|
82 | |||
83 | /** |
||
84 | * Creates a PHP class from file |
||
85 | * |
||
86 | * @param string $filename |
||
87 | * @return PhpClass |
||
88 | */ |
||
89 | 6 | public static function fromFile($filename) { |
|
94 | |||
95 | /** |
||
96 | * Creates a new PHP class |
||
97 | * |
||
98 | * @param string $name the qualified name |
||
99 | */ |
||
100 | 42 | public function __construct($name = null) { |
|
103 | |||
104 | /** |
||
105 | * Returns the parent class name |
||
106 | * |
||
107 | * @return string |
||
108 | */ |
||
109 | 12 | public function getParentClassName() { |
|
112 | |||
113 | /** |
||
114 | * Sets the parent class name |
||
115 | * |
||
116 | * @param string|null $name the new parent |
||
117 | * @return $this |
||
118 | */ |
||
119 | 1 | public function setParentClassName($name) { |
|
124 | |||
125 | 5 | public function generateDocblock() { |
|
136 | |||
137 | } |
||
138 |
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: