Skip to content

Commit fe79bbd

Browse files
author
Vincent Le Henaff
committed
+ used phpcbf on /lib
1 parent 3de0efb commit fe79bbd

27 files changed

+117
-137
lines changed

lib/Doctrine/ODM/MongoDB/Aggregation/Expr.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use function is_array;
2020
use function is_string;
2121
use function substr;
22+
use function trigger_deprecation;
2223

2324
/**
2425
* Fluent interface for building aggregation pipelines.

lib/Doctrine/ODM/MongoDB/Aggregation/Stage/MatchStage.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use GeoJson\Geometry\Geometry;
1212

1313
use function func_get_args;
14+
use function trigger_deprecation;
1415

1516
/**
1617
* Fluent interface for building aggregation pipelines.
@@ -192,10 +193,10 @@ public function expr(): Expr
192193
/**
193194
* Specify $expr criteria for the current field.
194195
*
195-
* @param array|Aggregation\Expr $expression
196196
* @see https://docs.mongodb.com/manual/reference/operator/query/expr/
197-
*
198197
* @see Expr::aggregationExpression()
198+
*
199+
* @param array|Aggregation\Expr $expression
199200
*/
200201
public function aggregationExpression($expression): self
201202
{

lib/Doctrine/ODM/MongoDB/Configuration.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ public function setDefaultCommitOptions(array $defaultCommitOptions): void
457457
* Add a filter to the list of possible filters.
458458
*
459459
* @param array<string, mixed> $parameters
460+
*
460461
* @psalm-param class-string $className
461462
*/
462463
public function addFilter(string $name, string $className, array $parameters = []): void
@@ -488,9 +489,9 @@ public function getFilterParameters(string $name): array
488489
}
489490

490491
/**
491-
* @psalm-param class-string<ObjectRepository> $className
492-
*
493492
* @throws MongoDBException If not is a ObjectRepository.
493+
*
494+
* @psalm-param class-string<ObjectRepository> $className
494495
*/
495496
public function setDefaultDocumentRepositoryClassName(string $className): void
496497
{
@@ -512,9 +513,9 @@ public function getDefaultDocumentRepositoryClassName(): string
512513
}
513514

