Skip to content

Commit 76b429d

Browse files
committed
fix style
1 parent 022367a commit 76b429d

File tree

13 files changed

+25
-126
lines changed

13 files changed

+25
-126
lines changed

src/Aggregation/Stage/AbstractReplace.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ protected function getReplaceExpression(): array|string
3535
return $this->expression !== null ? $this->convertExpression($this->expression) : $this->expr->getExpression();
3636
}
3737

38-
/**
39-
* @param mixed[]|string|mixed $expression
40-
*
41-
* @return mixed[]|string|mixed
42-
*/
4338
private function convertExpression(mixed $expression): mixed
4439
{
4540
if (is_array($expression)) {

src/Aggregation/Stage/Bucket/AbstractOutput.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct(Builder $builder, protected Stage\AbstractBucket $bu
2525
{
2626
parent::__construct($builder);
2727

28-
$this->expr = $builder->expr();
28+
$this->expr = $builder->expr();
2929
}
3030

3131
public function getExpression(): array
@@ -39,8 +39,6 @@ public function getExpression(): array
3939
* @see https://docs.mongodb.com/manual/meta/aggregation-quick-reference/#aggregation-expressions
4040
* @see Expr::expression
4141
*
42-
* @param mixed|Expr $value
43-
*
4442
* @return $this
4543
*/
4644
public function expression(mixed $value): static
@@ -55,8 +53,6 @@ public function expression(mixed $value): static
5553
*
5654
* @see Expr::field
5755
*
58-
* @param string $fieldName
59-
*
6056
* @return $this
6157
*/
6258
public function field(string $fieldName): static

src/Aggregation/Stage/MatchStage.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ public function elemMatch(array|Expr $expression): static
124124
* Specify an equality match for the current field.
125125
*
126126
* @see Expr::equals()
127-
*
128-
* @param mixed $value
129127
*/
130128
public function equals(mixed $value): static
131129
{
@@ -294,8 +292,6 @@ public function getExpression(): ?array
294292
*
295293
* @see Expr::gt()
296294
* @see https://docs.mongodb.com/manual/reference/operator/gt/
297-
*
298-
* @param mixed $value
299295
*/
300296
public function gt(mixed $value): static
301297
{
@@ -309,8 +305,6 @@ public function gt(mixed $value): static
309305
*
310306
* @see Expr::gte()
311307
* @see https://docs.mongodb.com/manual/reference/operator/gte/
312-
*
313-
* @param mixed $value
314308
*/
315309
public function gte(mixed $value): static
316310
{
@@ -361,8 +355,6 @@ public function language(string $language): static
361355
*
362356
* @see Expr::lte()
363357
* @see https://docs.mongodb.com/manual/reference/operator/lte/
364-
*
365-
* @param mixed $value
366358
*/
367359
public function lt(mixed $value): static
368360
{
@@ -376,8 +368,6 @@ public function lt(mixed $value): static
376368
*
377369
* @see Expr::lte()
378370
* @see https://docs.mongodb.com/manual/reference/operator/lte/
379-
*
380-
* @param mixed $value
381371
*/
382372
public function lte(mixed $value): static
383373
{
@@ -391,9 +381,6 @@ public function lte(mixed $value): static
391381
*
392382
* @see Expr::mod()
393383
* @see https://docs.mongodb.com/manual/reference/operator/mod/
394-
*
395-
* @param float|int $divisor
396-
* @param float|int $remainder
397384
*/
398385
public function mod(float|int $divisor, float|int $remainder = 0): static
399386
{
@@ -425,8 +412,6 @@ public function not(array|Expr $expression): static
425412
*
426413
* @see Expr::notEqual()
427414
* @see https://docs.mongodb.com/manual/reference/operator/ne/
428-
*
429-
* @param mixed $value
430415
*/
431416
public function notEqual(mixed $value): static
432417
{
@@ -457,9 +442,6 @@ public function notIn(array $values): static
457442
* and $lt criteria on the upper bound. The upper bound is not inclusive.
458443
*
459444
* @see Expr::range()
460-
*
461-
* @param mixed $start
462-
* @param mixed $end
463445
*/
464446
public function range(mixed $start, mixed $end): static
465447
{
@@ -510,8 +492,6 @@ public function text(string $search): static
510492
*
511493
* @see Expr::type()
512494
* @see https://docs.mongodb.com/manual/reference/operator/type/
513-
*
514-
* @param int|string $type
515495
*/
516496
public function type(int|string $type): static
517497
{

src/DocumentManager.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,6 @@ public function flush(array $options = []): void
605605
* has its identifier populated. Otherwise a proxy is returned that automatically
606606
* loads itself on first access.
607607
*
608-
* @param mixed $identifier
609608
* @param class-string<T> $documentName
610609
*
611610
* @return T
@@ -705,8 +704,6 @@ public function clear(): void
705704
* Closes the DocumentManager. All documents that are currently managed
706705
* by this DocumentManager become detached. The DocumentManager may no longer
707706
* be used after it is closed.
708-
*
709-
* @return void
710707
*/
711708
public function close(): void
712709
{
@@ -717,8 +714,6 @@ public function close(): void
717714
/**
718715
* Determines whether a document instance is managed in this DocumentManager.
719716
*
720-
* @param object $object
721-
*
722717
* @return bool TRUE if this DocumentManager currently manages the given document, FALSE otherwise.
723718
*
724719
* @throws InvalidArgumentException When the $object param is not an object.

src/Mapping/ClassMetadata.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@
489489
/**
490490
* READ-ONLY: The name of the mongo collection the document is mapped to.
491491
*/
492-
public string $collection;
492+
public ?string $collection = null;
493493

494494
/**
495495
* READ-ONLY: The name of the GridFS bucket the document is mapped to.
@@ -2207,9 +2207,7 @@ public function getTypeOfField(string $fieldName): ?string
22072207
return $this->fieldMappings[$fieldName]['type'] ?? null;
22082208
}
22092209

2210-
/**
2211-
* @return class-string|null
2212-
*/
2210+
/** @return class-string|null */
22132211
public function getAssociationTargetClass(string $assocName): ?string
22142212
{
22152213
if (! isset($this->associationMappings[$assocName])) {

src/Mapping/Driver/SimplifiedXmlDriver.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ class SimplifiedXmlDriver extends XmlDriver
1313
{
1414
public const string DEFAULT_FILE_EXTENSION = '.mongodb-odm.xml';
1515

16+
/**
17+
* @param string[]|string $prefixes
18+
*/
1619
public function __construct(array|string $prefixes, ?string $fileExtension = self::DEFAULT_FILE_EXTENSION)
1720
{
1821
$locator = new SymfonyFileLocator((array) $prefixes, $fileExtension);

src/Persisters/DocumentPersister.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ private function loadReferenceManyCollectionOwningSide(PersistentCollectionInter
767767
$class = $this->dm->getClassMetadata($className);
768768
$mongoCollection = $this->dm->getDocumentCollection($className);
769769
$criteria = $this->cm->merge(
770-
['_id' => ['$in' => array_values($ids)]],
770+
['_id' => ['$in' => $ids]],
771771
$this->dm->getFilterCollection()->getFilterCriteria($class),
772772
$mapping['criteria'] ?? [],
773773
);

src/Query/Builder.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
use function func_get_args;
2626
use function in_array;
2727
use function is_array;
28-
use function is_bool;
29-
use function is_callable;
3028
use function is_string;
3129
use function strtolower;
3230

@@ -186,8 +184,6 @@ public function addOr(array|Expr $expression, array|Expr ...$expressions): self
186184
* @see Expr::addToSet()
187185
* @see https://docs.mongodb.com/manual/reference/operator/addToSet/
188186
* @see https://docs.mongodb.com/manual/reference/operator/each/
189-
*
190-
* @param mixed|Expr $valueOrExpression
191187
*/
192188
public function addToSet(mixed $valueOrExpression): self
193189
{
@@ -811,8 +807,6 @@ public function in(array $values): self
811807
*
812808
* @see Expr::inc()
813809
* @see https://docs.mongodb.com/manual/reference/operator/inc/
814-
*
815-
* @param float|int $value
816810
*/
817811
public function inc(float|int $value): self
818812
{
@@ -932,9 +926,6 @@ public function min(mixed $value): self
932926
*
933927
* @see Expr::mod()
934928
* @see https://docs.mongodb.com/manual/reference/operator/mod/
935-
*
936-
* @param float|int $divisor
937-
* @param float|int $remainder
938929
*/
939930
public function mod(float|int $divisor, float|int $remainder = 0): self
940931
{
@@ -950,8 +941,6 @@ public function mod(float|int $divisor, float|int $remainder = 0): self
950941
*
951942
* @see Expr::mul()
952943
* @see https://docs.mongodb.com/manual/reference/operator/update/mul/
953-
*
954-
* @param float|int $value
955944
*/
956945
public function mul(float|int $value): self
957946
{
@@ -971,7 +960,6 @@ public function mul(float|int $value): self
971960
* @see https://docs.mongodb.com/manual/reference/operator/near/
972961
*
973962
* @param float|array<string, mixed>|Point $x
974-
* @param float|null $y
975963
*/
976964
public function near(float|array|Point $x, ?float $y = null, ?float $minDistance = null, ?float $maxDistance = null): self
977965
{
@@ -991,7 +979,6 @@ public function near(float|array|Point $x, ?float $y = null, ?float $minDistance
991979
* @see https://docs.mongodb.com/manual/reference/operator/nearSphere/
992980
*
993981
* @param float|array<string, mixed>|Point $x
994-
* @param float|null $y
995982
*/
996983
public function nearSphere(float|array|Point $x, ?float $y = null, ?float $minDistance = null, ?float $maxDistance = null): self
997984
{
@@ -1007,8 +994,6 @@ public function nearSphere(float|array|Point $x, ?float $y = null, ?float $minDi
1007994
*
1008995
* @see Expr::not()
1009996
* @see https://docs.mongodb.com/manual/reference/operator/not/
1010-
*
1011-
* @param array|Expr|mixed $valueOrExpression
1012997
*/
1013998
public function not(mixed $valueOrExpression): self
1014999
{
@@ -1123,8 +1108,6 @@ public function prime(bool|callable $primer = true): self
11231108
*
11241109
* @see Expr::pull()
11251110
* @see https://docs.mongodb.com/manual/reference/operator/pull/
1126-
*
1127-
* @param mixed|Expr $valueOrExpression
11281111
*/
11291112
public function pull(mixed $valueOrExpression): self
11301113
{
@@ -1165,8 +1148,6 @@ public function pullAll(array $values): self
11651148
* @see https://docs.mongodb.com/manual/reference/operator/each/
11661149
* @see https://docs.mongodb.com/manual/reference/operator/slice/
11671150
* @see https://docs.mongodb.com/manual/reference/operator/sort/
1168-
*
1169-
* @param mixed|Expr $valueOrExpression
11701151
*/
11711152
public function push(mixed $valueOrExpression): self
11721153
{

0 commit comments

Comments
 (0)