Completed
Pull Request — 2.5 (#7639)
by
unknown
03:04
created
lib/Doctrine/ORM/Mapping/DefaultEntityListenerResolver.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     public function resolve($className)
68 68
     {
69 69
         if (isset($this->instances[$className = trim($className, '\\')])) {
70
-           return $this->instances[$className];
70
+            return $this->instances[$className];
71 71
         }
72 72
 
73 73
         return $this->instances[$className] = new $className();
Please login to merge, or discard this patch.
lib/Doctrine/ORM/AbstractQuery.php 4 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -22,11 +22,9 @@
 block discarded – undo
22 22
 use Doctrine\Common\Util\ClassUtils;
23 23
 use Doctrine\Common\Collections\Collection;
24 24
 use Doctrine\Common\Collections\ArrayCollection;
25
-
26 25
 use Doctrine\ORM\Query\Parameter;
27 26
 use Doctrine\ORM\Cache\QueryCacheKey;
28 27
 use Doctrine\DBAL\Cache\QueryCacheProfile;
29
-
30 28
 use Doctrine\ORM\Cache;
31 29
 use Doctrine\ORM\Query\ResultSetMapping;
32 30
 
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -213,10 +213,10 @@
 block discarded – undo
213 213
     }
214 214
 
215 215
     /**
216
-    * Obtain the name of the second level query cache region in which query results will be stored
217
-    *
218
-    * @return The cache region name; NULL indicates the default region.
219
-    */
216
+     * Obtain the name of the second level query cache region in which query results will be stored
217
+     *
218
+     * @return The cache region name; NULL indicates the default region.
219
+     */
220 220
     public function getCacheRegion()
221 221
     {
222 222
         return $this->cacheRegion;
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     /**
216 216
     * Obtain the name of the second level query cache region in which query results will be stored
217 217
     *
218
-    * @return The cache region name; NULL indicates the default region.
218
+    * @return string|null cache region name; NULL indicates the default region.
219 219
     */
220 220
     public function getCacheRegion()
221 221
     {
@@ -1039,7 +1039,7 @@  discard block
 block discarded – undo
1039 1039
      * Will return the configured id if it exists otherwise a hash will be
1040 1040
      * automatically generated for you.
1041 1041
      *
1042
-     * @return array ($key, $hash)
1042
+     * @return string[] ($key, $hash)
1043 1043
      */
1044 1044
     protected function getHydrationCacheId()
1045 1045
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
     public function getParameter($key)
326 326
     {
327 327
         $filteredParameters = $this->parameters->filter(
328
-            function (Query\Parameter $parameter) use ($key) {
328
+            function(Query\Parameter $parameter) use ($key) {
329 329
                 $parameterName = $parameter->getName();
330 330
 
331 331
                 return $key === $parameterName || (string) $key === (string) $parameterName;
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
      */
464 464
     private function translateNamespaces(Query\ResultSetMapping $rsm)
465 465
     {
466
-        $translate = function ($alias) {
466
+        $translate = function($alias) {
467 467
             return $this->_em->getClassMetadata($alias)->getName();
468 468
         };
469 469
 
@@ -994,7 +994,7 @@  discard block
 block discarded – undo
994 994
             $this->getTimestampKey()
995 995
         );
996 996
 
997
-        $result     = $queryCache->get($queryKey, $rsm, $this->_hints);
997
+        $result = $queryCache->get($queryKey, $rsm, $this->_hints);
998 998
 
999 999
         if ($result !== null) {
1000 1000
             if ($this->cacheLogger) {
@@ -1130,6 +1130,6 @@  discard block
 block discarded – undo
1130 1130
 
1131 1131
         ksort($hints);
1132 1132
 
1133
-        return sha1($query . '-' . serialize($params) . '-' . serialize($hints));
1133
+        return sha1($query.'-'.serialize($params).'-'.serialize($hints));
1134 1134
     }
1135 1135
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Expr/Literal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     /**
34 34
      * @var string
35 35
      */
36
-    protected $preSeparator  = '';
36
+    protected $preSeparator = '';
37 37
 
38 38
     /**
39 39
      * @var string
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/CacheConfiguration.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function getCacheLogger()
75 75
     {
76
-         return $this->cacheLogger;
76
+            return $this->cacheLogger;
77 77
     }
78 78
 
79 79
     /**
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             );
116 116
         }
117 117
 
118
-         return $this->queryValidator;
118
+            return $this->queryValidator;
119 119
     }
120 120
 
121 121
     /**
Please login to merge, or discard this patch.
ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersister.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,6 @@
 block discarded – undo
20 20
 
21 21
 namespace Doctrine\ORM\Cache\Persister\Entity;
22 22
 
23
-use Doctrine\Common\Util\ClassUtils;
24 23
 use Doctrine\ORM\Cache\EntityCacheKey;
25 24
 
26 25
 /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,6 @@
 block discarded – undo
105 105
     }
106 106
 
107 107
     /**
108
-     * @param \Doctrine\ORM\Query\Parser $parser
109 108
      *
110 109
      * @return integer
111 110
      */
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Expr.php 2 patches
Doc Comments   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
      *     // u.id = ?1
107 107
      *     $expr->eq('u.id', '?1');
108 108
      *
109
-     * @param mixed $x Left expression.
110
-     * @param mixed $y Right expression.
109
+     * @param string $x Left expression.
110
+     * @param string $y Right expression.
111 111
      *
112 112
      * @return Expr\Comparison
113 113
      */
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
      *     // u.id <> ?1
126 126
      *     $q->where($q->expr()->neq('u.id', '?1'));
127 127
      *
128
-     * @param mixed $x Left expression.
129
-     * @param mixed $y Right expression.
128
+     * @param string $x Left expression.
129
+     * @param string $y Right expression.
130 130
      *
131 131
      * @return Expr\Comparison
132 132
      */
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
      * Creates an IN() expression with the given arguments.
437 437
      *
438 438
      * @param string $x Field in string format to be restricted by IN() function.
439
-     * @param mixed  $y Argument to be used in IN() function.
439
+     * @param string  $y Argument to be used in IN() function.
440 440
      *
441 441
      * @return Expr\Func
442 442
      */
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
      * Creates a NOT IN() expression with the given arguments.
457 457
      *
458 458
      * @param string $x Field in string format to be restricted by NOT IN() function.
459
-     * @param mixed $y Argument to be used in NOT IN() function.
459
+     * @param string $y Argument to be used in NOT IN() function.
460 460
      *
461 461
      * @return Expr\Func
462 462
      */
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
      * Creates a LIKE() comparison expression with the given arguments.
501 501
      *
502 502
      * @param string $x Field in string format to be inspected by LIKE() comparison.
503
-     * @param mixed  $y Argument to be used in LIKE() comparison.
503
+     * @param string  $y Argument to be used in LIKE() comparison.
504 504
      *
505 505
      * @return Expr\Comparison
506 506
      */
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
      * @param integer $x   Starting range value to be used in BETWEEN() function.
627 627
      * @param integer $y   End point value to be used in BETWEEN() function.
628 628
      *
629
-     * @return Expr\Func A BETWEEN expression.
629
+     * @return string A BETWEEN expression.
630 630
      */
631 631
     public function between($val, $x, $y)
632 632
     {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
      */
269 269
     public function countDistinct($x)
270 270
     {
271
-        return 'COUNT(DISTINCT ' . implode(', ', func_get_args()) . ')';
271
+        return 'COUNT(DISTINCT '.implode(', ', func_get_args()).')';
272 272
     }
273 273
 
274 274
     /**
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
                 }
450 450
             }
451 451
         }
452
-        return new Expr\Func($x . ' IN', (array) $y);
452
+        return new Expr\Func($x.' IN', (array) $y);
453 453
     }
454 454
 
455 455
     /**
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
                 }
470 470
             }
471 471
         }
472
-        return new Expr\Func($x . ' NOT IN', (array) $y);
472
+        return new Expr\Func($x.' NOT IN', (array) $y);
473 473
     }
474 474
 
475 475
     /**
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
      */
482 482
     public function isNull($x)
483 483
     {
484
-        return $x . ' IS NULL';
484
+        return $x.' IS NULL';
485 485
     }
486 486
 
487 487
     /**
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
      */
494 494
     public function isNotNull($x)
495 495
     {
496
-        return $x . ' IS NOT NULL';
496
+        return $x.' IS NOT NULL';
497 497
     }
498 498
 
499 499
     /**
@@ -610,12 +610,12 @@  discard block
 block discarded – undo
610 610
      */
611 611
     private function _quoteLiteral($literal)
612 612
     {
613
-        if (is_numeric($literal) && !is_string($literal)) {
613
+        if (is_numeric($literal) && ! is_string($literal)) {
614 614
             return (string) $literal;
615 615
         } else if (is_bool($literal)) {
616 616
             return $literal ? "true" : "false";
617 617
         } else {
618
-            return "'" . str_replace("'", "''", $literal) . "'";
618
+            return "'".str_replace("'", "''", $literal)."'";
619 619
         }
620 620
     }
621 621
 
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
      */
631 631
     public function between($val, $x, $y)
632 632
     {
633
-        return $val . ' BETWEEN ' . $x . ' AND ' . $y;
633
+        return $val.' BETWEEN '.$x.' AND '.$y;
634 634
     }
635 635
 
636 636
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/TreeWalkerChainIterator.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -41,6 +41,10 @@
 block discarded – undo
41 41
      */
42 42
     private $parserResult;
43 43
 
44
+    /**
45
+     * @param \Doctrine\ORM\AbstractQuery $query
46
+     * @param ParserResult $parserResult
47
+     */
44 48
     public function __construct(TreeWalkerChain $treeWalkerChain, $query, $parserResult)
45 49
     {
46 50
         $this->treeWalkerChain = $treeWalkerChain;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/AttachEntityListenersListener.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      * @param string $entityClass           The entity to attach the listener.
42 42
      * @param string $listenerClass         The listener class.
43 43
      * @param string $eventName             The entity lifecycle event.
44
-     * @param string $listenerCallback|null The listener callback method or NULL to use $eventName.
44
+     * @param string $listenerCallback The listener callback method or NULL to use $eventName.
45 45
      *
46 46
      * @return void
47 47
      */
Please login to merge, or discard this patch.