@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | 6 | |
@@ -334,8 +334,8 @@ discard block |
||
334 | 334 | 'locale' => ['value' => 'en', 'type' => DBALType::STRING], |
335 | 335 | ]; |
336 | 336 | |
337 | - self::assertEquals(serialize($parameters), '' . $filter); |
|
338 | - self::assertEquals('' . $filter, '' . $filter2); |
|
337 | + self::assertEquals(serialize($parameters), ''.$filter); |
|
338 | + self::assertEquals(''.$filter, ''.$filter2); |
|
339 | 339 | } |
340 | 340 | |
341 | 341 | public function testQueryCache_DependsOnFilters() |
@@ -1104,7 +1104,7 @@ discard block |
||
1104 | 1104 | return ''; |
1105 | 1105 | } |
1106 | 1106 | |
1107 | - return $targetTableAlias . '.deleted = 0'; |
|
1107 | + return $targetTableAlias.'.deleted = 0'; |
|
1108 | 1108 | } |
1109 | 1109 | } |
1110 | 1110 | |
@@ -1112,11 +1112,11 @@ discard block |
||
1112 | 1112 | { |
1113 | 1113 | public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) |
1114 | 1114 | { |
1115 | - if (! in_array('LocaleAware', $targetEntity->getReflectionClass()->getInterfaceNames(), true)) { |
|
1115 | + if ( ! in_array('LocaleAware', $targetEntity->getReflectionClass()->getInterfaceNames(), true)) { |
|
1116 | 1116 | return ''; |
1117 | 1117 | } |
1118 | 1118 | |
1119 | - return $targetTableAlias . '.locale = ' . $this->getParameter('locale'); // getParam uses connection to quote the value. |
|
1119 | + return $targetTableAlias.'.locale = '.$this->getParameter('locale'); // getParam uses connection to quote the value. |
|
1120 | 1120 | } |
1121 | 1121 | } |
1122 | 1122 | |
@@ -1128,7 +1128,7 @@ discard block |
||
1128 | 1128 | return ''; |
1129 | 1129 | } |
1130 | 1130 | |
1131 | - return $targetTableAlias . '.country = ' . $this->getParameter('country'); // getParam uses connection to quote the value. |
|
1131 | + return $targetTableAlias.'.country = '.$this->getParameter('country'); // 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 . '.name LIKE ' . $this->getParameter('prefix'); // getParam uses connection to quote the value. |
|
1143 | + return $targetTableAlias.'.name LIKE '.$this->getParameter('prefix'); // 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 . '.topic = ' . $this->getParameter('topic'); // getParam uses connection to quote the value. |
|
1155 | + return $targetTableAlias.'.topic = '.$this->getParameter('topic'); // 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 . '.name LIKE ' . $this->getParameter('name'); |
|
1167 | + return $targetTableAlias.'.name LIKE '.$this->getParameter('name'); |
|
1168 | 1168 | } |
1169 | 1169 | } |
1170 | 1170 | |
@@ -1176,7 +1176,7 @@ discard block |
||
1176 | 1176 | return ''; |
1177 | 1177 | } |
1178 | 1178 | |
1179 | - return $targetTableAlias . '."completed" = ' . $this->getParameter('completed'); |
|
1179 | + return $targetTableAlias.'."completed" = '.$this->getParameter('completed'); |
|
1180 | 1180 | } |
1181 | 1181 | } |
1182 | 1182 | |
@@ -1188,6 +1188,6 @@ discard block |
||
1188 | 1188 | return ''; |
1189 | 1189 | } |
1190 | 1190 | |
1191 | - return $targetTableAlias . '.id = ' . $this->getParameter('id'); |
|
1191 | + return $targetTableAlias.'.id = '.$this->getParameter('id'); |
|
1192 | 1192 | } |
1193 | 1193 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | 6 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $this->useModelSet('ddc2504'); |
42 | 42 | parent::setUp(); |
43 | 43 | |
44 | - $class = $this->em->getClassMetadata(CmsUser::class); |
|
44 | + $class = $this->em->getClassMetadata(CmsUser::class); |
|
45 | 45 | |
46 | 46 | $class->getProperty('groups')->setFetchMode(FetchMode::EXTRA_LAZY); |
47 | 47 | $class->getProperty('articles')->setFetchMode(FetchMode::EXTRA_LAZY); |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | |
307 | 307 | $queryCount = $this->getCurrentQueryCount(); |
308 | 308 | self::assertFalse($user->articles->contains($article)); |
309 | - self::assertEquals($queryCount+1, $this->getCurrentQueryCount(), 'Checking for contains of persisted entity should cause one query to be executed.'); |
|
309 | + self::assertEquals($queryCount + 1, $this->getCurrentQueryCount(), 'Checking for contains of persisted entity should cause one query to be executed.'); |
|
310 | 310 | self::assertFalse($user->articles->isInitialized(), 'Post-Condition: Collection is not initialized.'); |
311 | 311 | |
312 | 312 | // Test One to Many existence with state managed |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | |
474 | 474 | $queryCount = $this->getCurrentQueryCount(); |
475 | 475 | self::assertTrue($group->users->contains($user)); |
476 | - self::assertEquals($queryCount+1, $this->getCurrentQueryCount(), 'Checking for contains of managed entity should cause one query to be executed.'); |
|
476 | + self::assertEquals($queryCount + 1, $this->getCurrentQueryCount(), 'Checking for contains of managed entity should cause one query to be executed.'); |
|
477 | 477 | self::assertFalse($user->groups->isInitialized(), 'Post-Condition: Collection is not initialized.'); |
478 | 478 | |
479 | 479 | $newUser = new CmsUser(); |
@@ -1251,7 +1251,7 @@ discard block |
||
1251 | 1251 | $user = new User(); |
1252 | 1252 | $userList = new UserList(); |
1253 | 1253 | |
1254 | - $user->name = 'ocramius'; |
|
1254 | + $user->name = 'ocramius'; |
|
1255 | 1255 | $userList->listName = 'PHP Developers to follow closely'; |
1256 | 1256 | |
1257 | 1257 | $user->addUserList($userList); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | 6 | |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | |
453 | 453 | $email = new CmsEmail(); |
454 | 454 | |
455 | - $email->email = '[email protected]'; |
|
455 | + $email->email = '[email protected]'; |
|
456 | 456 | |
457 | 457 | $user->setEmail($email); |
458 | 458 | |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | $repository = $this->em->getRepository(CmsUser::class); |
604 | 604 | $result = $repository |
605 | 605 | ->createNativeNamedQuery('fetchUserPhonenumberCount') |
606 | - ->setParameter(1, ['test','FabioBatSilva'])->getResult(); |
|
606 | + ->setParameter(1, ['test', 'FabioBatSilva'])->getResult(); |
|
607 | 607 | |
608 | 608 | self::assertCount(2, $result); |
609 | 609 | self::assertInternalType('array', $result[0]); |
@@ -829,7 +829,7 @@ discard block |
||
829 | 829 | |
830 | 830 | $rsm->addRootEntityFromClassMetadata(CmsUser::class, 'u'); |
831 | 831 | |
832 | - self::assertSQLEquals('u.id AS id0, u.status AS status1, u.username AS username2, u.name AS name3, u.email_id AS email_id4', (string)$rsm); |
|
832 | + self::assertSQLEquals('u.id AS id0, u.status AS status1, u.username AS username2, u.name AS name3, u.email_id AS email_id4', (string) $rsm); |
|
833 | 833 | } |
834 | 834 | |
835 | 835 | /** |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | 6 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $this->em->flush(); |
31 | 31 | $this->em->clear(); |
32 | 32 | |
33 | - $dql = 'SELECT d FROM ' . DecimalModel::class . ' d'; |
|
33 | + $dql = 'SELECT d FROM '.DecimalModel::class.' d'; |
|
34 | 34 | $decimal = $this->em->createQuery($dql)->getSingleResult(); |
35 | 35 | |
36 | 36 | self::assertSame('0.15', $decimal->decimal); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $this->em->flush(); |
51 | 51 | $this->em->clear(); |
52 | 52 | |
53 | - $dql = 'SELECT b FROM ' . BooleanModel::class . ' b WHERE b.booleanField = true'; |
|
53 | + $dql = 'SELECT b FROM '.BooleanModel::class.' b WHERE b.booleanField = true'; |
|
54 | 54 | $bool = $this->em->createQuery($dql)->getSingleResult(); |
55 | 55 | |
56 | 56 | self::assertTrue($bool->booleanField); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $this->em->flush(); |
61 | 61 | $this->em->clear(); |
62 | 62 | |
63 | - $dql = 'SELECT b FROM ' . BooleanModel::class . ' b WHERE b.booleanField = false'; |
|
63 | + $dql = 'SELECT b FROM '.BooleanModel::class.' b WHERE b.booleanField = false'; |
|
64 | 64 | $bool = $this->em->createQuery($dql)->getSingleResult(); |
65 | 65 | |
66 | 66 | self::assertFalse($bool->booleanField); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $this->em->flush(); |
77 | 77 | $this->em->clear(); |
78 | 78 | |
79 | - $dql = 'SELECT s FROM ' . SerializationModel::class . ' s'; |
|
79 | + $dql = 'SELECT s FROM '.SerializationModel::class.' s'; |
|
80 | 80 | $serialize = $this->em->createQuery($dql)->getSingleResult(); |
81 | 81 | |
82 | 82 | self::assertSame(['foo' => 'bar', 'bar' => 'baz'], $serialize->array); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $this->em->flush(); |
92 | 92 | $this->em->clear(); |
93 | 93 | |
94 | - $dql = 'SELECT s FROM ' . SerializationModel::class . ' s'; |
|
94 | + $dql = 'SELECT s FROM '.SerializationModel::class.' s'; |
|
95 | 95 | $serialize = $this->em->createQuery($dql)->getSingleResult(); |
96 | 96 | |
97 | 97 | self::assertInstanceOf('stdClass', $serialize->object); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Cache; |
6 | 6 | |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $city->getName()]); |
398 | 398 | $uow->registerManaged($city, ['id' => $city->getId()], ['name' => $city->getName(), 'state' => $state]); |
399 | 399 | |
400 | - $this->region->addReturn('put', true); // put root entity |
|
400 | + $this->region->addReturn('put', true); // put root entity |
|
401 | 401 | $this->region->addReturn('put', false); // association fails |
402 | 402 | |
403 | 403 | self::assertFalse($this->queryCache->put($key, $rsm, $result)); |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | $uow->registerManaged($city2, ['id' => $city2->getId()], ['name' => $city2->getName(), 'state' => $state]); |
431 | 431 | $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $state->getName(), 'cities' => $state->getCities()]); |
432 | 432 | |
433 | - $this->region->addReturn('put', true); // put root entity |
|
433 | + $this->region->addReturn('put', true); // put root entity |
|
434 | 434 | $this->region->addReturn('put', false); // collection association fails |
435 | 435 | |
436 | 436 | self::assertFalse($this->queryCache->put($key, $rsm, $result)); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Cache; |
6 | 6 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | protected function createRegion() |
56 | 56 | { |
57 | - $this->directory = sys_get_temp_dir() . '/doctrine_lock_' . uniqid(); |
|
57 | + $this->directory = sys_get_temp_dir().'/doctrine_lock_'.uniqid(); |
|
58 | 58 | |
59 | 59 | $region = new DefaultRegion('concurren_region_test', $this->cache); |
60 | 60 | |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $reflectionDirectory->setAccessible(true); |
258 | 258 | $reflectionDirectory->setValue($region, str_repeat('a', 10000)); |
259 | 259 | |
260 | - set_error_handler(function () {}, E_WARNING); |
|
260 | + set_error_handler(function() {}, E_WARNING); |
|
261 | 261 | self::assertTrue($region->evictAll()); |
262 | 262 | restore_error_handler(); |
263 | 263 | } |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | { |
270 | 270 | $path = $path ?: $this->directory; |
271 | 271 | |
272 | - if (! is_dir($path)) { |
|
272 | + if ( ! is_dir($path)) { |
|
273 | 273 | return; |
274 | 274 | } |
275 | 275 |
@@ -1918,10 +1918,10 @@ discard block |
||
1918 | 1918 | $rsm->setDiscriminatorColumn('c', 'c_discr'); |
1919 | 1919 | |
1920 | 1920 | $resultSet = [ |
1921 | - [ |
|
1922 | - 'c__id' => '1', |
|
1923 | - 'c_discr' => 'fix', |
|
1924 | - ], |
|
1921 | + [ |
|
1922 | + 'c__id' => '1', |
|
1923 | + 'c_discr' => 'fix', |
|
1924 | + ], |
|
1925 | 1925 | ]; |
1926 | 1926 | |
1927 | 1927 | $stmt = new HydratorMockStatement($resultSet); |
@@ -1950,12 +1950,12 @@ discard block |
||
1950 | 1950 | $rsm->setDiscriminatorColumn('e', 'e_discr'); |
1951 | 1951 | |
1952 | 1952 | $resultSet = [ |
1953 | - [ |
|
1954 | - 'c__id' => '1', |
|
1955 | - 'c_discr' => 'fix', |
|
1956 | - 'e__id' => '1', |
|
1957 | - 'e__name' => 'Fabio B. Silva', |
|
1958 | - ], |
|
1953 | + [ |
|
1954 | + 'c__id' => '1', |
|
1955 | + 'c_discr' => 'fix', |
|
1956 | + 'e__id' => '1', |
|
1957 | + 'e__name' => 'Fabio B. Silva', |
|
1958 | + ], |
|
1959 | 1959 | ]; |
1960 | 1960 | |
1961 | 1961 | $stmt = new HydratorMockStatement($resultSet); |
@@ -1980,11 +1980,11 @@ discard block |
||
1980 | 1980 | $rsm->setDiscriminatorColumn('p', 'discr'); |
1981 | 1981 | |
1982 | 1982 | $resultSet = [ |
1983 | - [ |
|
1984 | - 'p__id' => '1', |
|
1985 | - 'p__name' => 'Fabio B. Silva', |
|
1986 | - 'discr' => 'subworker', |
|
1987 | - ], |
|
1983 | + [ |
|
1984 | + 'p__id' => '1', |
|
1985 | + 'p__name' => 'Fabio B. Silva', |
|
1986 | + 'discr' => 'subworker', |
|
1987 | + ], |
|
1988 | 1988 | ]; |
1989 | 1989 | |
1990 | 1990 | $stmt = new HydratorMockStatement($resultSet); |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | $rsm->setDiscriminatorColumn('p', 'discr'); |
34 | 34 | |
35 | 35 | $resultSet = [ |
36 | - [ |
|
37 | - 'u__id' => '1', |
|
38 | - 'u__name' => 'Fabio B. Silva', |
|
39 | - ], |
|
36 | + [ |
|
37 | + 'u__id' => '1', |
|
38 | + 'u__name' => 'Fabio B. Silva', |
|
39 | + ], |
|
40 | 40 | ]; |
41 | 41 | |
42 | 42 | $stmt = new HydratorMockStatement($resultSet); |
@@ -89,11 +89,11 @@ discard block |
||
89 | 89 | $rsm->setDiscriminatorColumn('p', 'discr'); |
90 | 90 | |
91 | 91 | $resultSet = [ |
92 | - [ |
|
93 | - 'p__id' => '1', |
|
94 | - 'p__name' => 'Fabio B. Silva', |
|
95 | - 'discr' => 'subworker', |
|
96 | - ], |
|
92 | + [ |
|
93 | + 'p__id' => '1', |
|
94 | + 'p__name' => 'Fabio B. Silva', |
|
95 | + 'discr' => 'subworker', |
|
96 | + ], |
|
97 | 97 | ]; |
98 | 98 | |
99 | 99 | $stmt = new HydratorMockStatement($resultSet); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Hydration; |
6 | 6 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $mockConnection = $this->createMock(Connection::class); |
48 | 48 | $mockEntityManagerInterface = $this->createMock(EntityManagerInterface::class); |
49 | 49 | $mockUow = $this->createMock(UnitOfWork::class); |
50 | - $mockMetadataFactory = $this->createMock(ClassMetadataFactory::class); |
|
50 | + $mockMetadataFactory = $this->createMock(ClassMetadataFactory::class); |
|
51 | 51 | |
52 | 52 | $this->mockEventManager = $this->createMock(EventManager::class); |
53 | 53 | $this->mockStatement = $this->createMock(Statement::class); |