Skip to content

Commit 9d98025

Browse files
committed
feat: Added links to blueprints instead of names
1 parent 4253abb commit 9d98025

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Blueprint/Application/Model/Type.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Type implements Normalizable
2020
public array $types = [];
2121
/** @var array<string, string[]> */
2222
public array $innerTypes = [];
23-
/** @var array<class-string, string> */
23+
/** @var array<class-string, ClassBlueprint> */
2424
public array $blueprints = [];
2525

2626
public static function create(PropertyBlueprint|ParameterBlueprint $parent): self
@@ -44,7 +44,7 @@ public static function create(PropertyBlueprint|ParameterBlueprint $parent): sel
4444

4545
foreach ($classTypes as $class) {
4646
$blueprint = ClassBlueprint::create($class, $parent, $aggregate);
47-
$instance->blueprints[$class] = $blueprint->blueprintName;
47+
$instance->blueprints[$class] = $blueprint;
4848
$aggregate->addBlueprint($blueprint);
4949
}
5050
}
@@ -83,7 +83,7 @@ public function normalize(): array
8383
'type' => $this->type->value,
8484
'types' => $this->types,
8585
'innerTypes' => $this->innerTypes,
86-
'blueprints' => $this->blueprints,
86+
'blueprints' => array_map(fn (ClassBlueprint $b) => $b->blueprintName, $this->blueprints),
8787
];
8888
}
8989
}

0 commit comments

Comments
 (0)