Completed
Pull Request — master (#2172)
by
unknown
21:35
created
lib/Doctrine/ODM/MongoDB/Mapping/Driver/XmlDriver.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -41,6 +41,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
lib/Doctrine/ODM/MongoDB/Tools/DocumentGenerator.php 1 patch
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -774,6 +774,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
992 1002
         }
993 1003
     }
994 1004
 
1005
+    /**
1006
+     * @param integer $type
1007
+     */
995 1008
     private function getIdGeneratorTypeString($type)
996 1009
     {
997 1010
         switch ($type) {
Please login to merge, or discard this patch.
lib/Doctrine/ODM/MongoDB/Aggregation/Stage/GraphLookup.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -88,6 +88,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
lib/Doctrine/ODM/MongoDB/Aggregation/Stage/ReplaceRoot.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -37,6 +37,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
lib/Doctrine/ODM/MongoDB/DocumentManager.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
lib/Doctrine/ODM/MongoDB/DocumentNotFoundException.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -38,6 +38,9 @@
 block discarded – undo
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(
Please login to merge, or discard this patch.
lib/Doctrine/ODM/MongoDB/Event/OnClearEventArgs.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -29,6 +29,10 @@
 block discarded – undo
29 29
  */
30 30
 class OnClearEventArgs extends BaseOnClearEventArgs
31 31
 {
32
+    /**
33
+     * @param \Doctrine\ODM\MongoDB\DocumentManager $objectManager
34
+     * @param string $entityClass
35
+     */
32 36
     public function __construct($objectManager, $entityClass = null)
33 37
     {
34 38
         if (self::class !== static::class) {
Please login to merge, or discard this patch.
lib/Doctrine/ODM/MongoDB/Id/IncrementGenerator.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -58,6 +58,9 @@
 block discarded – undo
58 58
         $this->key = $key;
59 59
     }
60 60
 
61
+    /**
62
+     * @param integer $startingId
63
+     */
61 64
     public function setStartingId($startingId)
62 65
     {
63 66
         $this->startingId = $startingId;
Please login to merge, or discard this patch.
lib/Doctrine/ODM/MongoDB/LockException.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -29,6 +29,9 @@  discard block
 block discarded – undo
29 29
 {
30 30
     private $document;
31 31
 
32
+    /**
33
+     * @param string $msg
34
+     */
32 35
     public function __construct($msg, $document = null)
33 36
     {
34 37
         if (self::class !== static::class) {
@@ -58,6 +61,9 @@  discard block
 block discarded – undo
58 61
         return new self('The optimistic lock failed, version ' . $expectedLockVersion . ' was expected, but is actually '.$actualLockVersion, $document);
59 62
     }
60 63
 
64
+    /**
65
+     * @param string $documentName
66
+     */
61 67
     public static function notVersioned($documentName)
62 68
     {
63 69
         return new self('Document ' . $documentName . ' is not versioned.');
Please login to merge, or discard this patch.