Skip to content

Commit

Permalink
Remove custom hacks from gen_stub.php after PHP-Parser upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Aug 23, 2020
1 parent 4bba59d commit 118406a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions build/gen_stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ public function __construct(string $name, bool $isBuiltin) {

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);
}
Expand Down Expand Up @@ -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");
}
Expand Down

0 comments on commit 118406a

Please sign in to comment.