mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix generation of arginfo if type is just null
This commit is contained in:
parent
7daa8b77a6
commit
7710f9946b
2 changed files with 5 additions and 1 deletions
|
@ -510,6 +510,10 @@ class Type {
|
|||
|
||||
public function tryToSimpleType(): ?SimpleType {
|
||||
$withoutNull = $this->getWithoutNull();
|
||||
/* type has only null */
|
||||
if (count($withoutNull->types) === 0) {
|
||||
return $this->types[0];
|
||||
}
|
||||
if (count($withoutNull->types) === 1) {
|
||||
return $withoutNull->types[0];
|
||||
}
|
||||
|
|
|
@ -257,7 +257,7 @@ ZEND_END_ARG_INFO()
|
|||
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileObject_hasChildren, 0, 0, IS_FALSE, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SplFileObject_getChildren, 0, 0, MAY_BE_NULL)
|
||||
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileObject_getChildren, 0, 0, IS_NULL, 1)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileObject_seek, 0, 1, IS_VOID, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue