@@ -143,10 +143,10 @@ public function __construct(
143143
144144 $ this ->isValueObject = static function (ClassBuilder $ classBuilder ): bool {
145145 return $ classBuilder ->hasMethod ('fromItems ' )
146- || $ classBuilder ->hasMethod ('toString ' )
147- || $ classBuilder ->hasMethod ('toInt ' )
148- || $ classBuilder ->hasMethod ('toFloat ' )
149- || $ classBuilder ->hasMethod ('toBool ' );
146+ || $ classBuilder ->hasMethod ('toString ' )
147+ || $ classBuilder ->hasMethod ('toInt ' )
148+ || $ classBuilder ->hasMethod ('toFloat ' )
149+ || $ classBuilder ->hasMethod ('toBool ' );
150150 };
151151
152152 $ this ->currentFileAst = static function (PhpFile $ classBuilder , ClassInfo $ classInfo ) use ($ parser ): array {
@@ -191,7 +191,7 @@ public function nodeVisitors(TypeDefinition $typeDefinition): array
191191 default :
192192 return $ this ->stringFactory ->nodeVisitors ($ typeDefinition );
193193 }
194- // no break
194+ // no break
195195 case $ typeDefinition instanceof IntegerType:
196196 return $ this ->integerFactory ->nodeVisitors ($ typeDefinition );
197197 case $ typeDefinition instanceof BooleanType:
@@ -293,9 +293,10 @@ public function generateClasses(
293293 }
294294 $ itemClassName = ($ this ->classNameFilter )($ itemType ->name ());
295295 $ itemPropertyName = ($ this ->propertyNameFilter )($ itemType ->name ());
296+ $ itemClassNamespace = $ this ->extractNamespace ($ classNamespacePath , $ rootClassNamespacePath , $ itemType );
296297
297298 $ this ->generateClasses (
298- ClassBuilder::fromScratch ($ itemClassName , $ classNamespacePath )->setFinal (true ),
299+ ClassBuilder::fromScratch ($ itemClassName , $ itemClassNamespace )->setFinal (true ),
299300 $ fileCollection ,
300301 $ itemTypeSet ,
301302 $ srcFolder ,
0 commit comments