@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | try { |
45 | 45 | $sqlGenerated = $this->generateSql($dqlToBeTested, $treeWalkers, $outputWalker); |
46 | 46 | } catch (\Exception $e) { |
47 | - $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine()); |
|
47 | + $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine()); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | self::assertEquals($sqlToBeConfirmed, $sqlGenerated); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $condExpr = $whereClause->conditionalExpression; |
145 | 145 | |
146 | 146 | // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression |
147 | - if (! ($condExpr instanceof Query\AST\ConditionalExpression)) { |
|
147 | + if ( ! ($condExpr instanceof Query\AST\ConditionalExpression)) { |
|
148 | 148 | $condExpr = new Query\AST\ConditionalExpression([$condExpr]); |
149 | 149 | |
150 | 150 | $whereClause->conditionalExpression = $condExpr; |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $singleTerm = $selectStatement->whereClause->conditionalExpression->conditionalTerms[0]; |
168 | 168 | |
169 | 169 | // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression |
170 | - if (! ($singleTerm instanceof Query\AST\ConditionalTerm)) { |
|
170 | + if ( ! ($singleTerm instanceof Query\AST\ConditionalTerm)) { |
|
171 | 171 | $singleTerm = new Query\AST\ConditionalTerm([$singleTerm]); |
172 | 172 | |
173 | 173 | $selectStatement->whereClause->conditionalExpression->conditionalTerms[0] = $singleTerm; |
@@ -205,9 +205,9 @@ discard block |
||
205 | 205 | { |
206 | 206 | $rangeVariableDecl = $identificationVariableDecl->rangeVariableDeclaration; |
207 | 207 | $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address'); |
208 | - $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null); |
|
208 | + $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null); |
|
209 | 209 | $join = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration); |
210 | - $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false); |
|
210 | + $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false); |
|
211 | 211 | |
212 | 212 | $identificationVariableDecl->joins[] = $join; |
213 | 213 | $selectStatement->selectClause->selectExpressions[] = $selectExpression; |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class); |
218 | 218 | |
219 | 219 | $this->setQueryComponent( |
220 | - $rangeVariableDecl->aliasIdentificationVariable . 'a', |
|
220 | + $rangeVariableDecl->aliasIdentificationVariable.'a', |
|
221 | 221 | [ |
222 | 222 | 'metadata' => $addressMetadata, |
223 | 223 | 'parent' => $rangeVariableDecl->aliasIdentificationVariable, |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | self::isInstanceOf(CompanyEmployee::class) |
225 | 225 | ) |
226 | 226 | ) |
227 | - ->willReturnCallback(function (array $id, CompanyEmployee $companyEmployee) { |
|
227 | + ->willReturnCallback(function(array $id, CompanyEmployee $companyEmployee) { |
|
228 | 228 | $companyEmployee->setSalary(1000); // A property on the CompanyEmployee |
229 | 229 | $companyEmployee->setName('Bob'); // A property on the parent class, CompanyPerson |
230 | 230 | |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | self::isInstanceOf(ComparableObject::class) |
287 | 287 | ) |
288 | 288 | ) |
289 | - ->willReturnCallback(function (array $id, ComparableObject $comparableObject) { |
|
289 | + ->willReturnCallback(function(array $id, ComparableObject $comparableObject) { |
|
290 | 290 | $comparableObject->setComparedFieldValue(json_encode($id)); |
291 | 291 | |
292 | 292 | return $comparableObject; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | public function tearDown() : void |
37 | 37 | { |
38 | - if (! $this->originalIncludePath) { |
|
38 | + if ( ! $this->originalIncludePath) { |
|
39 | 39 | return; |
40 | 40 | } |
41 | 41 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | public function testDirectoryAutoload() : void |
52 | 52 | { |
53 | - Setup::registerAutoloadDirectory(__DIR__ . '/../../../../../vendor/doctrine/common/lib'); |
|
53 | + Setup::registerAutoloadDirectory(__DIR__.'/../../../../../vendor/doctrine/common/lib'); |
|
54 | 54 | |
55 | 55 | self::assertCount($this->originalAutoloaderCount + 2, spl_autoload_functions()); |
56 | 56 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $config = Setup::createConfiguration(false, __DIR__); |
82 | 82 | $cache = $config->getMetadataCacheImpl(); |
83 | 83 | |
84 | - self::assertSame('dc2_' . md5(__DIR__) . '_', $cache->getNamespace()); |
|
84 | + self::assertSame('dc2_'.md5(__DIR__).'_', $cache->getNamespace()); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $config = Setup::createConfiguration(false, __DIR__, new ArrayCache()); |
93 | 93 | $cache = $config->getMetadataCacheImpl(); |
94 | 94 | |
95 | - self::assertSame('dc2_' . md5(__DIR__) . '_', $cache->getNamespace()); |
|
95 | + self::assertSame('dc2_'.md5(__DIR__).'_', $cache->getNamespace()); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $cache = $config->getMetadataCacheImpl(); |
108 | 108 | |
109 | 109 | self::assertSame($originalCache, $cache); |
110 | - self::assertSame('foo:dc2_' . md5(__DIR__) . '_', $cache->getNamespace()); |
|
110 | + self::assertSame('foo:dc2_'.md5(__DIR__).'_', $cache->getNamespace()); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | /** |
@@ -54,7 +54,7 @@ |
||
54 | 54 | return [ |
55 | 55 | $method->getName(), |
56 | 56 | [ |
57 | - function () { |
|
57 | + function() { |
|
58 | 58 | }, |
59 | 59 | ], |
60 | 60 | ]; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | ] |
27 | 27 | ); |
28 | 28 | |
29 | - touch($filename = $this->dir . '/Foo' . $this->getFileExtension()); |
|
29 | + touch($filename = $this->dir.'/Foo'.$this->getFileExtension()); |
|
30 | 30 | self::assertEquals($filename, $driver->getLocator()->findMappingFile('MyNamespace\MySubnamespace\Entity\Foo')); |
31 | 31 | } |
32 | 32 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | ] |
39 | 39 | ); |
40 | 40 | |
41 | - touch($filename = $this->dir . '/Foo.Bar' . $this->getFileExtension()); |
|
41 | + touch($filename = $this->dir.'/Foo.Bar'.$this->getFileExtension()); |
|
42 | 42 | self::assertEquals($filename, $driver->getLocator()->findMappingFile('MyNamespace\MySubnamespace\Entity\Foo\Bar')); |
43 | 43 | } |
44 | 44 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | public function testFindMappingNamespaceNotFound() : void |
60 | 60 | { |
61 | 61 | $this->expectException(MappingException::class); |
62 | - $this->expectExceptionMessage("No mapping file found named 'Foo" . $this->getFileExtension() . "' for class 'MyOtherNamespace\MySubnamespace\Entity\Foo'."); |
|
62 | + $this->expectExceptionMessage("No mapping file found named 'Foo".$this->getFileExtension()."' for class 'MyOtherNamespace\MySubnamespace\Entity\Foo'."); |
|
63 | 63 | |
64 | 64 | $driver = $this->getDriver( |
65 | 65 | [ |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | protected function setUp() : void |
74 | 74 | { |
75 | - $this->dir = sys_get_temp_dir() . '/abstract_driver_test'; |
|
75 | + $this->dir = sys_get_temp_dir().'/abstract_driver_test'; |
|
76 | 76 | @mkdir($this->dir, 0777, true); |
77 | 77 | } |
78 | 78 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | use function strtoupper; |
37 | 37 | use function unserialize; |
38 | 38 | |
39 | -require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
39 | +require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
40 | 40 | |
41 | 41 | class ClassMetadataTest extends OrmTestCase |
42 | 42 | { |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | */ |
180 | 180 | public function testMapAssociationInGlobalNamespace() : void |
181 | 181 | { |
182 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
182 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
183 | 183 | |
184 | 184 | $cm = new ClassMetadata(DoctrineGlobalArticle::class, $this->metadataBuildingContext); |
185 | 185 | $cm->setTable(new Mapping\TableMetadata('doctrine_global_article')); |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | */ |
276 | 276 | public function testSetDiscriminatorMapInGlobalNamespace() : void |
277 | 277 | { |
278 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
278 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
279 | 279 | |
280 | 280 | $cm = new ClassMetadata('DoctrineGlobalUser', $this->metadataBuildingContext); |
281 | 281 | $cm->setTable(new Mapping\TableMetadata('doctrine_global_user')); |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | */ |
292 | 292 | public function testSetSubClassesInGlobalNamespace() : void |
293 | 293 | { |
294 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
294 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
295 | 295 | |
296 | 296 | $cm = new ClassMetadata('DoctrineGlobalUser', $this->metadataBuildingContext); |
297 | 297 | $cm->setTable(new Mapping\TableMetadata('doctrine_global_user')); |
@@ -806,7 +806,7 @@ discard block |
||
806 | 806 | public function testEmptyFieldNameThrowsException() : void |
807 | 807 | { |
808 | 808 | $this->expectException(MappingException::class); |
809 | - $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '" . CMS\CmsUser::class . "'."); |
|
809 | + $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '".CMS\CmsUser::class."'."); |
|
810 | 810 | |
811 | 811 | $cm = new ClassMetadata(CMS\CmsUser::class, $this->metadataBuildingContext); |
812 | 812 | $cm->setTable(new Mapping\TableMetadata('cms_users')); |
@@ -856,7 +856,7 @@ discard block |
||
856 | 856 | $cm->addLifecycleCallback('notfound', 'postLoad'); |
857 | 857 | |
858 | 858 | $this->expectException(MappingException::class); |
859 | - $this->expectExceptionMessage("Entity '" . CMS\CmsUser::class . "' has no method 'notfound' to be registered as lifecycle callback."); |
|
859 | + $this->expectExceptionMessage("Entity '".CMS\CmsUser::class."' has no method 'notfound' to be registered as lifecycle callback."); |
|
860 | 860 | |
861 | 861 | $cm->validateLifecycleCallbacks(new RuntimeReflectionService()); |
862 | 862 | } |
@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | $cm->addProperty($association); |
877 | 877 | |
878 | 878 | $this->expectException(MappingException::class); |
879 | - $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '" . CMS\CmsUser::class . "#address'."); |
|
879 | + $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '".CMS\CmsUser::class."#address'."); |
|
880 | 880 | |
881 | 881 | $cm->validateAssociations(); |
882 | 882 | } |
@@ -1122,6 +1122,6 @@ discard block |
||
1122 | 1122 | */ |
1123 | 1123 | public function propertyToColumnName($propertyName, $className = null) |
1124 | 1124 | { |
1125 | - return strtolower($this->classToTableName($className)) . '_' . $propertyName; |
|
1125 | + return strtolower($this->classToTableName($className)).'_'.$propertyName; |
|
1126 | 1126 | } |
1127 | 1127 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | protected function loadDriverForCMSModels() |
121 | 121 | { |
122 | 122 | $annotationDriver = $this->loadDriver(); |
123 | - $annotationDriver->addPaths([__DIR__ . '/../../Models/CMS/']); |
|
123 | + $annotationDriver->addPaths([__DIR__.'/../../Models/CMS/']); |
|
124 | 124 | return $annotationDriver; |
125 | 125 | } |
126 | 126 | |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | public function testJoinTablesWithMappedSuperclassForAnnotationDriver() : void |
143 | 143 | { |
144 | 144 | $annotationDriver = $this->loadDriver(); |
145 | - $annotationDriver->addPaths([__DIR__ . '/../../Models/DirectoryTree/']); |
|
145 | + $annotationDriver->addPaths([__DIR__.'/../../Models/DirectoryTree/']); |
|
146 | 146 | |
147 | 147 | $em = $this->getTestEntityManager(); |
148 | 148 | $em->getConfiguration()->setMetadataDriverImpl($annotationDriver); |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | |
173 | 173 | $this->expectException(MappingException::class); |
174 | 174 | $this->expectExceptionMessage( |
175 | - 'It is illegal to put an inverse side one-to-many or many-to-many association on ' . |
|
175 | + 'It is illegal to put an inverse side one-to-many or many-to-many association on '. |
|
176 | 176 | "mapped superclass 'Doctrine\Tests\ORM\Mapping\InvalidMappedSuperClass#users'" |
177 | 177 | ); |
178 | 178 |
@@ -506,7 +506,7 @@ |
||
506 | 506 | 'empty string, single field' => [$emptyString, ''], |
507 | 507 | 'non-empty string, single field' => [$nonEmptyString, $nonEmptyString->id], |
508 | 508 | 'empty strings, two fields' => [$emptyStrings, ' '], |
509 | - 'non-empty strings, two fields' => [$nonEmptyStrings, $nonEmptyStrings->id1 . ' ' . $nonEmptyStrings->id2], |
|
509 | + 'non-empty strings, two fields' => [$nonEmptyStrings, $nonEmptyStrings->id1.' '.$nonEmptyStrings->id2], |
|
510 | 510 | 'boolean true' => [$booleanTrue, '1'], |
511 | 511 | 'boolean false' => [$booleanFalse, ''], |
512 | 512 | ]; |
@@ -61,7 +61,7 @@ |
||
61 | 61 | self::assertSame(array_keys($expectedId), array_keys($id)); |
62 | 62 | |
63 | 63 | foreach ($expectedId as $field => $value) { |
64 | - if (! is_object($value)) { |
|
64 | + if ( ! is_object($value)) { |
|
65 | 65 | self::assertSame($id[$field], $value); |
66 | 66 | |
67 | 67 | continue; |