]> granicus.if.org Git - php/commitdiff
Remove custom hacks from gen_stub.php after PHP-Parser upgrade
authorMáté Kocsis <kocsismate@woohoolabs.com>
Sun, 23 Aug 2020 19:17:05 +0000 (21:17 +0200)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Sun, 23 Aug 2020 19:17:05 +0000 (21:17 +0200)
build/gen_stub.php

index 24e34430bdefb693c482cc16c033922dc4f0c316..fb79255e849487caf6bce4c7f389663c2856a565 100755 (executable)
@@ -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");
             }