From: Máté Kocsis Date: Sun, 23 Aug 2020 19:17:05 +0000 (+0200) Subject: Remove custom hacks from gen_stub.php after PHP-Parser upgrade X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=118406a31cb8a599bbce41710b608315ec67c943;p=php Remove custom hacks from gen_stub.php after PHP-Parser upgrade --- diff --git a/build/gen_stub.php b/build/gen_stub.php index 24e34430bd..fb79255e84 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -80,10 +80,6 @@ class SimpleType { public static function fromNode(Node $node) { if ($node instanceof Node\Name) { - if ($node->toString() === "mixed") { - return new SimpleType($node->toString(), true); - } - assert($node->isFullyQualified()); return new SimpleType($node->toString(), false); } @@ -680,7 +676,7 @@ function parseFunctionLike( $type && !$type->isNullable() ) { $simpleType = $type->tryToSimpleType(); - if ($simpleType === null || $simpleType->name !== "mixed") { + if ($simpleType === null) { throw new Exception( "Parameter $varName of function $name has null default, but is not nullable"); }