@@ -143,10 +143,10 @@ public function __construct(
143
143
144
144
$ this ->isValueObject = static function (ClassBuilder $ classBuilder ): bool {
145
145
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 ' );
150
150
};
151
151
152
152
$ this ->currentFileAst = static function (PhpFile $ classBuilder , ClassInfo $ classInfo ) use ($ parser ): array {
@@ -191,7 +191,7 @@ public function nodeVisitors(TypeDefinition $typeDefinition): array
191
191
default :
192
192
return $ this ->stringFactory ->nodeVisitors ($ typeDefinition );
193
193
}
194
- // no break
194
+ // no break
195
195
case $ typeDefinition instanceof IntegerType:
196
196
return $ this ->integerFactory ->nodeVisitors ($ typeDefinition );
197
197
case $ typeDefinition instanceof BooleanType:
@@ -293,9 +293,10 @@ public function generateClasses(
293
293
}
294
294
$ itemClassName = ($ this ->classNameFilter )($ itemType ->name ());
295
295
$ itemPropertyName = ($ this ->propertyNameFilter )($ itemType ->name ());
296
+ $ itemClassNamespace = $ this ->extractNamespace ($ classNamespacePath , $ rootClassNamespacePath , $ itemType );
296
297
297
298
$ this ->generateClasses (
298
- ClassBuilder::fromScratch ($ itemClassName , $ classNamespacePath )->setFinal (true ),
299
+ ClassBuilder::fromScratch ($ itemClassName , $ itemClassNamespace )->setFinal (true ),
299
300
$ fileCollection ,
300
301
$ itemTypeSet ,
301
302
$ srcFolder ,
0 commit comments