514515
/**
515-
* @psalm-param class-string<GridFSRepository> $className
516-
*
517516
* @throws MongoDBException If the class does not implement the GridFSRepository interface.
517+
*
518+
* @psalm-param class-string<GridFSRepository> $className
518519
*/
519520
public function setDefaultGridFSRepositoryClassName(string $className): void
520521
{

lib/Doctrine/ODM/MongoDB/DocumentManager.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,10 @@ public function getClassNameResolver(): ClassNameResolver
301301
* Returns the metadata for a class.
302302
*
303303
* @param string $className The class name.
304-
* @psalm-param class-string<T> $className
305304
*
305+
* @psalm-param class-string<T> $className
306306
* @psalm-return ClassMetadata<T>
307-
*
308307
* @template T of object
309-
*
310308
* @psalm-suppress InvalidReturnType, InvalidReturnStatement see https://github.com/vimeo/psalm/issues/5788
311309
*/
312310
public function getClassMetadata($className): ClassMetadata
@@ -571,11 +569,11 @@ public function unlock(object $document): void
571569
* Gets the repository for a document class.
572570
*
573571
* @param string $className The name of the Document.
574-
* @psalm-param class-string<T> $className
575572
*
576573
* @return DocumentRepository|GridFSRepository|ViewRepository The repository.
577-
* @psalm-return DocumentRepository<T>|GridFSRepository<T>|ViewRepository<T>
578574
*
575+
* @psalm-param class-string<T> $className
576+
* @psalm-return DocumentRepository<T>|GridFSRepository<T>|ViewRepository<T>
579577
* @template T of object
580578
*/
581579
public function getRepository($className)
@@ -589,9 +587,10 @@ public function getRepository($className)
589587
* database.
590588
*
591589
* @param array $options Array of options to be used with batchInsert(), update() and remove()
592-
* @psalm-param CommitOptions $options
593590
*
594591
* @throws MongoDBException
592+
*
593+
* @psalm-param CommitOptions $options
595594
*/
596595
public function flush(array $options = [])
597596
{
@@ -608,10 +607,9 @@ public function flush(array $options = [])
608607
* loads itself on first access.
609608
*
610609
* @param mixed $identifier
611-
* @psalm-param class-string<T> $documentName
612610
*
611+
* @psalm-param class-string<T> $documentName
613612
* @psalm-return T|(T&GhostObjectInterface<T>)
614-
*
615613
* @template T of object
616614
*/
617615
public function getReference(string $documentName, $identifier): object
@@ -677,10 +675,9 @@ public function getPartialReference(string $documentName, $identifier): object
677675
* @param mixed $id
678676
* @param int $lockMode
679677
* @param int $lockVersion
680-
* @psalm-param class-string<T> $className
681678
*
679+
* @psalm-param class-string<T> $className
682680
* @psalm-return T|null
683-
*
684681
* @template T of object
685682
*/
686683
public function find($className, $id, $lockMode = LockMode::NONE, $lockVersion = null): ?object

lib/Doctrine/ODM/MongoDB/Event/PreUpdateEventArgs.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Doctrine\ODM\MongoDB\Event;
66

77
use Doctrine\ODM\MongoDB\DocumentManager;
8-
use Doctrine\ODM\MongoDB\UnitOfWork;
98
use InvalidArgumentException;
109

1110
use function get_class;

lib/Doctrine/ODM/MongoDB/Hydrator/HydratorFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,10 @@ public function hydrate(object \$document, array \$data, array \$hints = array()
459459
* Hydrate array of MongoDB document data into the given document object.
460460
*
461461
* @param array<string, mixed> $data
462-
* @psalm-param Hints $hints Any hints to account for during reconstitution/lookup of the document.
463462
*
464463
* @return array<string, mixed>
464+
*
465+
* @psalm-param Hints $hints Any hints to account for during reconstitution/lookup of the document.
465466
*/
466467
public function hydrate(object $document, array $data, array $hints = []): array
467468
{

lib/Doctrine/ODM/MongoDB/Hydrator/HydratorInterface.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace Doctrine\ODM\MongoDB\Hydrator;
66

7-
use Doctrine\ODM\MongoDB\UnitOfWork;
8-
97
/**
108
* The HydratorInterface defines methods all hydrator need to implement
119
*
@@ -17,9 +15,10 @@ interface HydratorInterface
1715
* Hydrate array of MongoDB document data into the given document object.
1816
*
1917
* @param array<string, mixed> $data
20-
* @psalm-param Hints $hints
2118
*
2219
* @return array<string, mixed>
20+
*
21+
* @psalm-param Hints $hints
2322
*/
2423
public function hydrate(object $document, array $data, array $hints = []): array;
2524
}

lib/Doctrine/ODM/MongoDB/Iterator/CachingIterator.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Doctrine\ODM\MongoDB\Iterator;
66

77
use Generator;
8-
use ReturnTypeWillChange;
98
use RuntimeException;
109
use Traversable;
1110

lib/Doctrine/ODM/MongoDB/Iterator/HydratingIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Doctrine\ODM\MongoDB\UnitOfWork;
99
use Generator;
1010
use Iterator;
11-
use ReturnTypeWillChange;
1211
use RuntimeException;
1312
use Traversable;
1413

@@ -43,6 +42,7 @@ final class HydratingIterator implements Iterator
4342
/**
4443
* @param Traversable<mixed, TValue> $traversable
4544
* @param ClassMetadata<TDocument> $class
45+
*
4646
* @psalm-param Hints $unitOfWorkHints
4747
*/
4848
public function __construct(Traversable $traversable, UnitOfWork $unitOfWork, ClassMetadata $class, array $unitOfWorkHints = [])

lib/Doctrine/ODM/MongoDB/Iterator/PrimingIterator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
use Doctrine\ODM\MongoDB\Mapping\ClassMetadata;
88
use Doctrine\ODM\MongoDB\Query\ReferencePrimer;
9-
use Doctrine\ODM\MongoDB\UnitOfWork;
10-
use ReturnTypeWillChange;
119

1210
use function is_callable;
1311
use function iterator_to_array;
@@ -45,6 +43,7 @@ final class PrimingIterator implements Iterator
4543
* @param \Iterator<mixed, TValue> $iterator
4644
* @param ClassMetadata<TDocument> $class
4745
* @param array<string, callable|null> $primers
46+
*
4847
* @psalm-param Hints $unitOfWorkHints
4948
*/
5049
public function __construct(\Iterator $iterator, ClassMetadata $class, ReferencePrimer $referencePrimer, array $primers, array $unitOfWorkHints = [])

0 commit comments

Comments
 (0)