Passed
Pull Request — master (#7448)
by Ilya
14:31
created
tests/Doctrine/Tests/ORM/Query/ParameterTypeInfererTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,16 +19,16 @@
 block discarded – undo
19 19
     public function providerParameterTypeInferer()
20 20
     {
21 21
         $data = [
22
-            [1,                 Type::INTEGER],
23
-            ['bar',             ParameterType::STRING],
24
-            ['1',               ParameterType::STRING],
25
-            [new DateTime(),     Type::DATETIME],
22
+            [1, Type::INTEGER],
23
+            ['bar', ParameterType::STRING],
24
+            ['1', ParameterType::STRING],
25
+            [new DateTime(), Type::DATETIME],
26 26
             [new DateInterval('P1D'), Type::DATEINTERVAL],
27
-            [[2],          Connection::PARAM_INT_ARRAY],
28
-            [['foo'],      Connection::PARAM_STR_ARRAY],
29
-            [['1','2'],    Connection::PARAM_STR_ARRAY],
30
-            [[],           Connection::PARAM_STR_ARRAY],
31
-            [true,              Type::BOOLEAN],
27
+            [[2], Connection::PARAM_INT_ARRAY],
28
+            [['foo'], Connection::PARAM_STR_ARRAY],
29
+            [['1', '2'], Connection::PARAM_STR_ARRAY],
30
+            [[], Connection::PARAM_STR_ARRAY],
31
+            [true, Type::BOOLEAN],
32 32
         ];
33 33
 
34 34
         if (PHP_VERSION_ID >= 50500) {
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Cache/FileLockRegionTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
     protected function createRegion()
61 61
     {
62
-        $this->directory = sys_get_temp_dir() . '/doctrine_lock_' . uniqid();
62
+        $this->directory = sys_get_temp_dir().'/doctrine_lock_'.uniqid();
63 63
 
64 64
         $region = new DefaultRegion('concurren_region_test', $this->cache);
65 65
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         $reflectionDirectory->setAccessible(true);
263 263
         $reflectionDirectory->setValue($region, str_repeat('a', 10000));
264 264
 
265
-        set_error_handler(static function () {
265
+        set_error_handler(static function() {
266 266
         }, E_WARNING);
267 267
         self::assertTrue($region->evictAll());
268 268
         restore_error_handler();
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
     {
276 276
         $path = $path ?: $this->directory;
277 277
 
278
-        if (! is_dir($path)) {
278
+        if ( ! is_dir($path)) {
279 279
             return;
280 280
         }
281 281
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/PersistentCollectionTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
             ->expects(self::once())
174 174
             ->method('loadCollection')
175 175
             ->with($this->collection)
176
-            ->willReturnCallback(static function (PersistentCollection $persistentCollection) use ($persistedElement) : void {
176
+            ->willReturnCallback(static function(PersistentCollection $persistentCollection) use ($persistedElement) : void {
177 177
                 $persistentCollection->unwrap()->add($persistedElement);
178 178
             });
179 179
 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
             ->expects(self::once())
211 211
             ->method('loadCollection')
212 212
             ->with($this->collection)
213
-            ->willReturnCallback(static function (PersistentCollection $persistentCollection) use (
213
+            ->willReturnCallback(static function(PersistentCollection $persistentCollection) use (
214 214
                 $persistedElement,
215 215
                 $newElementThatIsAlsoPersisted
216 216
             ) : void {
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
             ->expects(self::once())
253 253
             ->method('loadCollection')
254 254
             ->with($this->collection)
255
-            ->willReturnCallback(static function (PersistentCollection $persistentCollection) use (
255
+            ->willReturnCallback(static function(PersistentCollection $persistentCollection) use (
256 256
                 $persistedElement,
257 257
                 $newElementThatIsAlsoPersisted
258 258
             ) : void {
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/CMS/CmsComment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,6 +35,6 @@
 block discarded – undo
35 35
 
36 36
     public function __toString()
37 37
     {
38
-        return self::class . '[id=' . $this->id . ']';
38
+        return self::class.'[id='.$this->id.']';
39 39
     }
40 40
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/TestInit.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,20 +15,20 @@
 block discarded – undo
15 15
 error_reporting(E_ALL | E_STRICT);
16 16
 date_default_timezone_set('UTC');
17 17
 
18
-if (file_exists(__DIR__ . '/../../../vendor/autoload.php')) {
18
+if (file_exists(__DIR__.'/../../../vendor/autoload.php')) {
19 19
     // dependencies were installed via composer - this is the main project
20
-    require __DIR__ . '/../../../vendor/autoload.php';
21
-} elseif (file_exists(__DIR__ . '/../../../../../autoload.php')) {
20
+    require __DIR__.'/../../../vendor/autoload.php';
21
+} elseif (file_exists(__DIR__.'/../../../../../autoload.php')) {
22 22
     // installed as a dependency in `vendor`
23
-    require __DIR__ . '/../../../../../autoload.php';
23
+    require __DIR__.'/../../../../../autoload.php';
24 24
 } else {
25 25
     throw new Exception('Can\'t find autoload.php. Did you install dependencies via composer?');
26 26
 }
27 27
 
28
-if (! file_exists(__DIR__ . '/Proxies') && ! mkdir(__DIR__ . '/Proxies')) {
29
-    throw new Exception('Could not create ' . __DIR__ . '/Proxies Folder.');
28
+if ( ! file_exists(__DIR__.'/Proxies') && ! mkdir(__DIR__.'/Proxies')) {
29
+    throw new Exception('Could not create '.__DIR__.'/Proxies Folder.');
30 30
 }
31 31
 
32
-if (! file_exists(__DIR__ . '/ORM/Proxy/generated') && ! mkdir(__DIR__ . '/ORM/Proxy/generated')) {
33
-    throw new Exception('Could not create ' . __DIR__ . '/ORM/Proxy/generated Folder.');
32
+if ( ! file_exists(__DIR__.'/ORM/Proxy/generated') && ! mkdir(__DIR__.'/ORM/Proxy/generated')) {
33
+    throw new Exception('Could not create '.__DIR__.'/ORM/Proxy/generated Folder.');
34 34
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         string $className,
89 89
         ClassMetadataBuildingContext $metadataBuildingContext
90 90
     ) : ?ClassMetadata {
91
-        if (! $this->evm->hasListeners(Events::onClassMetadataNotFound)) {
91
+        if ( ! $this->evm->hasListeners(Events::onClassMetadataNotFound)) {
92 92
             return null;
93 93
         }
94 94
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                 $classMetadata->setCache(clone $parent->getCache());
150 150
             }
151 151
 
152
-            if (! empty($parent->entityListeners) && empty($classMetadata->entityListeners)) {
152
+            if ( ! empty($parent->entityListeners) && empty($classMetadata->entityListeners)) {
153 153
                 $classMetadata->entityListeners = $parent->entityListeners;
154 154
             }
155 155
         }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
     protected function completeRuntimeMetadata(ClassMetadata $class, ?ClassMetadata $parent = null) : void
172 172
     {
173
-        if (! $parent || ! $parent->isMappedSuperclass) {
173
+        if ( ! $parent || ! $parent->isMappedSuperclass) {
174 174
             return;
175 175
         }
176 176
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                 continue;
189 189
             }
190 190
 
191
-            if (! ($property instanceof ToOneAssociationMetadata)) {
191
+            if ( ! ($property instanceof ToOneAssociationMetadata)) {
192 192
                 continue;
193 193
             }
194 194
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
      */
208 208
     protected function validateRuntimeMetadata(ClassMetadata $class, ?ClassMetadata $parent = null) : void
209 209
     {
210
-        if (! $class->getReflectionClass()) {
210
+        if ( ! $class->getReflectionClass()) {
211 211
             // only validate if there is a reflection class instance
212 212
             return;
213 213
         }
@@ -217,13 +217,13 @@  discard block
 block discarded – undo
217 217
         $class->validateLifecycleCallbacks($this->getReflectionService());
218 218
 
219 219
         // verify inheritance
220
-        if (! $class->isMappedSuperclass && $class->inheritanceType !== InheritanceType::NONE) {
221
-            if (! $parent) {
222
-                if (! $class->discriminatorMap) {
220
+        if ( ! $class->isMappedSuperclass && $class->inheritanceType !== InheritanceType::NONE) {
221
+            if ( ! $parent) {
222
+                if ( ! $class->discriminatorMap) {
223 223
                     throw MappingException::missingDiscriminatorMap($class->getClassName());
224 224
                 }
225 225
 
226
-                if (! $class->discriminatorColumn) {
226
+                if ( ! $class->discriminatorColumn) {
227 227
                     throw MappingException::missingDiscriminatorColumn($class->getClassName());
228 228
                 }
229 229
             }
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
     private function completeIdentifierGeneratorMappings(ClassMetadata $class) : void
291 291
     {
292 292
         foreach ($class->getDeclaredPropertiesIterator() as $property) {
293
-            if (! $property instanceof FieldMetadata /*&& ! $property instanceof AssocationMetadata*/) {
293
+            if ( ! $property instanceof FieldMetadata /*&& ! $property instanceof AssocationMetadata*/) {
294 294
                 continue;
295 295
             }
296 296
 
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 
301 301
     private function completeFieldIdentifierGeneratorMapping(FieldMetadata $field)
302 302
     {
303
-        if (! $field->hasValueGenerator()) {
303
+        if ( ! $field->hasValueGenerator()) {
304 304
             return;
305 305
         }
306 306
 
@@ -352,10 +352,10 @@  discard block
 block discarded – undo
352 352
 
353 353
             case GeneratorType::CUSTOM:
354 354
                 $definition = $generator->getDefinition();
355
-                if (! isset($definition['class'])) {
355
+                if ( ! isset($definition['class'])) {
356 356
                     throw InvalidCustomGenerator::onClassNotConfigured();
357 357
                 }
358
-                if (! class_exists($definition['class'])) {
358
+                if ( ! class_exists($definition['class'])) {
359 359
                     throw InvalidCustomGenerator::onMissingClass($definition);
360 360
                 }
361 361
 
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 
389 389
     private function getTargetPlatform() : Platforms\AbstractPlatform
390 390
     {
391
-        if (! $this->targetPlatform) {
391
+        if ( ! $this->targetPlatform) {
392 392
             $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform();
393 393
         }
394 394
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
     ) {
144 144
         $this->reverseEngineerMappingFromDatabase();
145 145
 
146
-        if (! isset($this->classToTableNames[$className])) {
147
-            throw new InvalidArgumentException('Unknown class ' . $className);
146
+        if ( ! isset($this->classToTableNames[$className])) {
147
+            throw new InvalidArgumentException('Unknown class '.$className);
148 148
         }
149 149
 
150 150
         // @todo guilhermeblanco This should somehow disappear... =)
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
                     }
175 175
                 }
176 176
 
177
-                if (! $otherFk) {
177
+                if ( ! $otherFk) {
178 178
                     // the definition of this many to many table does not contain
179 179
                     // enough foreign key information to continue reverse engineering.
180 180
                     continue;
@@ -255,9 +255,9 @@  discard block
 block discarded – undo
255 255
                 $allForeignKeyColumns = array_merge($allForeignKeyColumns, $foreignKey->getLocalColumns());
256 256
             }
257 257
 
258
-            if (! $table->hasPrimaryKey()) {
258
+            if ( ! $table->hasPrimaryKey()) {
259 259
                 throw new Mapping\MappingException(
260
-                    'Table ' . $table->getName() . ' has no primary key. Doctrine does not ' .
260
+                    'Table '.$table->getName().' has no primary key. Doctrine does not '.
261 261
                     "support reverse engineering from tables that don't have a primary key."
262 262
                 );
263 263
             }
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
             }
448 448
 
449 449
             // Here we need to check if $fkColumns are the same as $primaryKeys
450
-            if (! array_diff($fkColumns, $primaryKeys)) {
450
+            if ( ! array_diff($fkColumns, $primaryKeys)) {
451 451
                 $metadata->addProperty($associationMapping);
452 452
             } else {
453 453
                 $metadata->addProperty($associationMapping);
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
      */
493 493
     private function getClassNameForTable($tableName)
494 494
     {
495
-        return $this->namespace . (
495
+        return $this->namespace.(
496 496
             $this->classNamesForTables[$tableName]
497 497
                 ?? Inflector::classify(strtolower($tableName))
498 498
         );
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
                 // It's a joined result
86 86
 
87 87
                 $parent = $this->rsm->parentAliasMap[$dqlAlias];
88
-                $path   = $parent . '.' . $dqlAlias;
88
+                $path   = $parent.'.'.$dqlAlias;
89 89
 
90 90
                 // missing parent data, skipping as RIGHT JOIN hydration is not supported.
91
-                if (! isset($nonemptyComponents[$parent])) {
91
+                if ( ! isset($nonemptyComponents[$parent])) {
92 92
                     continue;
93 93
                 }
94 94
 
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
                 if ($this->rsm->isMixed && isset($this->rootAliases[$parent])) {
98 98
                     $first = reset($this->resultPointers);
99 99
                     // TODO: Exception if $key === null ?
100
-                    $baseElement =& $this->resultPointers[$parent][key($first)];
100
+                    $baseElement = & $this->resultPointers[$parent][key($first)];
101 101
                 } elseif (isset($this->resultPointers[$parent])) {
102
-                    $baseElement =& $this->resultPointers[$parent];
102
+                    $baseElement = & $this->resultPointers[$parent];
103 103
                 } else {
104 104
                     unset($this->resultPointers[$dqlAlias]); // Ticket #1228
105 105
 
@@ -111,10 +111,10 @@  discard block
 block discarded – undo
111 111
                 $relation      = $parentClass->getProperty($relationAlias);
112 112
 
113 113
                 // Check the type of the relation (many or single-valued)
114
-                if (! $relation instanceof ToOneAssociationMetadata) {
114
+                if ( ! $relation instanceof ToOneAssociationMetadata) {
115 115
                     $oneToOne = false;
116 116
 
117
-                    if (! isset($baseElement[$relationAlias])) {
117
+                    if ( ! isset($baseElement[$relationAlias])) {
118 118
                         $baseElement[$relationAlias] = [];
119 119
                     }
120 120
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                         $index        = $indexExists ? $this->identifierMap[$path][$id[$parent]][$id[$dqlAlias]] : false;
124 124
                         $indexIsValid = $index !== false ? isset($baseElement[$relationAlias][$index]) : false;
125 125
 
126
-                        if (! $indexExists || ! $indexIsValid) {
126
+                        if ( ! $indexExists || ! $indexIsValid) {
127 127
                             $element = $data;
128 128
 
129 129
                             if (isset($this->rsm->indexByMap[$dqlAlias])) {
@@ -140,16 +140,16 @@  discard block
 block discarded – undo
140 140
                 } else {
141 141
                     $oneToOne = true;
142 142
 
143
-                    if (! isset($nonemptyComponents[$dqlAlias]) &&
143
+                    if ( ! isset($nonemptyComponents[$dqlAlias]) &&
144 144
                         ( ! isset($baseElement[$relationAlias]))
145 145
                     ) {
146 146
                         $baseElement[$relationAlias] = null;
147
-                    } elseif (! isset($baseElement[$relationAlias])) {
147
+                    } elseif ( ! isset($baseElement[$relationAlias])) {
148 148
                         $baseElement[$relationAlias] = $data;
149 149
                     }
150 150
                 }
151 151
 
152
-                $coll =& $baseElement[$relationAlias];
152
+                $coll = & $baseElement[$relationAlias];
153 153
 
154 154
                 if (is_array($coll)) {
155 155
                     $this->updateResultPointer($coll, $index, $dqlAlias, $oneToOne);
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
                 $entityKey                    = $this->rsm->entityMappings[$dqlAlias] ?: 0;
162 162
 
163 163
                 // if this row has a NULL value for the root result id then make it a null result.
164
-                if (! isset($nonemptyComponents[$dqlAlias])) {
164
+                if ( ! isset($nonemptyComponents[$dqlAlias])) {
165 165
                     $result[] = $this->rsm->isMixed
166 166
                         ? [$entityKey => null]
167 167
                         : null;
@@ -198,13 +198,13 @@  discard block
 block discarded – undo
198 198
             }
199 199
         }
200 200
 
201
-        if (! isset($resultKey)) {
201
+        if ( ! isset($resultKey)) {
202 202
             $this->resultCounter++;
203 203
         }
204 204
 
205 205
         // Append scalar values to mixed result sets
206 206
         if (isset($rowData['scalars'])) {
207
-            if (! isset($resultKey)) {
207
+            if ( ! isset($resultKey)) {
208 208
                 // this only ever happens when no object is fetched (scalar result only)
209 209
                 $resultKey = isset($this->rsm->indexByMap['scalars'])
210 210
                     ? $row[$this->rsm->indexByMap['scalars']]
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
         // Append new object to mixed result sets
220 220
         if (isset($rowData['newObjects'])) {
221
-            if (! isset($resultKey)) {
221
+            if ( ! isset($resultKey)) {
222 222
                 $resultKey = $this->resultCounter - 1;
223 223
             }
224 224
 
@@ -259,22 +259,22 @@  discard block
 block discarded – undo
259 259
         }
260 260
 
261 261
         if ($oneToOne) {
262
-            $this->resultPointers[$dqlAlias] =& $coll;
262
+            $this->resultPointers[$dqlAlias] = & $coll;
263 263
 
264 264
             return;
265 265
         }
266 266
 
267 267
         if ($index !== false) {
268
-            $this->resultPointers[$dqlAlias] =& $coll[$index];
268
+            $this->resultPointers[$dqlAlias] = & $coll[$index];
269 269
 
270 270
             return;
271 271
         }
272 272
 
273
-        if (! $coll) {
273
+        if ( ! $coll) {
274 274
             return;
275 275
         }
276 276
 
277 277
         end($coll);
278
-        $this->resultPointers[$dqlAlias] =& $coll[key($coll)];
278
+        $this->resultPointers[$dqlAlias] = & $coll[key($coll)];
279 279
     }
280 280
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/MappingException.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public static function pathRequired()
24 24
     {
25
-        return new self('Specifying the paths to your entities is required ' .
25
+        return new self('Specifying the paths to your entities is required '.
26 26
             'in the AnnotationDriver to retrieve all class names.');
27 27
     }
28 28
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     public static function missingQueryMapping($entity, $queryName)
214 214
     {
215
-        return new self('Query named "' . $queryName . '" in "' . $entity . ' requires a result class or result set mapping.');
215
+        return new self('Query named "'.$queryName.'" in "'.$entity.' requires a result class or result set mapping.');
216 216
     }
217 217
 
218 218
     /**
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      */
224 224
     public static function missingResultSetMappingEntity($entity, $resultName)
225 225
     {
226
-        return new self('Result set mapping named "' . $resultName . '" in "' . $entity . ' requires a entity class name.');
226
+        return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a entity class name.');
227 227
     }
228 228
 
229 229
     /**
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      */
235 235
     public static function missingResultSetMappingFieldName($entity, $resultName)
236 236
     {
237
-        return new self('Result set mapping named "' . $resultName . '" in "' . $entity . ' requires a field name.');
237
+        return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a field name.');
238 238
     }
239 239
 
240 240
     /**
@@ -281,8 +281,8 @@  discard block
 block discarded – undo
281 281
     {
282 282
         $message = sprintf("The mapping of field '%s' is invalid: The option '%s' is required.", $field, $expectedOption);
283 283
 
284
-        if (! empty($hint)) {
285
-            $message .= ' (Hint: ' . $hint . ')';
284
+        if ( ! empty($hint)) {
285
+            $message .= ' (Hint: '.$hint.')';
286 286
         }
287 287
 
288 288
         return new self($message);
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
      */
312 312
     public static function reflectionFailure($entity, ReflectionException $previousException)
313 313
     {
314
-        return new self('An error occurred in ' . $entity, 0, $previousException);
314
+        return new self('An error occurred in '.$entity, 0, $previousException);
315 315
     }
316 316
 
317 317
     /**
@@ -322,8 +322,8 @@  discard block
 block discarded – undo
322 322
      */
323 323
     public static function joinColumnMustPointToMappedField($className, $joinColumn)
324 324
     {
325
-        return new self('The column ' . $joinColumn . ' must be mapped to a field in class '
326
-            . $className . ' since it is referenced by a join column of another class.');
325
+        return new self('The column '.$joinColumn.' must be mapped to a field in class '
326
+            . $className.' since it is referenced by a join column of another class.');
327 327
     }
328 328
 
329 329
     /**
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
      */
358 358
     public static function propertyTypeIsRequired($className, $propertyName)
359 359
     {
360
-        return new self("The attribute 'type' is required for the column description of property " . $className . '::$' . $propertyName . '.');
360
+        return new self("The attribute 'type' is required for the column description of property ".$className.'::$'.$propertyName.'.');
361 361
     }
362 362
 
363 363
     /**
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
      */
368 368
     public static function tableIdGeneratorNotImplemented($className)
369 369
     {
370
-        return new self('TableIdGenerator is not yet implemented for use with class ' . $className);
370
+        return new self('TableIdGenerator is not yet implemented for use with class '.$className);
371 371
     }
372 372
 
373 373
     /**
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
      */
394 394
     public static function duplicateQueryMapping($entity, $queryName)
395 395
     {
396
-        return new self('Query named "' . $queryName . '" in "' . $entity . '" was already declared, but it must be declared only once');
396
+        return new self('Query named "'.$queryName.'" in "'.$entity.'" was already declared, but it must be declared only once');
397 397
     }
398 398
 
399 399
     /**
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
      */
405 405
     public static function duplicateResultSetMapping($entity, $resultName)
406 406
     {
407
-        return new self('Result set mapping named "' . $resultName . '" in "' . $entity . '" was already declared, but it must be declared only once');
407
+        return new self('Result set mapping named "'.$resultName.'" in "'.$entity.'" was already declared, but it must be declared only once');
408 408
     }
409 409
 
410 410
     /**
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
      */
415 415
     public static function singleIdNotAllowedOnCompositePrimaryKey($entity)
416 416
     {
417
-        return new self('Single id is not allowed on composite primary key in entity ' . $entity);
417
+        return new self('Single id is not allowed on composite primary key in entity '.$entity);
418 418
     }
419 419
 
420 420
     /**
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
      */
425 425
     public static function noIdDefined($entity)
426 426
     {
427
-        return new self('No ID defined for entity ' . $entity);
427
+        return new self('No ID defined for entity '.$entity);
428 428
     }
429 429
 
430 430
     /**
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
      */
435 435
     public static function unsupportedOptimisticLockingType($unsupportedType)
436 436
     {
437
-        return new self('Locking type "' . $unsupportedType . '" is not supported by Doctrine.');
437
+        return new self('Locking type "'.$unsupportedType.'" is not supported by Doctrine.');
438 438
     }
439 439
 
440 440
     /**
@@ -444,13 +444,13 @@  discard block
 block discarded – undo
444 444
      */
445 445
     public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null)
446 446
     {
447
-        if (! empty($path)) {
448
-            $path = '[' . $path . ']';
447
+        if ( ! empty($path)) {
448
+            $path = '['.$path.']';
449 449
         }
450 450
 
451 451
         return new self(
452
-            'File mapping drivers must have a valid directory path, ' .
453
-            'however the given path ' . $path . ' seems to be incorrect!'
452
+            'File mapping drivers must have a valid directory path, '.
453
+            'however the given path '.$path.' seems to be incorrect!'
454 454
         );
455 455
     }
456 456
 
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
     public static function invalidClassInDiscriminatorMap($className, $owningClass)
467 467
     {
468 468
         return new self(sprintf(
469
-            "Entity class '%s' used in the discriminator map of class '%s' " .
469
+            "Entity class '%s' used in the discriminator map of class '%s' ".
470 470
             'does not exist.',
471 471
             $className,
472 472
             $owningClass
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
     public static function sqlConversionNotAllowedForPrimaryKeyProperties($className, Property $property)
533 533
     {
534 534
         return new self(sprintf(
535
-            'It is not possible to set id field "%s" to type "%s" in entity class "%s". ' .
535
+            'It is not possible to set id field "%s" to type "%s" in entity class "%s". '.
536 536
             'The type "%s" requires conversion SQL which is not allowed for identifiers.',
537 537
             $property->getName(),
538 538
             $property->getTypeName(),
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
      */
569 569
     public static function duplicateColumnName($className, $columnName)
570 570
     {
571
-        return new self("Duplicate definition of column '" . $columnName . "' on entity '" . $className . "' in a field or discriminator column mapping.");
571
+        return new self("Duplicate definition of column '".$columnName."' on entity '".$className."' in a field or discriminator column mapping.");
572 572
     }
573 573
 
574 574
     /**
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
      */
580 580
     public static function illegalToManyAssociationOnMappedSuperclass($className, $field)
581 581
     {
582
-        return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '" . $className . '#' . $field . "'.");
582
+        return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '".$className.'#'.$field."'.");
583 583
     }
584 584
 
585 585
     /**
@@ -591,8 +591,8 @@  discard block
 block discarded – undo
591 591
      */
592 592
     public static function cannotMapCompositePrimaryKeyEntitiesAsForeignId($className, $targetEntity, $targetField)
593 593
     {
594
-        return new self("It is not possible to map entity '" . $className . "' with a composite primary key " .
595
-            "as part of the primary key of another entity '" . $targetEntity . '#' . $targetField . "'.");
594
+        return new self("It is not possible to map entity '".$className."' with a composite primary key ".
595
+            "as part of the primary key of another entity '".$targetEntity.'#'.$targetField."'.");
596 596
     }
597 597
 
598 598
     /**
@@ -646,8 +646,8 @@  discard block
 block discarded – undo
646 646
      */
647 647
     public static function illegalOrphanRemoval($className, $field)
648 648
     {
649
-        return new self('Orphan removal is only allowed on one-to-one and one-to-many ' .
650
-            'associations, but ' . $className . '#' . $field . ' is not.');
649
+        return new self('Orphan removal is only allowed on one-to-one and one-to-many '.
650
+            'associations, but '.$className.'#'.$field.' is not.');
651 651
     }
652 652
 
653 653
     /**
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
      */
680 680
     public static function noInheritanceOnMappedSuperClass($className)
681 681
     {
682
-        return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'.");
682
+        return new self("It is not supported to define inheritance information on a mapped superclass '".$className."'.");
683 683
     }
684 684
 
685 685
     /**
@@ -691,8 +691,8 @@  discard block
 block discarded – undo
691 691
     public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName)
692 692
     {
693 693
         return new self(
694
-            "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " .
695
-            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '" . $className . "' an abstract class " .
694
+            "Entity '".$className."' has to be part of the discriminator map of '".$rootClassName."' ".
695
+            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class ".
696 696
             'to avoid this exception from occurring.'
697 697
         );
698 698
     }
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
      */
706 706
     public static function lifecycleCallbackMethodNotFound($className, $methodName)
707 707
     {
708
-        return new self("Entity '" . $className . "' has no method '" . $methodName . "' to be registered as lifecycle callback.");
708
+        return new self("Entity '".$className."' has no method '".$methodName."' to be registered as lifecycle callback.");
709 709
     }
710 710
 
711 711
     /**
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
      */
752 752
     public static function invalidFetchMode($className, $annotation)
753 753
     {
754
-        return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'");
754
+        return new self("Entity '".$className."' has a mapping with invalid fetch mode '".$annotation."'");
755 755
     }
756 756
 
757 757
     /**
@@ -761,7 +761,7 @@  discard block
 block discarded – undo
761 761
      */
762 762
     public static function compositeKeyAssignedIdGeneratorRequired($className)
763 763
     {
764
-        return new self("Entity '" . $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported.");
764
+        return new self("Entity '".$className."' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported.");
765 765
     }
766 766
 
767 767
     /**
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
      */
774 774
     public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName)
775 775
     {
776
-        return new self("The target-entity '" . $targetEntity . "' cannot be found in '" . $sourceEntity . '#' . $associationName . "'.");
776
+        return new self("The target-entity '".$targetEntity."' cannot be found in '".$sourceEntity.'#'.$associationName."'.");
777 777
     }
778 778
 
779 779
     /**
@@ -785,8 +785,8 @@  discard block
 block discarded – undo
785 785
      */
786 786
     public static function invalidCascadeOption(array $cascades, $className, $propertyName)
787 787
     {
788
-        $cascades = implode(', ', array_map(static function ($e) {
789
-            return "'" . $e . "'";
788
+        $cascades = implode(', ', array_map(static function($e) {
789
+            return "'".$e."'";
790 790
         }, $cascades));
791 791
 
792 792
         return new self(sprintf(
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
     {
820 820
         return new self(
821 821
             sprintf(
822
-                'Infinite nesting detected for embedded property %s::%s. ' .
822
+                'Infinite nesting detected for embedded property %s::%s. '.
823 823
                 'You cannot embed an embeddable from the same type inside an embeddable.',
824 824
                 $className,
825 825
                 $propertyName
@@ -834,7 +834,7 @@  discard block
 block discarded – undo
834 834
     {
835 835
         return new self(
836 836
             sprintf(
837
-                'Class %s not found in namespaces %s.' .
837
+                'Class %s not found in namespaces %s.'.
838 838
                 $className,
839 839
                 implode(', ', $namespaces)
840 840
             )
Please login to merge, or discard this patch.