Skip to content

Commit 5bf4499

Browse files
committed
improve entity detection
1 parent 278572f commit 5bf4499

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/ValueObject/FileWithClass.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ public function isSerialized(): bool
7171
public function isEntity(): bool
7272
{
7373
$fileContents = FileSystem::read($this->filePath);
74+
75+
if (str_contains($fileContents, 'Doctrine\ODM\MongoDB\Mapping\Annotations')) {
76+
return true;
77+
}
78+
79+
if (str_contains($fileContents, 'Doctrine\ORM\Annotations')) {
80+
return true;
81+
}
82+
7483
if (str_contains($fileContents, '@ORM\Entity')) {
7584
return true;
7685
}

0 commit comments

Comments
 (0)