Failed Conditions
Pull Request — master (#7084)
by
unknown
13:00
created
lib/Doctrine/ORM/Query/QueryException.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Query;
6 6
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public static function syntaxError($message, $previous = null)
34 34
     {
35
-        return new self('[Syntax Error] ' . $message, 0, $previous);
35
+        return new self('[Syntax Error] '.$message, 0, $previous);
36 36
     }
37 37
 
38 38
     /**
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public static function semanticalError($message, $previous = null)
45 45
     {
46
-        return new self('[Semantical Error] ' . $message, 0, $previous);
46
+        return new self('[Semantical Error] '.$message, 0, $previous);
47 47
     }
48 48
 
49 49
     /**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public static function invalidParameterType($expected, $received)
64 64
     {
65
-        return new self('Invalid parameter type, ' . $received . ' given, but ' . $expected . ' expected.');
65
+        return new self('Invalid parameter type, '.$received.' given, but '.$expected.' expected.');
66 66
     }
67 67
 
68 68
     /**
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public static function invalidParameterPosition($pos)
74 74
     {
75
-        return new self('Invalid parameter position: ' . $pos);
75
+        return new self('Invalid parameter position: '.$pos);
76 76
     }
77 77
 
78 78
     /**
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public static function invalidParameterFormat($value)
84 84
     {
85
-        return new self('Invalid parameter format, ' . $value . ' given, but :<name> or ?<num> expected.');
85
+        return new self('Invalid parameter format, '.$value.' given, but :<name> or ?<num> expected.');
86 86
     }
87 87
 
88 88
     /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     public static function unknownParameter($key)
94 94
     {
95
-        return new self('Invalid parameter: token ' . $key . ' is not defined in the query.');
95
+        return new self('Invalid parameter: token '.$key.' is not defined in the query.');
96 96
     }
97 97
     
98 98
     /**
@@ -112,12 +112,12 @@  discard block
 block discarded – undo
112 112
             }
113 113
             
114 114
             if ($tokenMissing) {
115
-                return new self('Missing parameter: no parameter set for token ' . $token . '.');
115
+                return new self('Missing parameter: no parameter set for token '.$token.'.');
116 116
             } 
117 117
         }
118 118
         
119
-        return new self('Too few parameters: the query defines ' . count($expected)
120
-                . ' parameters but you only bound ' . count($received));
119
+        return new self('Too few parameters: the query defines '.count($expected)
120
+                . ' parameters but you only bound '.count($received));
121 121
     }
122 122
 
123 123
     /**
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     public static function invalidPathExpression($pathExpr)
137 137
     {
138 138
         return new self(
139
-            "Invalid PathExpression '" . $pathExpr->identificationVariable . '.' . $pathExpr->field . "'."
139
+            "Invalid PathExpression '".$pathExpr->identificationVariable.'.'.$pathExpr->field."'."
140 140
         );
141 141
     }
142 142
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      */
148 148
     public static function invalidLiteral($literal)
149 149
     {
150
-        return new self("Invalid literal '" . $literal . "'");
150
+        return new self("Invalid literal '".$literal."'");
151 151
     }
152 152
 
153 153
     /**
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
     public static function iterateWithFetchJoinCollectionNotAllowed($assoc)
159 159
     {
160 160
         return new self(
161
-            'Invalid query operation: Not allowed to iterate over fetch join collections ' .
162
-            'in class ' . $assoc['sourceEntity'] . ' association ' . $assoc['fieldName']
161
+            'Invalid query operation: Not allowed to iterate over fetch join collections '.
162
+            'in class '.$assoc['sourceEntity'].' association '.$assoc['fieldName']
163 163
         );
164 164
     }
165 165
 
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
     public static function partialObjectsAreDangerous()
170 170
     {
171 171
         return new self(
172
-            'Loading partial objects is dangerous. Fetch full objects or consider ' .
173
-            'using a different fetch mode. If you really want partial objects, ' .
172
+            'Loading partial objects is dangerous. Fetch full objects or consider '.
173
+            'using a different fetch mode. If you really want partial objects, '.
174 174
             'set the doctrine.forcePartialLoad query hint to TRUE.'
175 175
         );
176 176
     }
@@ -183,8 +183,8 @@  discard block
 block discarded – undo
183 183
     public static function overwritingJoinConditionsNotYetSupported($assoc)
184 184
     {
185 185
         return new self(
186
-            'Unsupported query operation: It is not yet possible to overwrite the join ' .
187
-            'conditions in class ' . $assoc['sourceEntityName'] . ' association ' . $assoc['fieldName'] . '. ' .
186
+            'Unsupported query operation: It is not yet possible to overwrite the join '.
187
+            'conditions in class '.$assoc['sourceEntityName'].' association '.$assoc['fieldName'].'. '.
188 188
             'Use WITH to append additional join conditions to the association.'
189 189
         );
190 190
     }
@@ -195,8 +195,8 @@  discard block
 block discarded – undo
195 195
     public static function associationPathInverseSideNotSupported(PathExpression $pathExpr)
196 196
     {
197 197
         return new self(
198
-            'A single-valued association path expression to an inverse side is not supported in DQL queries. ' .
199
-            'Instead of "' . $pathExpr->identificationVariable . '.' . $pathExpr->field . '" use an explicit join.'
198
+            'A single-valued association path expression to an inverse side is not supported in DQL queries. '.
199
+            'Instead of "'.$pathExpr->identificationVariable.'.'.$pathExpr->field.'" use an explicit join.'
200 200
         );
201 201
     }
202 202
 
@@ -220,8 +220,8 @@  discard block
 block discarded – undo
220 220
     public static function associationPathCompositeKeyNotSupported()
221 221
     {
222 222
         return new self(
223
-            'A single-valued association path expression to an entity with a composite primary ' .
224
-            'key is not supported. Explicitly name the components of the composite primary key ' .
223
+            'A single-valued association path expression to an entity with a composite primary '.
224
+            'key is not supported. Explicitly name the components of the composite primary key '.
225 225
             'in the query.'
226 226
         );
227 227
     }
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      */
235 235
     public static function instanceOfUnrelatedClass($className, $rootClass)
236 236
     {
237
-        return new self("Cannot check if a child of '" . $rootClass . "' is instanceof '" . $className . "', " .
237
+        return new self("Cannot check if a child of '".$rootClass."' is instanceof '".$className."', ".
238 238
             'inheritance hierarchy does not exists between these two classes.');
239 239
     }
240 240
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
     public static function invalidQueryComponent($dqlAlias)
247 247
     {
248 248
         return new self(
249
-            "Invalid query component given for DQL alias '" . $dqlAlias . "', " .
249
+            "Invalid query component given for DQL alias '".$dqlAlias."', ".
250 250
             "requires 'metadata', 'parent', 'relation', 'map', 'nestingLevel' and 'token' keys."
251 251
         );
252 252
     }
Please login to merge, or discard this patch.