1414use Rector \BetterPhpDocParser \PhpDoc \StringNode ;
1515use Rector \BetterPhpDocParser \PhpDocInfo \PhpDocInfoFactory ;
1616use Rector \Doctrine \CodeQuality \Enum \CollectionMapping ;
17+ use Rector \Doctrine \CodeQuality \Enum \DocumentMappingKey ;
1718use Rector \Doctrine \CodeQuality \Enum \EntityMappingKey ;
18- use Rector \Doctrine \CodeQuality \Enum \OdmMappingKey ;
1919use Rector \Doctrine \Enum \DoctrineClass ;
2020use Rector \Doctrine \NodeAnalyzer \AttributeFinder ;
2121use Rector \Doctrine \PhpDoc \ShortClassExpander ;
@@ -48,7 +48,7 @@ public function resolve(Property $property): ?Type
4848 $ expr = $ this ->attributeFinder ->findAttributeByClassesArgByNames (
4949 $ property ,
5050 CollectionMapping::TO_MANY_CLASSES ,
51- [EntityMappingKey::TARGET_ENTITY , OdmMappingKey ::TARGET_DOCUMENT ]
51+ [EntityMappingKey::TARGET_ENTITY , DocumentMappingKey ::TARGET_DOCUMENT ]
5252 );
5353
5454 if (! $ expr instanceof Expr) {
@@ -64,7 +64,7 @@ private function processToManyRelation(
6464 ): Type |null {
6565 $ targetEntityArrayItemNode = $ doctrineAnnotationTagValueNode ->getValue (
6666 EntityMappingKey::TARGET_ENTITY
67- ) ?: $ doctrineAnnotationTagValueNode ->getValue (OdmMappingKey ::TARGET_DOCUMENT );
67+ ) ?: $ doctrineAnnotationTagValueNode ->getValue (DocumentMappingKey ::TARGET_DOCUMENT );
6868 if (! $ targetEntityArrayItemNode instanceof ArrayItemNode) {
6969 // most likely mapped superclass
7070 return new ObjectType (DoctrineClass::COLLECTION );
0 commit comments