Commit 36e1469fe15 for php.net
commit 36e1469fe15e1220384f0a8065908544fde3481a
Author: Daniel Scherzer <daniel.e.scherzer@gmail.com>
Date: Wed Mar 18 14:35:08 2026 -0700
gen_stub: use first class callables where possible
diff --git a/build/gen_stub.php b/build/gen_stub.php
index 34dd4b33e25..25933cccfa5 100755
--- a/build/gen_stub.php
+++ b/build/gen_stub.php
@@ -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);