@@ -84,6 +84,11 @@ |
||
| 84 | 84 | return $className; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | + /** |
|
| 88 | + * @param string $for |
|
| 89 | + * @param string $targetFqcn |
|
| 90 | + * @param string|false $fileName |
|
| 91 | + */ |
|
| 87 | 92 | private function generateCollectionClass($for, $targetFqcn, $fileName) |
| 88 | 93 | { |
| 89 | 94 | $exploded = explode('\\', $targetFqcn); |
@@ -90,6 +90,9 @@ |
||
| 90 | 90 | */ |
| 91 | 91 | abstract protected function getStageName(); |
| 92 | 92 | |
| 93 | + /** |
|
| 94 | + * @param Expr $expression |
|
| 95 | + */ |
|
| 93 | 96 | private function convertExpression($expression) |
| 94 | 97 | { |
| 95 | 98 | if (is_array($expression)) { |
@@ -46,6 +46,7 @@ |
||
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | 48 | * {@inheritdoc} |
| 49 | + * @param string $collection |
|
| 49 | 50 | */ |
| 50 | 51 | public function out($collection) |
| 51 | 52 | { |
@@ -570,7 +570,7 @@ |
||
| 570 | 570 | /** |
| 571 | 571 | * @param string $documentName |
| 572 | 572 | * |
| 573 | - * @return array |
|
| 573 | + * @return string |
|
| 574 | 574 | */ |
| 575 | 575 | private function runShardCollectionCommand($documentName) |
| 576 | 576 | { |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | |
| 7 | 7 | use Doctrine\ODM\MongoDB\Mapping\ClassMetadata; |
| 8 | 8 | use Doctrine\ODM\MongoDB\Mapping\ClassMetadataFactory; |
| 9 | -use Doctrine\ODM\MongoDB\Mapping\MappingException; |
|
| 10 | 9 | use MongoDB\Driver\Exception\RuntimeException; |
| 11 | 10 | use MongoDB\Model\IndexInfo; |
| 12 | 11 | use function array_filter; |
@@ -362,6 +362,7 @@ |
||
| 362 | 362 | * query array, provided they exist and are not null. |
| 363 | 363 | * |
| 364 | 364 | * @param string ...$keys One or more option keys to be read |
| 365 | + * @param string[] $keys |
|
| 365 | 366 | * @return array |
| 366 | 367 | */ |
| 367 | 368 | private function getQueryOptions(string ...$keys) |
@@ -1005,7 +1005,7 @@ discard block |
||
| 1005 | 1005 | /** |
| 1006 | 1006 | * Gets the ReflectionProperties of the mapped class. |
| 1007 | 1007 | * |
| 1008 | - * @return array An array of ReflectionProperty instances. |
|
| 1008 | + * @return \ReflectionProperty[] An array of ReflectionProperty instances. |
|
| 1009 | 1009 | */ |
| 1010 | 1010 | public function getReflectionProperties() |
| 1011 | 1011 | { |
@@ -1319,6 +1319,7 @@ discard block |
||
| 1319 | 1319 | * {@inheritDoc} |
| 1320 | 1320 | * |
| 1321 | 1321 | * Checks whether the class has a mapped association (embed or reference) with the given field name. |
| 1322 | + * @param string $fieldName |
|
| 1322 | 1323 | */ |
| 1323 | 1324 | public function hasAssociation($fieldName) |
| 1324 | 1325 | { |
@@ -1553,7 +1554,7 @@ discard block |
||
| 1553 | 1554 | * |
| 1554 | 1555 | * @param string $dbFieldName |
| 1555 | 1556 | * |
| 1556 | - * @return array |
|
| 1557 | + * @return string |
|
| 1557 | 1558 | * @throws MappingException |
| 1558 | 1559 | */ |
| 1559 | 1560 | public function getFieldMappingByDbFieldName($dbFieldName) |
@@ -2066,7 +2067,7 @@ discard block |
||
| 2066 | 2067 | * - reflClass (ReflectionClass) |
| 2067 | 2068 | * - reflFields (ReflectionProperty array) |
| 2068 | 2069 | * |
| 2069 | - * @return array The names of all the fields that should be serialized. |
|
| 2070 | + * @return string[] The names of all the fields that should be serialized. |
|
| 2070 | 2071 | */ |
| 2071 | 2072 | public function __sleep() |
| 2072 | 2073 | { |
@@ -219,6 +219,9 @@ discard block |
||
| 219 | 219 | $class->addIndex($keys, $options); |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | + /** |
|
| 223 | + * @param string $type |
|
| 224 | + */ |
|
| 222 | 225 | private function addEmbedMapping(ClassMetadata $class, $embed, $type) |
| 223 | 226 | { |
| 224 | 227 | $attributes = $embed->attributes(); |
@@ -256,6 +259,9 @@ discard block |
||
| 256 | 259 | $this->addFieldMapping($class, $mapping); |
| 257 | 260 | } |
| 258 | 261 | |
| 262 | + /** |
|
| 263 | + * @param string $type |
|
| 264 | + */ |
|
| 259 | 265 | private function addReferenceMapping(ClassMetadata $class, $reference, $type) |
| 260 | 266 | { |
| 261 | 267 | $cascade = array_keys((array) $reference->cascade); |
@@ -1105,7 +1105,7 @@ |
||
| 1105 | 1105 | * @see https://docs.mongodb.com/manual/reference/operator/aggregation/range/ |
| 1106 | 1106 | * @param mixed|self $start An integer that specifies the start of the sequence. Can be any valid expression that resolves to an integer. |
| 1107 | 1107 | * @param mixed|self $end An integer that specifies the exclusive upper limit of the sequence. Can be any valid expression that resolves to an integer. |
| 1108 | - * @param mixed|self $step Optional. An integer that specifies the increment value. Can be any valid expression that resolves to a non-zero integer. Defaults to 1. |
|
| 1108 | + * @param integer $step Optional. An integer that specifies the increment value. Can be any valid expression that resolves to a non-zero integer. Defaults to 1. |
|
| 1109 | 1109 | * @return $this |
| 1110 | 1110 | */ |
| 1111 | 1111 | public function range($start, $end, $step = 1) |
@@ -328,6 +328,9 @@ discard block |
||
| 328 | 328 | return Type::convertPHPToDatabaseValue(Expr::convertExpression($expression)); |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | + /** |
|
| 332 | + * @param string $fieldName |
|
| 333 | + */ |
|
| 331 | 334 | private function convertTargetFieldName($fieldName) |
| 332 | 335 | { |
| 333 | 336 | if (is_array($fieldName)) { |
@@ -349,6 +352,9 @@ discard block |
||
| 349 | 352 | return $this->dm->getUnitOfWork()->getDocumentPersister($class->name); |
| 350 | 353 | } |
| 351 | 354 | |
| 355 | + /** |
|
| 356 | + * @param string $fieldName |
|
| 357 | + */ |
|
| 352 | 358 | private function getReferencedFieldName($fieldName, array $mapping) |
| 353 | 359 | { |
| 354 | 360 | if (! $mapping['isOwningSide']) { |