From 118406a31cb8a599bbce41710b608315ec67c943 Mon Sep 17 00:00:00 2001 From: =?utf8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 23 Aug 2020 21:17:05 +0200 Subject: [PATCH] Remove custom hacks from gen_stub.php after PHP-Parser upgrade --- build/gen_stub.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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"); } -- 2.40.0