Skip to content

Commit 6bc447f

Browse files
authored
Fix accepted stage type in FluentFactoryTrait (#71)
1 parent aa4f34c commit 6bc447f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

generator/src/FluentStageFactoryGenerator.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Nette\PhpGenerator\PhpNamespace;
1616
use Nette\PhpGenerator\TraitType;
1717
use ReflectionClass;
18+
use stdClass;
1819

1920
use function array_key_last;
2021
use function array_map;
@@ -45,10 +46,11 @@ private function createFluentFactoryTrait(GeneratorDefinition $definition): PhpN
4546
$namespace->addUse(self::FACTORY_CLASS);
4647
$namespace->addUse(StageInterface::class);
4748
$namespace->addUse(Pipeline::class);
49+
$namespace->addUse(stdClass::class);
4850

4951
$trait->addProperty('pipeline')
5052
->setType('array')
51-
->setComment('@var list<StageInterface>')
53+
->setComment('@var list<StageInterface|array<string,mixed>|stdClass>')
5254
->setValue([]);
5355
$trait->addMethod('getPipeline')
5456
->setReturnType(Pipeline::class)

src/Builder/Stage/FluentFactoryTrait.php

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)