Completed
Pull Request — master (#5938)
by Maximilian
16:49 queued 08:43
created
lib/Doctrine/ORM/Query/Lexer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@
 block discarded – undo
170 170
 
171 171
             // Recognize identifiers, aliased or qualified names
172 172
             case (ctype_alpha($value[0]) || $value[0] === '_' || $value[0] === '\\'):
173
-                $name = 'Doctrine\ORM\Query\Lexer::T_' . strtoupper($value);
173
+                $name = 'Doctrine\ORM\Query\Lexer::T_'.strtoupper($value);
174 174
 
175 175
                 if (defined($name)) {
176 176
                     $type = constant($name);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/QueryException.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public static function syntaxError($message, $previous = null)
51 51
     {
52
-        return new self('[Syntax Error] ' . $message, 0, $previous);
52
+        return new self('[Syntax Error] '.$message, 0, $previous);
53 53
     }
54 54
 
55 55
     /**
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public static function semanticalError($message, $previous = null)
62 62
     {
63
-        return new self('[Semantical Error] ' . $message, 0, $previous);
63
+        return new self('[Semantical Error] '.$message, 0, $previous);
64 64
     }
65 65
 
66 66
     /**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public static function invalidParameterType($expected, $received)
81 81
     {
82
-        return new self('Invalid parameter type, ' . $received . ' given, but ' . $expected . ' expected.');
82
+        return new self('Invalid parameter type, '.$received.' given, but '.$expected.' expected.');
83 83
     }
84 84
 
85 85
     /**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public static function invalidParameterPosition($pos)
91 91
     {
92
-        return new self('Invalid parameter position: ' . $pos);
92
+        return new self('Invalid parameter position: '.$pos);
93 93
     }
94 94
 
95 95
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public static function tooManyParameters($expected, $received)
102 102
     {
103
-        return new self('Too many parameters: the query defines ' . $expected . ' parameters and you bound ' . $received);
103
+        return new self('Too many parameters: the query defines '.$expected.' parameters and you bound '.$received);
104 104
     }
105 105
 
106 106
     /**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public static function tooFewParameters($expected, $received)
113 113
     {
114
-        return new self('Too few parameters: the query defines ' . $expected . ' parameters but you only bound ' . $received);
114
+        return new self('Too few parameters: the query defines '.$expected.' parameters but you only bound '.$received);
115 115
     }
116 116
 
117 117
     /**
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     public static function invalidPathExpression($pathExpr)
151 151
     {
152 152
         return new self(
153
-            "Invalid PathExpression '" . $pathExpr->identificationVariable . "." . $pathExpr->field . "'."
153
+            "Invalid PathExpression '".$pathExpr->identificationVariable.".".$pathExpr->field."'."
154 154
         );
155 155
     }
156 156
 
@@ -183,8 +183,8 @@  discard block
 block discarded – undo
183 183
     public static function partialObjectsAreDangerous()
184 184
     {
185 185
         return new self(
186
-            "Loading partial objects is dangerous. Fetch full objects or consider " .
187
-            "using a different fetch mode. If you really want partial objects, " .
186
+            "Loading partial objects is dangerous. Fetch full objects or consider ".
187
+            "using a different fetch mode. If you really want partial objects, ".
188 188
             "set the doctrine.forcePartialLoad query hint to TRUE."
189 189
         );
190 190
     }
@@ -222,8 +222,8 @@  discard block
 block discarded – undo
222 222
     public static function iterateWithFetchJoinNotAllowed($assoc)
223 223
     {
224 224
         return new self(
225
-            "Iterate with fetch join in class " . $assoc['sourceEntity'] .
226
-            " using association " . $assoc['fieldName'] . " not allowed."
225
+            "Iterate with fetch join in class ".$assoc['sourceEntity'].
226
+            " using association ".$assoc['fieldName']." not allowed."
227 227
         );
228 228
     }
229 229
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
      */
248 248
     public static function instanceOfUnrelatedClass($className, $rootClass)
249 249
     {
250
-        return new self("Cannot check if a child of '" . $rootClass . "' is instanceof '" . $className . "', " .
250
+        return new self("Cannot check if a child of '".$rootClass."' is instanceof '".$className."', ".
251 251
             "inheritance hierarchy does not exists between these two classes.");
252 252
     }
253 253
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     public static function invalidQueryComponent($dqlAlias)
260 260
     {
261 261
         return new self(
262
-            "Invalid query component given for DQL alias '" . $dqlAlias . "', ".
262
+            "Invalid query component given for DQL alias '".$dqlAlias."', ".
263 263
             "requires 'metadata', 'parent', 'relation', 'map', 'nestingLevel' and 'token' keys."
264 264
         );
265 265
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/FilterCollection.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     /**
34 34
      * A filter object is in CLEAN state when it has no changed parameters.
35 35
      */
36
-    const FILTERS_STATE_CLEAN  = 1;
36
+    const FILTERS_STATE_CLEAN = 1;
37 37
 
38 38
     /**
39 39
      * A filter object is in DIRTY state when it has changed parameters.
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     public function enable($name)
105 105
     {
106 106
         if ( ! $this->has($name)) {
107
-            throw new \InvalidArgumentException("Filter '" . $name . "' does not exist.");
107
+            throw new \InvalidArgumentException("Filter '".$name."' does not exist.");
108 108
         }
109 109
 
110 110
         if ( ! $this->isEnabled($name)) {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     public function getFilter($name)
157 157
     {
158 158
         if ( ! $this->isEnabled($name)) {
159
-            throw new \InvalidArgumentException("Filter '" . $name . "' is not enabled.");
159
+            throw new \InvalidArgumentException("Filter '".$name."' is not enabled.");
160 160
         }
161 161
 
162 162
         return $this->enabledFilters[$name];
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         $filterHash = '';
210 210
 
211 211
         foreach ($this->enabledFilters as $name => $filter) {
212
-            $filterHash .= $name . $filter;
212
+            $filterHash .= $name.$filter;
213 213
         }
214 214
 
215 215
         return $filterHash;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Expr/Func.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,6 +73,6 @@
 block discarded – undo
73 73
      */
74 74
     public function __toString()
75 75
     {
76
-        return $this->name . '(' . implode(', ', $this->arguments) . ')';
76
+        return $this->name.'('.implode(', ', $this->arguments).')';
77 77
     }
78 78
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Expr/Join.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -138,8 +138,8 @@
 block discarded – undo
138 138
     public function __toString()
139 139
     {
140 140
         return strtoupper($this->joinType) . ' JOIN ' . $this->join
141
-             . ($this->alias ? ' ' . $this->alias : '')
142
-             . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '')
143
-             . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : '');
141
+                . ($this->alias ? ' ' . $this->alias : '')
142
+                . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '')
143
+                . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : '');
144 144
     }
145 145
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -137,9 +137,9 @@
 block discarded – undo
137 137
      */
138 138
     public function __toString()
139 139
     {
140
-        return strtoupper($this->joinType) . ' JOIN ' . $this->join
141
-             . ($this->alias ? ' ' . $this->alias : '')
142
-             . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '')
143
-             . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : '');
140
+        return strtoupper($this->joinType).' JOIN '.$this->join
141
+             . ($this->alias ? ' '.$this->alias : '')
142
+             . ($this->indexBy ? ' INDEX BY '.$this->indexBy : '')
143
+             . ($this->condition ? ' '.strtoupper($this->conditionType).' '.$this->condition : '');
144 144
     }
145 145
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Expr/Comparison.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,6 +95,6 @@
 block discarded – undo
95 95
      */
96 96
     public function __toString()
97 97
     {
98
-        return $this->leftExpr . ' ' . $this->operator . ' ' . $this->rightExpr;
98
+        return $this->leftExpr.' '.$this->operator.' '.$this->rightExpr;
99 99
     }
100 100
 }
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/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.