Skip to content

Commit b148539

Browse files
committed
Add missing phpdoc
1 parent 45da255 commit b148539

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadata.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,6 +1309,9 @@ public function getReflectionProperty(string $name): ReflectionProperty
13091309
return $this->reflFields[$name];
13101310
}
13111311

1312+
/**
1313+
* @psalm-return class-string<T>
1314+
*/
13121315
public function getName(): string
13131316
{
13141317
return $this->name;

lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ final class DocumentPersister
118118
/** @var HydratorFactory */
119119
private $hydratorFactory;
120120

121+
/**
122+
* @psalm-param ClassMetadata<T> $class
123+
*/
121124
public function __construct(
122125
PersistenceBuilder $pb,
123126
DocumentManager $dm,

lib/Doctrine/ODM/MongoDB/UnitOfWork.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2751,6 +2751,7 @@ public function getOrCreateDocument(string $className, array $data, array &$hint
27512751
}
27522752
} else {
27532753
if ($document === null) {
2754+
/** @psalm-var T $document */
27542755
$document = $class->newInstance();
27552756
}
27562757

0 commit comments

Comments
 (0)