Skip to content

Commit 09581f3

Browse files
Null and true
1 parent 33b0a4a commit 09581f3

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Zend/zend_constants.stub.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,14 @@
124124
/* Special constants true/false/null. */
125125

126126
/**
127-
* @var bool
128127
* @undocumentable
129128
*/
130129
const TRUE = true;
131130
/**
132-
* @var bool
133131
* @undocumentable
134132
*/
135133
const FALSE = false;
136134
/**
137-
* @var null
138135
* @undocumentable
139136
*/
140137
const NULL = null;

Zend/zend_constants_arginfo.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/gen_stub.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4886,9 +4886,17 @@ function parseConstLike(
48864886
$phpDocType = 'string';
48874887
} elseif ($const->value instanceof Expr\ConstFetch
48884888
&& $const->value->name instanceof Node\Name\FullyQualified
4889-
&& $const->value->name->name === 'false'
4889+
&& (
4890+
$const->value->name->name === 'false'
4891+
|| $const->value->name->name === 'true'
4892+
)
48904893
) {
48914894
$phpDocType = 'bool';
4895+
} elseif ($const->value instanceof Expr\ConstFetch
4896+
&& $const->value->name instanceof Node\Name\FullyQualified
4897+
&& $const->value->name->name === 'null'
4898+
) {
4899+
$phpDocType = 'null';
48924900
} else {
48934901
throw new Exception("Missing type for constant " . $name->__toString());
48944902
}

0 commit comments

Comments
 (0)