@@ -72,7 +72,7 @@ |
||
72 | 72 | /** |
73 | 73 | * Arbitrary Join |
74 | 74 | */ |
75 | - public function testLimitSubqueryWithArbitraryJoin() |
|
75 | + public function testLimitSubqueryWithArbitraryJoin() |
|
76 | 76 | { |
77 | 77 | $dql = 'SELECT p, c FROM Doctrine\Tests\ORM\Tools\Pagination\MyBlogPost p JOIN Doctrine\Tests\ORM\Tools\Pagination\Category c WITH p.category = c'; |
78 | 78 | $query = $this->entityManager->createQuery($dql); |
@@ -84,7 +84,7 @@ |
||
84 | 84 | $this->entityManager->getConnection()->setDatabasePlatform(new PostgreSqlPlatform); |
85 | 85 | |
86 | 86 | $query = $this->entityManager->createQuery( |
87 | - 'SELECT u, g, COUNT(g.id) AS hidden g_quantity FROM Doctrine\Tests\ORM\Tools\Pagination\User u JOIN u.groups g ORDER BY g_quantity, u.id DESC' |
|
87 | + 'SELECT u, g, COUNT(g.id) AS hidden g_quantity FROM Doctrine\Tests\ORM\Tools\Pagination\User u JOIN u.groups g ORDER BY g_quantity, u.id DESC' |
|
88 | 88 | ); |
89 | 89 | $limitQuery = clone $query; |
90 | 90 | $limitQuery->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, LimitSubqueryOutputWalker::class); |
@@ -127,7 +127,7 @@ |
||
127 | 127 | */ |
128 | 128 | public function testWhereInQueryWithArbitraryJoin_NoWhere() |
129 | 129 | { |
130 | - $whereInQuery = $this->entityManager->createQuery( |
|
130 | + $whereInQuery = $this->entityManager->createQuery( |
|
131 | 131 | 'SELECT p FROM Doctrine\Tests\ORM\Tools\Pagination\BlogPost p JOIN Doctrine\Tests\ORM\Tools\Pagination\Category c WITH p.category = c' |
132 | 132 | ); |
133 | 133 | $whereInQuery->setHint(Query::HINT_CUSTOM_TREE_WALKERS, [WhereInWalker::class]); |
@@ -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]); |
@@ -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() |
@@ -100,8 +100,8 @@ |
||
100 | 100 | $this->em = $this->_getTestEntityManager(); |
101 | 101 | $this->region = $this->createRegion(); |
102 | 102 | $this->entityPersister = $this->getMockBuilder(EntityPersister::class) |
103 | - ->setMethods($this->entityPersisterMockMethods) |
|
104 | - ->getMock(); |
|
103 | + ->setMethods($this->entityPersisterMockMethods) |
|
104 | + ->getMock(); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
@@ -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 |