@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | * Gets a boolean flag that indicates whether proxy classes should always be regenerated |
217 | 217 | * during each script execution. |
218 | 218 | * |
219 | - * @return boolean|integer |
|
219 | + * @return integer |
|
220 | 220 | */ |
221 | 221 | public function getAutoGenerateProxyClasses() |
222 | 222 | { |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | * Gets a boolean flag that indicates whether hydrator classes should always be regenerated |
296 | 296 | * during each script execution. |
297 | 297 | * |
298 | - * @return boolean|integer Possible values are defined constants |
|
298 | + * @return integer Possible values are defined constants |
|
299 | 299 | */ |
300 | 300 | public function getAutoGenerateHydratorClasses() |
301 | 301 | { |
@@ -556,6 +556,7 @@ discard block |
||
556 | 556 | |
557 | 557 | /** |
558 | 558 | * @throws MongoDBException If not is a ObjectRepository. |
559 | + * @param string $className |
|
559 | 560 | */ |
560 | 561 | public function setDefaultDocumentRepositoryClassName($className) |
561 | 562 | { |
@@ -41,6 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | /** |
43 | 43 | * {@inheritDoc} |
44 | + * @param \Doctrine\Common\Persistence\Mapping\Driver\SymfonyFileLocator $locator |
|
44 | 45 | */ |
45 | 46 | public function __construct($locator, $fileExtension = self::DEFAULT_FILE_EXTENSION) |
46 | 47 | { |
@@ -312,6 +313,9 @@ discard block |
||
312 | 313 | $class->addIndex($keys, $options); |
313 | 314 | } |
314 | 315 | |
316 | + /** |
|
317 | + * @param string $type |
|
318 | + */ |
|
315 | 319 | private function addEmbedMapping(MappingClassMetadata $class, $embed, $type) |
316 | 320 | { |
317 | 321 | $attributes = $embed->attributes(); |
@@ -358,6 +362,9 @@ discard block |
||
358 | 362 | $this->addFieldMapping($class, $mapping); |
359 | 363 | } |
360 | 364 | |
365 | + /** |
|
366 | + * @param string $type |
|
367 | + */ |
|
361 | 368 | private function addReferenceMapping(MappingClassMetadata $class, $reference, $type) |
362 | 369 | { |
363 | 370 | $cascade = array_keys((array) $reference->cascade); |
@@ -626,6 +633,9 @@ discard block |
||
626 | 633 | return $result; |
627 | 634 | } |
628 | 635 | |
636 | + /** |
|
637 | + * @param string $filename |
|
638 | + */ |
|
629 | 639 | private function validateSchema($filename) |
630 | 640 | { |
631 | 641 | $document = new DOMDocument(); |
@@ -22,7 +22,6 @@ |
||
22 | 22 | use Doctrine\Common\EventManager; |
23 | 23 | use Doctrine\Common\Persistence\Mapping\MappingException; |
24 | 24 | use Doctrine\MongoDB\CursorInterface; |
25 | -use Doctrine\MongoDB\EagerCursor; |
|
26 | 25 | use Doctrine\ODM\MongoDB\Cursor; |
27 | 26 | use Doctrine\ODM\MongoDB\DocumentManager; |
28 | 27 | use Doctrine\ODM\MongoDB\Query\ReferencePrimer; |
@@ -774,6 +774,10 @@ discard block |
||
774 | 774 | return implode("\n", $lines); |
775 | 775 | } |
776 | 776 | |
777 | + /** |
|
778 | + * @param string $type |
|
779 | + * @param string $defaultValue |
|
780 | + */ |
|
777 | 781 | private function generateDocumentStubMethod(ClassMetadata $metadata, $type, $fieldName, $typeHint = null, $defaultValue = null) |
778 | 782 | { |
779 | 783 | // Add/remove methods should use the singular form of the field name |
@@ -958,6 +962,9 @@ discard block |
||
958 | 962 | return implode("\n", $lines); |
959 | 963 | } |
960 | 964 | |
965 | + /** |
|
966 | + * @param integer $type |
|
967 | + */ |
|
961 | 968 | private function getInheritanceTypeString($type) |
962 | 969 | { |
963 | 970 | switch ($type) { |
@@ -975,6 +982,9 @@ discard block |
||
975 | 982 | } |
976 | 983 | } |
977 | 984 | |
985 | + /** |
|
986 | + * @param integer $policy |
|
987 | + */ |
|
978 | 988 | private function getChangeTrackingPolicyString($policy) |
979 | 989 | { |
980 | 990 | switch ($policy) { |
@@ -992,6 +1002,9 @@ discard block |
||
992 | 1002 | } |
993 | 1003 | } |
994 | 1004 | |
1005 | + /** |
|
1006 | + * @param integer $type |
|
1007 | + */ |
|
995 | 1008 | private function getIdGeneratorTypeString($type) |
996 | 1009 | { |
997 | 1010 | switch ($type) { |
@@ -88,6 +88,9 @@ discard block |
||
88 | 88 | return parent::from($this->targetClass->getCollection()); |
89 | 89 | } |
90 | 90 | |
91 | + /** |
|
92 | + * @param string|null $connectFromField |
|
93 | + */ |
|
91 | 94 | public function connectFromField($connectFromField) |
92 | 95 | { |
93 | 96 | // No targetClass mapping - simply use field name as is |
@@ -109,6 +112,9 @@ discard block |
||
109 | 112 | return parent::connectFromField($this->getReferencedFieldName($connectFromField, $referenceMapping)); |
110 | 113 | } |
111 | 114 | |
115 | + /** |
|
116 | + * @param string $connectToField |
|
117 | + */ |
|
112 | 118 | public function connectToField($connectToField) |
113 | 119 | { |
114 | 120 | return parent::connectToField($this->convertTargetFieldName($connectToField)); |
@@ -168,6 +174,9 @@ discard block |
||
168 | 174 | } |
169 | 175 | } |
170 | 176 | |
177 | + /** |
|
178 | + * @return string |
|
179 | + */ |
|
171 | 180 | protected function convertTargetFieldName($fieldName) |
172 | 181 | { |
173 | 182 | if (self::class !== static::class) { |
@@ -37,6 +37,9 @@ |
||
37 | 37 | */ |
38 | 38 | private $class; |
39 | 39 | |
40 | + /** |
|
41 | + * @param string $expression |
|
42 | + */ |
|
40 | 43 | public function __construct(Builder $builder, DocumentManager $documentManager, ClassMetadata $class, $expression = null) |
41 | 44 | { |
42 | 45 | $this->dm = $documentManager; |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | * NOTE: The persist operation always considers documents that are not yet known to |
403 | 403 | * this DocumentManager as NEW. Do not pass detached documents to the persist operation. |
404 | 404 | * |
405 | - * @param object $document The instance to make managed and persistent. |
|
405 | + * @param \Documents\User $document The instance to make managed and persistent. |
|
406 | 406 | * @throws \InvalidArgumentException When the given $document param is not an object |
407 | 407 | */ |
408 | 408 | public function persist($document) |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | * This is just a convenient shortcut for getRepository($documentName)->find($id). |
628 | 628 | * |
629 | 629 | * @param string $documentName |
630 | - * @param mixed $identifier |
|
630 | + * @param \MongoId $identifier |
|
631 | 631 | * @param int $lockMode |
632 | 632 | * @param int $lockVersion |
633 | 633 | * @return object $document |
@@ -38,6 +38,9 @@ |
||
38 | 38 | parent::__construct($message, $code, $previous); |
39 | 39 | } |
40 | 40 | |
41 | + /** |
|
42 | + * @param string $className |
|
43 | + */ |
|
41 | 44 | public static function documentNotFound($className, $identifier) |
42 | 45 | { |
43 | 46 | return new self(sprintf( |
@@ -19,9 +19,6 @@ |
||
19 | 19 | |
20 | 20 | namespace Doctrine\ODM\MongoDB; |
21 | 21 | |
22 | -use Doctrine\MongoDB\CursorInterface; |
|
23 | -use Doctrine\ODM\MongoDB\Mapping\ClassMetadata; |
|
24 | - |
|
25 | 22 | /** |
26 | 23 | * EagerCursor wraps a Cursor instance and fetches all of its results upon |
27 | 24 | * initialization. |