PHP 7.0 compatibility

This commit is contained in:
Bruce Weirdan 2019-02-23 16:19:57 +02:00
parent 3452ea5d76
commit 586c2ef133
No known key found for this signature in database
GPG Key ID: CFC3AAB181751B0D

View File

@ -349,9 +349,11 @@ class TestCaseHandler implements AfterClassLikeVisitInterface, AfterClassLikeAna
]);
}
$combine = function (?Type\Union $a, Type\Union $b) use ($codebase): Type\Union {
return $a ? Type::combineUnionTypes($a, $b, $codebase) : $b;
};
$combine =
/** @param null|Type\Union $a */
function ($a, Type\Union $b) use ($codebase): Type\Union {
return $a ? Type::combineUnionTypes($a, $b, $codebase) : $b;
};
return new Type\Atomic\TIterable([
array_reduce($key_types, $combine),