@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | $result[] = $city; |
| 135 | 135 | |
| 136 | 136 | $cityClass->setFieldValue($city, 'id', $i); |
| 137 | - $stateClass->setFieldValue($state, 'id', $i*2); |
|
| 137 | + $stateClass->setFieldValue($state, 'id', $i * 2); |
|
| 138 | 138 | |
| 139 | 139 | $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $city->getName()]); |
| 140 | 140 | $uow->registerManaged($city, ['id' => $city->getId()], ['name' => $city->getName(), 'state' => $state]); |
@@ -179,8 +179,8 @@ discard block |
||
| 179 | 179 | $result[] = $city; |
| 180 | 180 | |
| 181 | 181 | $cityClass->setFieldValue($city, 'id', $i); |
| 182 | - $stateClass->setFieldValue($state, 'id', $i*2); |
|
| 183 | - $countryClass->setFieldValue($country, 'id', $i*3); |
|
| 182 | + $stateClass->setFieldValue($state, 'id', $i * 2); |
|
| 183 | + $countryClass->setFieldValue($country, 'id', $i * 3); |
|
| 184 | 184 | |
| 185 | 185 | $uow->registerManaged($country, ['id' => $country->getId()], ['name' => $country->getName()]); |
| 186 | 186 | $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $state->getName(), 'country' => $country] |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $city->getName()]); |
| 365 | 365 | $uow->registerManaged($city, ['id' => $city->getId()], ['name' => $city->getName(), 'state' => $state]); |
| 366 | 366 | |
| 367 | - $this->region->addReturn('put', true); // put root entity |
|
| 367 | + $this->region->addReturn('put', true); // put root entity |
|
| 368 | 368 | $this->region->addReturn('put', false); // association fails |
| 369 | 369 | |
| 370 | 370 | $this->assertFalse($this->queryCache->put($key, $rsm, $result)); |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $state->getName(), 'cities' => $state->getCities()] |
| 400 | 400 | ); |
| 401 | 401 | |
| 402 | - $this->region->addReturn('put', true); // put root entity |
|
| 402 | + $this->region->addReturn('put', true); // put root entity |
|
| 403 | 403 | $this->region->addReturn('put', false); // collection association fails |
| 404 | 404 | |
| 405 | 405 | $this->assertFalse($this->queryCache->put($key, $rsm, $result)); |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | $attractions = $reflection->invoke($this->queryCache, $rsm, 'a', $bavaria); |
| 565 | 565 | |
| 566 | 566 | $this->assertCount(2, $cities); |
| 567 | - $this->assertCount(2, $attractions); |
|
| 567 | + $this->assertCount(2, $attractions); |
|
| 568 | 568 | |
| 569 | 569 | $this->assertInstanceOf(Collection::class, $cities); |
| 570 | 570 | $this->assertInstanceOf(Collection::class, $attractions[0]); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | protected function createRegion() |
| 54 | 54 | { |
| 55 | - $this->directory = sys_get_temp_dir() . '/doctrine_lock_'. uniqid(); |
|
| 55 | + $this->directory = sys_get_temp_dir().'/doctrine_lock_'.uniqid(); |
|
| 56 | 56 | |
| 57 | 57 | $region = new DefaultRegion('concurren_region_test', $this->cache); |
| 58 | 58 | |
@@ -100,10 +100,10 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | file_put_contents($file, 'foo'); |
| 102 | 102 | $this->assertFileExists($file); |
| 103 | - $this->assertEquals('foo' , file_get_contents($file)); |
|
| 103 | + $this->assertEquals('foo', file_get_contents($file)); |
|
| 104 | 104 | |
| 105 | 105 | $this->assertNull($this->region->lock($key)); |
| 106 | - $this->assertEquals('foo' , file_get_contents($file)); |
|
| 106 | + $this->assertEquals('foo', file_get_contents($file)); |
|
| 107 | 107 | $this->assertFileExists($file); |
| 108 | 108 | |
| 109 | 109 | // should be not available |
@@ -128,11 +128,11 @@ discard block |
||
| 128 | 128 | // change the lock |
| 129 | 129 | file_put_contents($file, 'foo'); |
| 130 | 130 | $this->assertFileExists($file); |
| 131 | - $this->assertEquals('foo' , file_get_contents($file)); |
|
| 131 | + $this->assertEquals('foo', file_get_contents($file)); |
|
| 132 | 132 | |
| 133 | 133 | //try to unlock |
| 134 | 134 | $this->assertFalse($this->region->unlock($key, $lock)); |
| 135 | - $this->assertEquals('foo' , file_get_contents($file)); |
|
| 135 | + $this->assertEquals('foo', file_get_contents($file)); |
|
| 136 | 136 | $this->assertFileExists($file); |
| 137 | 137 | |
| 138 | 138 | // should be not available |
@@ -153,14 +153,14 @@ discard block |
||
| 153 | 153 | // create lock |
| 154 | 154 | file_put_contents($file, 'foo'); |
| 155 | 155 | $this->assertFileExists($file); |
| 156 | - $this->assertEquals('foo' , file_get_contents($file)); |
|
| 156 | + $this->assertEquals('foo', file_get_contents($file)); |
|
| 157 | 157 | |
| 158 | 158 | $this->assertFalse($this->region->contains($key)); |
| 159 | 159 | $this->assertFalse($this->region->put($key, $entry)); |
| 160 | 160 | $this->assertFalse($this->region->contains($key)); |
| 161 | 161 | |
| 162 | 162 | $this->assertFileExists($file); |
| 163 | - $this->assertEquals('foo' , file_get_contents($file)); |
|
| 163 | + $this->assertEquals('foo', file_get_contents($file)); |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | public function testLockedEvict() |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | $reflectionDirectory->setAccessible(true); |
| 256 | 256 | $reflectionDirectory->setValue($region, str_repeat('a', 10000)); |
| 257 | 257 | |
| 258 | - set_error_handler(function () {}, E_WARNING); |
|
| 258 | + set_error_handler(function() {}, E_WARNING); |
|
| 259 | 259 | $this->assertTrue($region->evictAll()); |
| 260 | 260 | restore_error_handler(); |
| 261 | 261 | } |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | $entity->setId(1); |
| 82 | 82 | $uow->registerManaged($entity, $key->identifier, $data); |
| 83 | 83 | |
| 84 | - $cache = $this->structure->buildCacheEntry($metadata, $key, $entity); |
|
| 84 | + $cache = $this->structure->buildCacheEntry($metadata, $key, $entity); |
|
| 85 | 85 | |
| 86 | 86 | $this->assertInstanceOf(CacheEntry::class, $cache); |
| 87 | 87 | $this->assertInstanceOf(EntityCacheEntry::class, $cache); |
@@ -68,8 +68,8 @@ discard block |
||
| 68 | 68 | $cm->mapField(['fieldName' => 'name', 'columnName' => '`name`']); |
| 69 | 69 | $cm->mapField(['fieldName' => 'id', 'columnName' => 'id']); |
| 70 | 70 | |
| 71 | - $this->assertEquals('id' ,$this->strategy->getColumnName('id', $cm, $this->platform)); |
|
| 72 | - $this->assertEquals('"name"' ,$this->strategy->getColumnName('name', $cm, $this->platform)); |
|
| 71 | + $this->assertEquals('id', $this->strategy->getColumnName('id', $cm, $this->platform)); |
|
| 72 | + $this->assertEquals('"name"', $this->strategy->getColumnName('name', $cm, $this->platform)); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | public function testGetTableName() |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | ); |
| 190 | 190 | |
| 191 | 191 | $joinColumn = $cm->associationMappings['article']['joinColumns'][0]; |
| 192 | - $this->assertEquals('"article"',$this->strategy->getJoinColumnName($joinColumn, $cm, $this->platform)); |
|
| 192 | + $this->assertEquals('"article"', $this->strategy->getJoinColumnName($joinColumn, $cm, $this->platform)); |
|
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | public function testReferencedJoinColumnName() |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | ); |
| 211 | 211 | |
| 212 | 212 | $joinColumn = $cm->associationMappings['article']['joinColumns'][0]; |
| 213 | - $this->assertEquals('"id"',$this->strategy->getReferencedJoinColumnName($joinColumn, $cm, $this->platform)); |
|
| 213 | + $this->assertEquals('"id"', $this->strategy->getReferencedJoinColumnName($joinColumn, $cm, $this->platform)); |
|
| 214 | 214 | } |
| 215 | 215 | } |
| 216 | 216 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | protected function _loadDriverForCMSModels() |
| 116 | 116 | { |
| 117 | 117 | $annotationDriver = $this->_loadDriver(); |
| 118 | - $annotationDriver->addPaths([__DIR__ . '/../../Models/CMS/']); |
|
| 118 | + $annotationDriver->addPaths([__DIR__.'/../../Models/CMS/']); |
|
| 119 | 119 | return $annotationDriver; |
| 120 | 120 | } |
| 121 | 121 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | public function testJoinTablesWithMappedSuperclassForAnnotationDriver() |
| 138 | 138 | { |
| 139 | 139 | $annotationDriver = $this->_loadDriver(); |
| 140 | - $annotationDriver->addPaths([__DIR__ . '/../../Models/DirectoryTree/']); |
|
| 140 | + $annotationDriver->addPaths([__DIR__.'/../../Models/DirectoryTree/']); |
|
| 141 | 141 | |
| 142 | 142 | $em = $this->_getTestEntityManager(); |
| 143 | 143 | $em->getConfiguration()->setMetadataDriverImpl($annotationDriver); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | |
| 166 | 166 | $this->expectException(MappingException::class); |
| 167 | 167 | $this->expectExceptionMessage( |
| 168 | - "It is illegal to put an inverse side one-to-many or many-to-many association on " . |
|
| 168 | + "It is illegal to put an inverse side one-to-many or many-to-many association on ". |
|
| 169 | 169 | "mapped superclass 'Doctrine\Tests\ORM\Mapping\InvalidMappedSuperClass#users'" |
| 170 | 170 | ); |
| 171 | 171 | |
@@ -186,8 +186,8 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | $this->expectException(MappingException::class); |
| 188 | 188 | $this->expectExceptionMessage( |
| 189 | - "It is not supported to define inheritance information on a mapped " . |
|
| 190 | - "superclass '" . MappedSuperClassInheritence::class . "'." |
|
| 189 | + "It is not supported to define inheritance information on a mapped ". |
|
| 190 | + "superclass '".MappedSuperClassInheritence::class."'." |
|
| 191 | 191 | ); |
| 192 | 192 | |
| 193 | 193 | $usingInvalidMsc = $factory->getMetadataFor(MappedSuperClassInheritence::class); |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | |
| 246 | 246 | public function testAttributeOverridesMappingWithTrait() |
| 247 | 247 | { |
| 248 | - $factory = $this->createClassMetadataFactory(); |
|
| 248 | + $factory = $this->createClassMetadataFactory(); |
|
| 249 | 249 | |
| 250 | 250 | $metadataWithoutOverride = $factory->getMetadataFor(DDC1872ExampleEntityWithoutOverride::class); |
| 251 | 251 | $metadataWithOverride = $factory->getMetadataFor(DDC1872ExampleEntityWithOverride::class); |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | public function testFindMappingNamespaceNotFound() |
| 52 | 52 | { |
| 53 | 53 | $this->expectException(MappingException::class); |
| 54 | - $this->expectExceptionMessage("No mapping file found named 'Foo" . $this->getFileExtension() . "' for class 'MyOtherNamespace\MySubnamespace\Entity\Foo'."); |
|
| 54 | + $this->expectExceptionMessage("No mapping file found named 'Foo".$this->getFileExtension()."' for class 'MyOtherNamespace\MySubnamespace\Entity\Foo'."); |
|
| 55 | 55 | |
| 56 | 56 | $driver = $this->getDriver( |
| 57 | 57 | [ |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | { |
| 11 | 11 | protected function _loadDriver() |
| 12 | 12 | { |
| 13 | - return new StaticPHPDriver(__DIR__ . DIRECTORY_SEPARATOR . 'php'); |
|
| 13 | + return new StaticPHPDriver(__DIR__.DIRECTORY_SEPARATOR.'php'); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | /** |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | public function joinColumnName($propertyName, $className = null) |
| 16 | 16 | { |
| 17 | 17 | return strtolower($this->classToTableName($className)) |
| 18 | - . '_' . $propertyName |
|
| 19 | - . '_' . $this->referenceColumnName(); |
|
| 18 | + . '_'.$propertyName |
|
| 19 | + . '_'.$this->referenceColumnName(); |
|
| 20 | 20 | } |
| 21 | 21 | } |
@@ -55,8 +55,8 @@ discard block |
||
| 55 | 55 | $class->mapField(['fieldName' => 'name', 'columnName' => 'name']); |
| 56 | 56 | $class->mapField(['fieldName' => 'id', 'columnName' => 'id', 'id' => true]); |
| 57 | 57 | |
| 58 | - $this->assertEquals('id' ,$this->strategy->getColumnName('id', $class, $this->platform)); |
|
| 59 | - $this->assertEquals('name' ,$this->strategy->getColumnName('name', $class, $this->platform)); |
|
| 58 | + $this->assertEquals('id', $this->strategy->getColumnName('id', $class, $this->platform)); |
|
| 59 | + $this->assertEquals('name', $this->strategy->getColumnName('name', $class, $this->platform)); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | public function testGetTableName() |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $class = $this->createClassMetadata(CmsUser::class); |
| 65 | 65 | |
| 66 | 66 | $class->setPrimaryTable(['name'=>'cms_user']); |
| 67 | - $this->assertEquals('cms_user' ,$this->strategy->getTableName($class, $this->platform)); |
|
| 67 | + $this->assertEquals('cms_user', $this->strategy->getTableName($class, $this->platform)); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | public function testJoinTableName() |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | ); |
| 126 | 126 | |
| 127 | 127 | $joinColumn = $class->associationMappings['article']['joinColumns'][0]; |
| 128 | - $this->assertEquals('article',$this->strategy->getJoinColumnName($joinColumn, $class, $this->platform)); |
|
| 128 | + $this->assertEquals('article', $this->strategy->getJoinColumnName($joinColumn, $class, $this->platform)); |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | public function testReferencedJoinColumnName() |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | ); |
| 147 | 147 | |
| 148 | 148 | $joinColumn = $cm->associationMappings['article']['joinColumns'][0]; |
| 149 | - $this->assertEquals('id',$this->strategy->getReferencedJoinColumnName($joinColumn, $cm, $this->platform)); |
|
| 149 | + $this->assertEquals('id', $this->strategy->getReferencedJoinColumnName($joinColumn, $cm, $this->platform)); |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | public function testGetSequenceName() |
@@ -160,6 +160,6 @@ discard block |
||
| 160 | 160 | |
| 161 | 161 | $class->setSequenceGeneratorDefinition($definition); |
| 162 | 162 | |
| 163 | - $this->assertEquals('user_id_seq',$this->strategy->getSequenceName($definition, $class, $this->platform)); |
|
| 163 | + $this->assertEquals('user_id_seq', $this->strategy->getSequenceName($definition, $class, $this->platform)); |
|
| 164 | 164 | } |
| 165 | 165 | } |