@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public static function syntaxError($message, $previous = null) |
40 | 40 | { |
41 | - return new self('[Syntax Error] ' . $message, 0, $previous); |
|
41 | + return new self('[Syntax Error] '.$message, 0, $previous); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public static function semanticalError($message, $previous = null) |
51 | 51 | { |
52 | - return new self('[Semantical Error] ' . $message, 0, $previous); |
|
52 | + return new self('[Semantical Error] '.$message, 0, $previous); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public static function invalidParameterType($expected, $received) |
70 | 70 | { |
71 | - return new self('Invalid parameter type, ' . $received . ' given, but ' . $expected . ' expected.'); |
|
71 | + return new self('Invalid parameter type, '.$received.' given, but '.$expected.' expected.'); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public static function invalidParameterPosition($pos) |
80 | 80 | { |
81 | - return new self('Invalid parameter position: ' . $pos); |
|
81 | + return new self('Invalid parameter position: '.$pos); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | public static function tooManyParameters($expected, $received) |
91 | 91 | { |
92 | - return new self('Too many parameters: the query defines ' . $expected . ' parameters and you bound ' . $received); |
|
92 | + return new self('Too many parameters: the query defines '.$expected.' parameters and you bound '.$received); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public static function tooFewParameters($expected, $received) |
102 | 102 | { |
103 | - return new self('Too few parameters: the query defines ' . $expected . ' parameters but you only bound ' . $received); |
|
103 | + return new self('Too few parameters: the query defines '.$expected.' parameters but you only bound '.$received); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | public static function invalidPathExpression($pathExpr) |
140 | 140 | { |
141 | 141 | return new self( |
142 | - "Invalid PathExpression '" . $pathExpr->identificationVariable . "." . $pathExpr->field . "'." |
|
142 | + "Invalid PathExpression '".$pathExpr->identificationVariable.".".$pathExpr->field."'." |
|
143 | 143 | ); |
144 | 144 | } |
145 | 145 | |
@@ -172,8 +172,8 @@ discard block |
||
172 | 172 | public static function partialObjectsAreDangerous() |
173 | 173 | { |
174 | 174 | return new self( |
175 | - "Loading partial objects is dangerous. Fetch full objects or consider " . |
|
176 | - "using a different fetch mode. If you really want partial objects, " . |
|
175 | + "Loading partial objects is dangerous. Fetch full objects or consider ". |
|
176 | + "using a different fetch mode. If you really want partial objects, ". |
|
177 | 177 | "set the doctrine.forcePartialLoad query hint to TRUE." |
178 | 178 | ); |
179 | 179 | } |
@@ -200,8 +200,8 @@ discard block |
||
200 | 200 | public static function associationPathInverseSideNotSupported(PathExpression $pathExpr) |
201 | 201 | { |
202 | 202 | return new self( |
203 | - 'A single-valued association path expression to an inverse side is not supported in DQL queries. ' . |
|
204 | - 'Instead of "' . $pathExpr->identificationVariable . '.' . $pathExpr->field . '" use an explicit join.' |
|
203 | + 'A single-valued association path expression to an inverse side is not supported in DQL queries. '. |
|
204 | + 'Instead of "'.$pathExpr->identificationVariable.'.'.$pathExpr->field.'" use an explicit join.' |
|
205 | 205 | ); |
206 | 206 | } |
207 | 207 | |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | */ |
242 | 242 | public static function instanceOfUnrelatedClass($className, $rootClass) |
243 | 243 | { |
244 | - return new self("Cannot check if a child of '" . $rootClass . "' is instanceof '" . $className . "', " . |
|
244 | + return new self("Cannot check if a child of '".$rootClass."' is instanceof '".$className."', ". |
|
245 | 245 | "inheritance hierarchy does not exists between these two classes."); |
246 | 246 | } |
247 | 247 | |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | public static function invalidQueryComponent($dqlAlias) |
254 | 254 | { |
255 | 255 | return new self( |
256 | - "Invalid query component given for DQL alias '" . $dqlAlias . "', ". |
|
256 | + "Invalid query component given for DQL alias '".$dqlAlias."', ". |
|
257 | 257 | "requires 'metadata', 'parent', 'relation', 'map', 'nestingLevel' and 'token' keys." |
258 | 258 | ); |
259 | 259 | } |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | 6 | |
7 | -use Doctrine\Common\Util\Debug; |
|
8 | 7 | use Doctrine\ORM\ORMException; |
9 | 8 | use Doctrine\ORM\Query\QueryException; |
10 | 9 | use Doctrine\Tests\Models\Navigation\NavCountry; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Query; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM; |
6 | 6 | |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | */ |
23 | 23 | static public function scheduleInsertForManagedEntity($entity) |
24 | 24 | { |
25 | - return new self("A managed+dirty entity " . self::objToStr($entity) . " can not be scheduled for insertion."); |
|
25 | + return new self("A managed+dirty entity ".self::objToStr($entity)." can not be scheduled for insertion."); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | */ |
33 | 33 | static public function scheduleInsertForRemovedEntity($entity) |
34 | 34 | { |
35 | - return new self("Removed entity " . self::objToStr($entity) . " can not be scheduled for insertion."); |
|
35 | + return new self("Removed entity ".self::objToStr($entity)." can not be scheduled for insertion."); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | static public function scheduleInsertTwice($entity) |
44 | 44 | { |
45 | - return new self("Entity " . self::objToStr($entity) . " can not be scheduled for insertion twice."); |
|
45 | + return new self("Entity ".self::objToStr($entity)." can not be scheduled for insertion twice."); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | static public function entityWithoutIdentity($className, $entity) |
55 | 55 | { |
56 | 56 | return new self( |
57 | - "The given entity of type '" . $className . "' (".self::objToStr($entity).") has no identity/no " . |
|
57 | + "The given entity of type '".$className."' (".self::objToStr($entity).") has no identity/no ". |
|
58 | 58 | "id values set. It cannot be added to the identity map." |
59 | 59 | ); |
60 | 60 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | static public function readOnlyRequiresManagedEntity($entity) |
68 | 68 | { |
69 | - return new self("Only managed entities can be marked or checked as read only. But " . self::objToStr($entity) . " is not"); |
|
69 | + return new self("Only managed entities can be marked or checked as read only. But ".self::objToStr($entity)." is not"); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | static public function newEntitiesFoundThroughRelationships($newEntitiesWithAssociations) |
78 | 78 | { |
79 | 79 | $errorMessages = array_map( |
80 | - function (array $newEntityWithAssociation) : string { |
|
80 | + function(array $newEntityWithAssociation) : string { |
|
81 | 81 | [$associationMetadata, $entity] = $newEntityWithAssociation; |
82 | 82 | |
83 | 83 | return self::newEntityFoundThroughRelationshipMessage($associationMetadata, $entity); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | */ |
150 | 150 | static public function entityNotManaged($entity) |
151 | 151 | { |
152 | - return new self("Entity " . self::objToStr($entity) . " is not managed. An entity is managed if its fetched " . |
|
152 | + return new self("Entity ".self::objToStr($entity)." is not managed. An entity is managed if its fetched ". |
|
153 | 153 | "from the database or registered as new through EntityManager#persist"); |
154 | 154 | } |
155 | 155 | |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | */ |
162 | 162 | static public function entityHasNoIdentity($entity, $operation) |
163 | 163 | { |
164 | - return new self("Entity has no identity, therefore " . $operation ." cannot be performed. " . self::objToStr($entity)); |
|
164 | + return new self("Entity has no identity, therefore ".$operation." cannot be performed. ".self::objToStr($entity)); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | */ |
173 | 173 | static public function entityIsRemoved($entity, $operation) |
174 | 174 | { |
175 | - return new self("Entity is removed, therefore " . $operation ." cannot be performed. " . self::objToStr($entity)); |
|
175 | + return new self("Entity is removed, therefore ".$operation." cannot be performed. ".self::objToStr($entity)); |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | /** |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | */ |
184 | 184 | static public function detachedEntityCannot($entity, $operation) |
185 | 185 | { |
186 | - return new self("Detached entity " . self::objToStr($entity) . " cannot be " . $operation); |
|
186 | + return new self("Detached entity ".self::objToStr($entity)." cannot be ".$operation); |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | /** |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | */ |
196 | 196 | public static function invalidObject($context, $given, $parameterIndex = 1) |
197 | 197 | { |
198 | - return new self($context . ' expects parameter ' . $parameterIndex . |
|
199 | - ' to be an entity object, '. gettype($given) . ' given.'); |
|
198 | + return new self($context.' expects parameter '.$parameterIndex. |
|
199 | + ' to be an entity object, '.gettype($given).' given.'); |
|
200 | 200 | } |
201 | 201 | |
202 | 202 | /** |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | */ |
205 | 205 | public static function invalidCompositeIdentifier() |
206 | 206 | { |
207 | - return new self("Binding an entity with a composite primary key to a query is not supported. " . |
|
207 | + return new self("Binding an entity with a composite primary key to a query is not supported. ". |
|
208 | 208 | "You should split the parameter into the explicit fields and bind them separately."); |
209 | 209 | } |
210 | 210 | |
@@ -261,15 +261,15 @@ discard block |
||
261 | 261 | private static function newEntityFoundThroughRelationshipMessage(AssociationMetadata $association, $entity) : string |
262 | 262 | { |
263 | 263 | return 'A new entity was found through the relationship \'' |
264 | - . $association->getSourceEntity() . '#' . $association->getName() . '\' that was not' |
|
265 | - . ' configured to cascade persist operations for entity: ' . self::objToStr($entity) . '.' |
|
264 | + . $association->getSourceEntity().'#'.$association->getName().'\' that was not' |
|
265 | + . ' configured to cascade persist operations for entity: '.self::objToStr($entity).'.' |
|
266 | 266 | . ' To solve this issue: Either explicitly call EntityManager#persist()' |
267 | 267 | . ' on this unknown entity or configure cascade persist' |
268 | 268 | . ' this association in the mapping for example @ManyToOne(..,cascade={"persist"}).' |
269 | 269 | . (method_exists($entity, '__toString') |
270 | 270 | ? '' |
271 | 271 | : ' If you cannot find out which entity causes the problem implement \'' |
272 | - . $association->getTargetEntity() . '#__toString()\' to get a clue.' |
|
272 | + . $association->getTargetEntity().'#__toString()\' to get a clue.' |
|
273 | 273 | ); |
274 | 274 | } |
275 | 275 | } |