mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
gen_stub: use first class callables where possible
This commit is contained in:
@@ -486,7 +486,7 @@ class Type {
|
||||
|
||||
public static function fromNode(Node $node): Type {
|
||||
if ($node instanceof Node\UnionType || $node instanceof Node\IntersectionType) {
|
||||
$nestedTypeObjects = array_map(['Type', 'fromNode'], $node->types);
|
||||
$nestedTypeObjects = array_map(Type::fromNode(...), $node->types);
|
||||
$types = [];
|
||||
foreach ($nestedTypeObjects as $typeObject) {
|
||||
array_push($types, ...$typeObject->types);
|
||||
|
||||
Reference in New Issue
Block a user