@@ -20,7 +20,7 @@ class Type implements Normalizable
20
20
public array $ types = [];
21
21
/** @var array<string, string[]> */
22
22
public array $ innerTypes = [];
23
- /** @var array<class-string, string > */
23
+ /** @var array<class-string, ClassBlueprint > */
24
24
public array $ blueprints = [];
25
25
26
26
public static function create (PropertyBlueprint |ParameterBlueprint $ parent ): self
@@ -44,7 +44,7 @@ public static function create(PropertyBlueprint|ParameterBlueprint $parent): sel
44
44
45
45
foreach ($ classTypes as $ class ) {
46
46
$ blueprint = ClassBlueprint::create ($ class , $ parent , $ aggregate );
47
- $ instance ->blueprints [$ class ] = $ blueprint-> blueprintName ;
47
+ $ instance ->blueprints [$ class ] = $ blueprint ;
48
48
$ aggregate ->addBlueprint ($ blueprint );
49
49
}
50
50
}
@@ -83,7 +83,7 @@ public function normalize(): array
83
83
'type ' => $ this ->type ->value ,
84
84
'types ' => $ this ->types ,
85
85
'innerTypes ' => $ this ->innerTypes ,
86
- 'blueprints ' => $ this ->blueprints ,
86
+ 'blueprints ' => array_map ( fn ( ClassBlueprint $ b ) => $ b -> blueprintName , $ this ->blueprints ) ,
87
87
];
88
88
}
89
89
}
0 commit comments