Completed
Pull Request — 2.6 (#7684)
by Robert den
06:31
created
lib/Doctrine/ORM/Query/Expr/Math.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,16 +92,16 @@
 block discarded – undo
92 92
         $leftExpr = (string) $this->leftExpr;
93 93
 
94 94
         if ($this->leftExpr instanceof Math) {
95
-            $leftExpr = '(' . $leftExpr . ')';
95
+            $leftExpr = '('.$leftExpr.')';
96 96
         }
97 97
 
98 98
         // Adjusting Right Expression
99 99
         $rightExpr = (string) $this->rightExpr;
100 100
 
101 101
         if ($this->rightExpr instanceof Math) {
102
-            $rightExpr = '(' . $rightExpr . ')';
102
+            $rightExpr = '('.$rightExpr.')';
103 103
         }
104 104
 
105
-        return $leftExpr . ' ' . $this->operator . ' ' . $rightExpr;
105
+        return $leftExpr.' '.$this->operator.' '.$rightExpr;
106 106
     }
107 107
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Expr/Composite.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,12 +58,12 @@
 block discarded – undo
58 58
         $queryPart = (string) $part;
59 59
 
60 60
         if (is_object($part) && $part instanceof self && $part->count() > 1) {
61
-            return $this->preSeparator . $queryPart . $this->postSeparator;
61
+            return $this->preSeparator.$queryPart.$this->postSeparator;
62 62
         }
63 63
 
64 64
         // Fixes DDC-1237: User may have added a where item containing nested expression (with "OR" or "AND")
65 65
         if (stripos($queryPart, ' OR ') !== false || stripos($queryPart, ' AND ') !== false) {
66
-            return $this->preSeparator . $queryPart . $this->postSeparator;
66
+            return $this->preSeparator.$queryPart.$this->postSeparator;
67 67
         }
68 68
 
69 69
         return $queryPart;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Expr/Base.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public function add($arg)
88 88
     {
89
-        if ( $arg !== null && (!$arg instanceof self || $arg->count() > 0) ) {
89
+        if ($arg !== null && ( ! $arg instanceof self || $arg->count() > 0)) {
90 90
             // If we decide to keep Expr\Base instances, we can use this check
91 91
             if ( ! is_string($arg)) {
92 92
                 $class = get_class($arg);
@@ -119,6 +119,6 @@  discard block
 block discarded – undo
119 119
             return (string) $this->parts[0];
120 120
         }
121 121
 
122
-        return $this->preSeparator . implode($this->separator, $this->parts) . $this->postSeparator;
122
+        return $this->preSeparator.implode($this->separator, $this->parts).$this->postSeparator;
123 123
     }
124 124
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Expr/From.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
      */
87 87
     public function __toString()
88 88
     {
89
-        return $this->from . ' ' . $this->alias .
90
-                ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '');
89
+        return $this->from.' '.$this->alias.
90
+                ($this->indexBy ? ' INDEX BY '.$this->indexBy : '');
91 91
     }
92 92
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Printer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
      */
66 66
     public function startProduction($name)
67 67
     {
68
-        $this->println('(' . $name);
68
+        $this->println('('.$name);
69 69
         $this->_indent++;
70 70
     }
71 71
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/ResultSetMapping.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -227,7 +227,9 @@
 block discarded – undo
227 227
         $found = false;
228 228
 
229 229
         foreach (array_merge($this->metaMappings, $this->fieldMappings) as $columnName => $columnFieldName) {
230
-            if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) continue;
230
+            if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) {
231
+                continue;
232
+            }
231 233
 
232 234
             $this->addIndexByColumn($alias, $columnName);
233 235
             $found = true;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Filter/SQLFilter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,8 +100,8 @@  discard block
 block discarded – undo
100 100
      */
101 101
     final public function getParameter($name)
102 102
     {
103
-        if (!isset($this->parameters[$name])) {
104
-            throw new \InvalidArgumentException("Parameter '" . $name . "' does not exist.");
103
+        if ( ! isset($this->parameters[$name])) {
104
+            throw new \InvalidArgumentException("Parameter '".$name."' does not exist.");
105 105
         }
106 106
 
107 107
         return $this->em->getConnection()->quote($this->parameters[$name]['value'], $this->parameters[$name]['type']);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     final public function hasParameter($name)
118 118
     {
119
-        if (!isset($this->parameters[$name])) {
119
+        if ( ! isset($this->parameters[$name])) {
120 120
             return false;
121 121
         }
122 122
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      */
42 42
     public function getRepository(EntityManagerInterface $entityManager, $entityName)
43 43
     {
44
-        $repositoryHash = $entityManager->getClassMetadata($entityName)->getName() . spl_object_hash($entityManager);
44
+        $repositoryHash = $entityManager->getClassMetadata($entityName)->getName().spl_object_hash($entityManager);
45 45
 
46 46
         if (isset($this->repositoryList[$repositoryHash])) {
47 47
             return $this->repositoryList[$repositoryHash];
Please login to merge, or discard this patch.
lib/Doctrine/ORM/OptimisticLockException.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $expectedLockVersion = ($expectedLockVersion instanceof \DateTime) ? $expectedLockVersion->getTimestamp() : $expectedLockVersion;
77 77
         $actualLockVersion = ($actualLockVersion instanceof \DateTime) ? $actualLockVersion->getTimestamp() : $actualLockVersion;
78 78
 
79
-        return new self("The optimistic lock failed, version " . $expectedLockVersion . " was expected, but is actually ".$actualLockVersion, $entity);
79
+        return new self("The optimistic lock failed, version ".$expectedLockVersion." was expected, but is actually ".$actualLockVersion, $entity);
80 80
     }
81 81
 
82 82
     /**
@@ -86,6 +86,6 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public static function notVersioned($entityName)
88 88
     {
89
-        return new self("Cannot obtain optimistic lock on unversioned entity " . $entityName, null);
89
+        return new self("Cannot obtain optimistic lock on unversioned entity ".$entityName, null);
90 90
     }
91 91
 }
Please login to merge, or discard this patch.