Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Oct 9, 2024
1 parent 64904ba commit 3155802
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion lib/Doctrine/ODM/MongoDB/DocumentManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,6 @@ public function find($className, $id, $lockMode = LockMode::NONE, $lockVersion =
{
$repository = $this->getRepository($className);
if ($repository instanceof DocumentRepository) {
/** @var DocumentRepository<T> $repository */
return $repository->find($id, $lockMode, $lockVersion);
}

Expand Down
5 changes: 1 addition & 4 deletions lib/Doctrine/ODM/MongoDB/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1620,10 +1620,7 @@ private function getDiscriminatorValues(array $classNames): array
return $discriminatorValues;
}

/**
* @param string[]|string|null $documentName an array of document names or just one.
* @param class-string[]|class-string|null $documentName
*/
/** @param class-string[]|class-string|null $documentName an array of document names or just one. */
private function setDocumentName($documentName): void
{
if (is_array($documentName)) {
Expand Down
3 changes: 1 addition & 2 deletions lib/Doctrine/ODM/MongoDB/Repository/DocumentRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $
* @param array<string, mixed>|null $sort
* @param array<string, mixed> $criteria
*
* @return object|null The object.
* @return T|null
* @return T|null The object.
*/
public function findOneBy(array $criteria, ?array $sort = null): ?object
{
Expand Down
3 changes: 1 addition & 2 deletions lib/Doctrine/ODM/MongoDB/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public function getParentAssociation(object $document): ?array
*
* @param class-string<T> $documentName
*
* @phpstan-return Persisters\DocumentPersister<T>
* @return Persisters\DocumentPersister<T>
*
* @template T of object
*/
Expand All @@ -363,7 +363,6 @@ public function getDocumentPersister(string $documentName): Persisters\DocumentP
$this->persisters[$documentName] = new Persisters\DocumentPersister($pb, $this->dm, $this, $this->hydratorFactory, $class);
}

/** @var Persisters\DocumentPersister<T> */
return $this->persisters[$documentName];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ private function getRepository(string $className = File::class): GridFSRepositor

assert($repository instanceof GridFSRepository);

/** @var GridFSRepository<T> */
return $repository;
}

Expand Down

0 comments on commit 3155802

Please sign in to comment.