From c91231d1f94d61444329456613048f6afa9934f0 Mon Sep 17 00:00:00 2001 From: Daniel Kurowski <daniel.kurowski@grifart.cz> Date: Tue, 14 Dec 2021 08:25:56 +0100 Subject: [PATCH] Reconstitute: set array shape in method body instead of signature (because of phpstan strict rules compatibility) --- src/Scaffolding/ReconstituteConstructor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Scaffolding/ReconstituteConstructor.php b/src/Scaffolding/ReconstituteConstructor.php index f4e8980..8757173 100644 --- a/src/Scaffolding/ReconstituteConstructor.php +++ b/src/Scaffolding/ReconstituteConstructor.php @@ -33,7 +33,7 @@ final class ReconstituteConstructor implements Capability $literals[] = new PhpLiteral("\$values['" . $name . "']"); } - $reconstitute->addComment(\sprintf('@param array{%s} $values', \implode(', ', $shapeFields))); + $reconstitute->addBody(\sprintf('/** @var array{%s} $values */', \implode(', ', $shapeFields))); $reconstitute->addBody("return new static(...?);", [$literals]); } } -- GitLab