@@ -83,8 +83,8 @@ |
||
| 83 | 83 | $this->em = $this->_getTestEntityManager(); |
| 84 | 84 | $this->region = $this->createRegion(); |
| 85 | 85 | $this->collectionPersister = $this->getMockBuilder(CollectionPersister::class) |
| 86 | - ->setMethods($this->collectionPersisterMockMethods) |
|
| 87 | - ->getMock(); |
|
| 86 | + ->setMethods($this->collectionPersisterMockMethods) |
|
| 87 | + ->getMock(); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | ->with($this->equalTo($collection), $this->equalTo(1), $this->equalTo(2)) |
| 192 | 192 | ->will($this->returnValue($slice)); |
| 193 | 193 | |
| 194 | - $this->assertEquals($slice, $persister->slice($collection, 1 , 2)); |
|
| 194 | + $this->assertEquals($slice, $persister->slice($collection, 1, 2)); |
|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | public function testInvokeContains() |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | ->with($this->equalTo($collection), $this->equalTo($element)) |
| 209 | 209 | ->will($this->returnValue(false)); |
| 210 | 210 | |
| 211 | - $this->assertFalse($persister->contains($collection,$element)); |
|
| 211 | + $this->assertFalse($persister->contains($collection, $element)); |
|
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | public function testInvokeContainsKey() |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | ->with($this->equalTo([]), $this->equalTo('Foo'), $this->equalTo(1), $this->equalTo(2)) |
| 381 | 381 | ->will($this->returnValue([$entity])); |
| 382 | 382 | |
| 383 | - $this->assertEquals([$entity], $persister->getManyToManyCollection([], 'Foo', 1 ,2)); |
|
| 383 | + $this->assertEquals([$entity], $persister->getManyToManyCollection([], 'Foo', 1, 2)); |
|
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | public function testInvokeGetOneToManyCollection() |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | ->with($this->equalTo([]), $this->equalTo('Foo'), $this->equalTo(1), $this->equalTo(2)) |
| 394 | 394 | ->will($this->returnValue([$entity])); |
| 395 | 395 | |
| 396 | - $this->assertEquals([$entity], $persister->getOneToManyCollection([], 'Foo', 1 ,2)); |
|
| 396 | + $this->assertEquals([$entity], $persister->getOneToManyCollection([], 'Foo', 1, 2)); |
|
| 397 | 397 | } |
| 398 | 398 | |
| 399 | 399 | public function testInvokeLoadManyToManyCollection() |
@@ -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 | } |