@@ -344,8 +344,8 @@ discard block |
||
| 344 | 344 | 'locale' => ['value' => 'en', 'type' => DBALType::STRING], |
| 345 | 345 | ]; |
| 346 | 346 | |
| 347 | - self::assertEquals(serialize($parameters), '' . $filter); |
|
| 348 | - self::assertEquals('' . $filter, '' . $filter2); |
|
| 347 | + self::assertEquals(serialize($parameters), ''.$filter); |
|
| 348 | + self::assertEquals(''.$filter, ''.$filter2); |
|
| 349 | 349 | } |
| 350 | 350 | |
| 351 | 351 | public function testQueryCacheDependsOnFilters() : void |
@@ -1116,7 +1116,7 @@ discard block |
||
| 1116 | 1116 | return ''; |
| 1117 | 1117 | } |
| 1118 | 1118 | |
| 1119 | - return $targetTableAlias . '.deleted = 0'; |
|
| 1119 | + return $targetTableAlias.'.deleted = 0'; |
|
| 1120 | 1120 | } |
| 1121 | 1121 | } |
| 1122 | 1122 | |
@@ -1124,11 +1124,11 @@ discard block |
||
| 1124 | 1124 | { |
| 1125 | 1125 | public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) |
| 1126 | 1126 | { |
| 1127 | - if (! in_array('LocaleAware', $targetEntity->getReflectionClass()->getInterfaceNames(), true)) { |
|
| 1127 | + if ( ! in_array('LocaleAware', $targetEntity->getReflectionClass()->getInterfaceNames(), true)) { |
|
| 1128 | 1128 | return ''; |
| 1129 | 1129 | } |
| 1130 | 1130 | |
| 1131 | - return $targetTableAlias . '.locale = ' . $this->getParameter('locale'); // getParam uses connection to quote the value. |
|
| 1131 | + return $targetTableAlias.'.locale = '.$this->getParameter('locale'); // getParam uses connection to quote the value. |
|
| 1132 | 1132 | } |
| 1133 | 1133 | } |
| 1134 | 1134 | |
@@ -1140,7 +1140,7 @@ discard block |
||
| 1140 | 1140 | return ''; |
| 1141 | 1141 | } |
| 1142 | 1142 | |
| 1143 | - return $targetTableAlias . '.country = ' . $this->getParameter('country'); // getParam uses connection to quote the value. |
|
| 1143 | + return $targetTableAlias.'.country = '.$this->getParameter('country'); // getParam uses connection to quote the value. |
|
| 1144 | 1144 | } |
| 1145 | 1145 | } |
| 1146 | 1146 | |
@@ -1152,7 +1152,7 @@ discard block |
||
| 1152 | 1152 | return ''; |
| 1153 | 1153 | } |
| 1154 | 1154 | |
| 1155 | - return $targetTableAlias . '.name LIKE ' . $this->getParameter('prefix'); // getParam uses connection to quote the value. |
|
| 1155 | + return $targetTableAlias.'.name LIKE '.$this->getParameter('prefix'); // getParam uses connection to quote the value. |
|
| 1156 | 1156 | } |
| 1157 | 1157 | } |
| 1158 | 1158 | |
@@ -1164,7 +1164,7 @@ discard block |
||
| 1164 | 1164 | return ''; |
| 1165 | 1165 | } |
| 1166 | 1166 | |
| 1167 | - return $targetTableAlias . '.topic = ' . $this->getParameter('topic'); // getParam uses connection to quote the value. |
|
| 1167 | + return $targetTableAlias.'.topic = '.$this->getParameter('topic'); // getParam uses connection to quote the value. |
|
| 1168 | 1168 | } |
| 1169 | 1169 | } |
| 1170 | 1170 | |
@@ -1176,7 +1176,7 @@ discard block |
||
| 1176 | 1176 | return ''; |
| 1177 | 1177 | } |
| 1178 | 1178 | |
| 1179 | - return $targetTableAlias . '.name LIKE ' . $this->getParameter('name'); |
|
| 1179 | + return $targetTableAlias.'.name LIKE '.$this->getParameter('name'); |
|
| 1180 | 1180 | } |
| 1181 | 1181 | } |
| 1182 | 1182 | |
@@ -1188,7 +1188,7 @@ discard block |
||
| 1188 | 1188 | return ''; |
| 1189 | 1189 | } |
| 1190 | 1190 | |
| 1191 | - return $targetTableAlias . '."completed" = ' . $this->getParameter('completed'); |
|
| 1191 | + return $targetTableAlias.'."completed" = '.$this->getParameter('completed'); |
|
| 1192 | 1192 | } |
| 1193 | 1193 | } |
| 1194 | 1194 | |
@@ -1200,6 +1200,6 @@ discard block |
||
| 1200 | 1200 | return ''; |
| 1201 | 1201 | } |
| 1202 | 1202 | |
| 1203 | - return $targetTableAlias . '.id = ' . $this->getParameter('id'); |
|
| 1203 | + return $targetTableAlias.'.id = '.$this->getParameter('id'); |
|
| 1204 | 1204 | } |
| 1205 | 1205 | } |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | */ |
| 211 | 211 | public function addType(Type $type) |
| 212 | 212 | { |
| 213 | - if (! $this->types->contains($type)) { |
|
| 213 | + if ( ! $this->types->contains($type)) { |
|
| 214 | 214 | $this->types[] = $type; |
| 215 | 215 | $type->addLemma($this); |
| 216 | 216 | } |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | */ |
| 331 | 331 | public function addLemma(Lemma $lemma) |
| 332 | 332 | { |
| 333 | - if (! $this->lemmas->contains($lemma)) { |
|
| 333 | + if ( ! $this->lemmas->contains($lemma)) { |
|
| 334 | 334 | $this->lemmas[] = $lemma; |
| 335 | 335 | $lemma->addType($this); |
| 336 | 336 | } |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | */ |
| 56 | 56 | public function testDropPartSchemaWithForeignKeys() : void |
| 57 | 57 | { |
| 58 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 58 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 59 | 59 | $this->markTestSkipped('Foreign Key test'); |
| 60 | 60 | } |
| 61 | 61 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | private function registerType(string $className) |
| 40 | 40 | { |
| 41 | - $type = constant($className . '::NAME'); |
|
| 41 | + $type = constant($className.'::NAME'); |
|
| 42 | 42 | |
| 43 | 43 | if (DBALType::hasType($type)) { |
| 44 | 44 | DBALType::overrideType($type, $className); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | foreach ($classes as $class) { |
| 75 | 75 | $ce = $validator->validateClass($class); |
| 76 | 76 | |
| 77 | - self::assertEmpty($ce, 'Invalid Modelset: ' . $modelSet . ' class ' . $class->getClassName() . ': ' . implode("\n", $ce)); |
|
| 77 | + self::assertEmpty($ce, 'Invalid Modelset: '.$modelSet.' class '.$class->getClassName().': '.implode("\n", $ce)); |
|
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | { |
| 17 | 17 | parent::setUp(); |
| 18 | 18 | |
| 19 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsSequences()) { |
|
| 19 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsSequences()) { |
|
| 20 | 20 | $this->markTestSkipped('Only working for Databases that support sequences.'); |
| 21 | 21 | } |
| 22 | 22 | |
@@ -30,9 +30,9 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function testAbstractSchemaNameSupportsClassnamesWithLeadingBackslash() : void |
| 32 | 32 | { |
| 33 | - $parser = $this->createParser('\\' . CmsUser::class); |
|
| 33 | + $parser = $this->createParser('\\'.CmsUser::class); |
|
| 34 | 34 | |
| 35 | - self::assertEquals('\\' . CmsUser::class, $parser->AbstractSchemaName()); |
|
| 35 | + self::assertEquals('\\'.CmsUser::class, $parser->AbstractSchemaName()); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -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 | /** |
@@ -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 | } |