This repository was archived by the owner on Jan 29, 2020. It is now read-only.
This repository was archived by the owner on Jan 29, 2020. It is now read-only.
Return type self is not an internal type while code generation #161
Open
Description
Is it right behavior that TypeGenerator does not think self type is an internal type?
Because of that my code generation causes wrong return type in resulting file.
public function foo(): self
turns on
public function foo(): \self
It thinks self is a class.
Zend\Code\Generator\TypeGenerator:36
private static $internalPhpTypes = ['void', 'int', 'float', 'string', 'bool', 'array', 'callable', 'iterable'];