@@ -136,24 +136,24 @@ |
||
| 136 | 136 | ->will($this->returnValue( 10 )); |
| 137 | 137 | |
| 138 | 138 | $parserResultMock = $this->getMockBuilder(ParserResult::class) |
| 139 | - ->setMethods(['getSqlExecutor']) |
|
| 140 | - ->getMock(); |
|
| 139 | + ->setMethods(['getSqlExecutor']) |
|
| 140 | + ->getMock(); |
|
| 141 | 141 | $parserResultMock->expects($this->once()) |
| 142 | - ->method('getSqlExecutor') |
|
| 143 | - ->will($this->returnValue($sqlExecMock)); |
|
| 142 | + ->method('getSqlExecutor') |
|
| 143 | + ->will($this->returnValue($sqlExecMock)); |
|
| 144 | 144 | |
| 145 | 145 | $cache = $this->getMockBuilder(CacheProvider::class) |
| 146 | - ->setMethods(['doFetch', 'doContains', 'doSave', 'doDelete', 'doFlush', 'doGetStats']) |
|
| 147 | - ->getMock(); |
|
| 146 | + ->setMethods(['doFetch', 'doContains', 'doSave', 'doDelete', 'doFlush', 'doGetStats']) |
|
| 147 | + ->getMock(); |
|
| 148 | 148 | |
| 149 | 149 | $cache->expects($this->at(0))->method('doFetch')->will($this->returnValue(1)); |
| 150 | 150 | $cache->expects($this->at(1)) |
| 151 | - ->method('doFetch') |
|
| 152 | - ->with($this->isType('string')) |
|
| 153 | - ->will($this->returnValue($parserResultMock)); |
|
| 151 | + ->method('doFetch') |
|
| 152 | + ->with($this->isType('string')) |
|
| 153 | + ->will($this->returnValue($parserResultMock)); |
|
| 154 | 154 | |
| 155 | 155 | $cache->expects($this->never()) |
| 156 | - ->method('doSave'); |
|
| 156 | + ->method('doSave'); |
|
| 157 | 157 | |
| 158 | 158 | $query->setQueryCacheDriver($cache); |
| 159 | 159 | |
@@ -133,7 +133,7 @@ |
||
| 133 | 133 | |
| 134 | 134 | $sqlExecMock->expects($this->once()) |
| 135 | 135 | ->method('execute') |
| 136 | - ->will($this->returnValue( 10 )); |
|
| 136 | + ->will($this->returnValue(10)); |
|
| 137 | 137 | |
| 138 | 138 | $parserResultMock = $this->getMockBuilder(ParserResult::class) |
| 139 | 139 | ->setMethods(['getSqlExecutor']) |
@@ -360,9 +360,9 @@ discard block |
||
| 360 | 360 | $this->assertEquals(2, count($user->phonenumbers)); |
| 361 | 361 | $dql = "SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?1"; |
| 362 | 362 | $user = $this->_em->createQuery($dql) |
| 363 | - ->setParameter(1, $user->id) |
|
| 364 | - ->setHint(Query::HINT_REFRESH, true) |
|
| 365 | - ->getSingleResult(); |
|
| 363 | + ->setParameter(1, $user->id) |
|
| 364 | + ->setHint(Query::HINT_REFRESH, true) |
|
| 365 | + ->getSingleResult(); |
|
| 366 | 366 | |
| 367 | 367 | $this->assertEquals(1, count($user->phonenumbers)); |
| 368 | 368 | } |
@@ -397,8 +397,8 @@ discard block |
||
| 397 | 397 | |
| 398 | 398 | $dql = "SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?1"; |
| 399 | 399 | $user = $this->_em->createQuery($dql) |
| 400 | - ->setParameter(1, $userId) |
|
| 401 | - ->getSingleResult(); |
|
| 400 | + ->setParameter(1, $userId) |
|
| 401 | + ->getSingleResult(); |
|
| 402 | 402 | |
| 403 | 403 | $this->assertEquals(1, count($user->phonenumbers)); |
| 404 | 404 | } |
@@ -987,9 +987,9 @@ discard block |
||
| 987 | 987 | $qc = $this->getCurrentQueryCount(); |
| 988 | 988 | $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.id = ?1"; |
| 989 | 989 | $article = $this->_em->createQuery($dql) |
| 990 | - ->setParameter(1, $article->id) |
|
| 991 | - ->setFetchMode(CmsArticle::class, 'user', ClassMetadata::FETCH_EAGER) |
|
| 992 | - ->getSingleResult(); |
|
| 990 | + ->setParameter(1, $article->id) |
|
| 991 | + ->setFetchMode(CmsArticle::class, 'user', ClassMetadata::FETCH_EAGER) |
|
| 992 | + ->getSingleResult(); |
|
| 993 | 993 | $this->assertInstanceOf(Proxy::class, $article->user, "It IS a proxy, ..."); |
| 994 | 994 | $this->assertTrue($article->user->__isInitialized__, "...but its initialized!"); |
| 995 | 995 | $this->assertEquals($qc+2, $this->getCurrentQueryCount()); |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | $user->username = 'gblanco'; |
| 183 | 183 | $user->status = 'developer'; |
| 184 | 184 | |
| 185 | - for ($i=0; $i<3; ++$i) { |
|
| 185 | + for ($i = 0; $i < 3; ++$i) { |
|
| 186 | 186 | $phone = new CmsPhonenumber; |
| 187 | 187 | $phone->phonenumber = 100 + $i; |
| 188 | 188 | $user->addPhonenumber($phone); |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | $user->username = 'gblanco'; |
| 411 | 411 | $user->status = 'developer'; |
| 412 | 412 | |
| 413 | - for ($i=0; $i<3; ++$i) { |
|
| 413 | + for ($i = 0; $i < 3; ++$i) { |
|
| 414 | 414 | $phone = new CmsPhonenumber; |
| 415 | 415 | $phone->phonenumber = 100 + $i; |
| 416 | 416 | $user->addPhonenumber($phone); |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | $user->username = 'gblanco'; |
| 451 | 451 | $user->status = 'developer'; |
| 452 | 452 | |
| 453 | - for ($i=0; $i<3; ++$i) { |
|
| 453 | + for ($i = 0; $i < 3; ++$i) { |
|
| 454 | 454 | $phone = new CmsPhonenumber; |
| 455 | 455 | $phone->phonenumber = 100 + $i; |
| 456 | 456 | $user->addPhonenumber($phone); |
@@ -530,7 +530,7 @@ discard block |
||
| 530 | 530 | $user->username = 'gblanco'; |
| 531 | 531 | $user->status = 'developer'; |
| 532 | 532 | |
| 533 | - for ($i=0; $i<3; ++$i) { |
|
| 533 | + for ($i = 0; $i < 3; ++$i) { |
|
| 534 | 534 | $phone = new CmsPhonenumber; |
| 535 | 535 | $phone->phonenumber = 100 + $i; |
| 536 | 536 | $user->addPhonenumber($phone); |
@@ -992,7 +992,7 @@ discard block |
||
| 992 | 992 | ->getSingleResult(); |
| 993 | 993 | $this->assertInstanceOf(Proxy::class, $article->user, "It IS a proxy, ..."); |
| 994 | 994 | $this->assertTrue($article->user->__isInitialized__, "...but its initialized!"); |
| 995 | - $this->assertEquals($qc+2, $this->getCurrentQueryCount()); |
|
| 995 | + $this->assertEquals($qc + 2, $this->getCurrentQueryCount()); |
|
| 996 | 996 | } |
| 997 | 997 | |
| 998 | 998 | /** |
@@ -1285,7 +1285,7 @@ discard block |
||
| 1285 | 1285 | |
| 1286 | 1286 | $this->expectException(ORMInvalidArgumentException::class); |
| 1287 | 1287 | $this->expectExceptionMessage( |
| 1288 | - 'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field ' . |
|
| 1288 | + 'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field '. |
|
| 1289 | 1289 | '"Doctrine\Tests\Models\CMS\CmsUser#$address", got "Doctrine\Tests\Models\CMS\CmsUser" instead.' |
| 1290 | 1290 | ); |
| 1291 | 1291 | |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | |
| 296 | 296 | $queryCount = $this->getCurrentQueryCount(); |
| 297 | 297 | $this->assertFalse($user->articles->contains($article)); |
| 298 | - $this->assertEquals($queryCount+1, $this->getCurrentQueryCount(), "Checking for contains of persisted entity should cause one query to be executed."); |
|
| 298 | + $this->assertEquals($queryCount + 1, $this->getCurrentQueryCount(), "Checking for contains of persisted entity should cause one query to be executed."); |
|
| 299 | 299 | $this->assertFalse($user->articles->isInitialized(), "Post-Condition: Collection is not initialized."); |
| 300 | 300 | |
| 301 | 301 | // Test One to Many existence with state managed |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | |
| 463 | 463 | $queryCount = $this->getCurrentQueryCount(); |
| 464 | 464 | $this->assertTrue($group->users->contains($user)); |
| 465 | - $this->assertEquals($queryCount+1, $this->getCurrentQueryCount(), "Checking for contains of managed entity should cause one query to be executed."); |
|
| 465 | + $this->assertEquals($queryCount + 1, $this->getCurrentQueryCount(), "Checking for contains of managed entity should cause one query to be executed."); |
|
| 466 | 466 | $this->assertFalse($user->groups->isInitialized(), "Post-Condition: Collection is not initialized."); |
| 467 | 467 | |
| 468 | 468 | $newUser = new CmsUser(); |
@@ -1240,7 +1240,7 @@ discard block |
||
| 1240 | 1240 | $user = new User(); |
| 1241 | 1241 | $userList = new UserList(); |
| 1242 | 1242 | |
| 1243 | - $user->name = 'ocramius'; |
|
| 1243 | + $user->name = 'ocramius'; |
|
| 1244 | 1244 | $userList->listName = 'PHP Developers to follow closely'; |
| 1245 | 1245 | |
| 1246 | 1246 | $user->addUserList($userList); |
@@ -41,9 +41,9 @@ discard block |
||
| 41 | 41 | $this->_em->flush(); |
| 42 | 42 | |
| 43 | 43 | $this->assertForeignKeysContain($this->firstProduct->getId(), |
| 44 | - $this->firstRelated->getId()); |
|
| 44 | + $this->firstRelated->getId()); |
|
| 45 | 45 | $this->assertForeignKeysContain($this->firstProduct->getId(), |
| 46 | - $this->secondRelated->getId()); |
|
| 46 | + $this->secondRelated->getId()); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | public function testRemovesAManyToManyAssociation() |
@@ -56,9 +56,9 @@ discard block |
||
| 56 | 56 | $this->_em->flush(); |
| 57 | 57 | |
| 58 | 58 | $this->assertForeignKeysNotContain($this->firstProduct->getId(), |
| 59 | - $this->firstRelated->getId()); |
|
| 59 | + $this->firstRelated->getId()); |
|
| 60 | 60 | $this->assertForeignKeysContain($this->firstProduct->getId(), |
| 61 | - $this->secondRelated->getId()); |
|
| 61 | + $this->secondRelated->getId()); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | public function testEagerLoadsOwningSide() |
@@ -568,11 +568,11 @@ discard block |
||
| 568 | 568 | $user = $this->_em->find(CmsUser::class, $this->userId); |
| 569 | 569 | |
| 570 | 570 | $this->assertFalse($user->articles->isInitialized()); |
| 571 | - $this->assertEquals(2, count($user->articles->slice(0,10))); |
|
| 571 | + $this->assertEquals(2, count($user->articles->slice(0, 10))); |
|
| 572 | 572 | |
| 573 | 573 | $this->useCMSArticleTopicFilter(); |
| 574 | 574 | |
| 575 | - $this->assertEquals(1, count($user->articles->slice(0,10))); |
|
| 575 | + $this->assertEquals(1, count($user->articles->slice(0, 10))); |
|
| 576 | 576 | } |
| 577 | 577 | |
| 578 | 578 | private function useCMSGroupPrefixFilter() |
@@ -616,11 +616,11 @@ discard block |
||
| 616 | 616 | $user = $this->_em->find(CmsUser::class, $this->userId2); |
| 617 | 617 | |
| 618 | 618 | $this->assertFalse($user->groups->isInitialized()); |
| 619 | - $this->assertEquals(2, count($user->groups->slice(0,10))); |
|
| 619 | + $this->assertEquals(2, count($user->groups->slice(0, 10))); |
|
| 620 | 620 | |
| 621 | 621 | $this->useCMSGroupPrefixFilter(); |
| 622 | 622 | |
| 623 | - $this->assertEquals(1, count($user->groups->slice(0,10))); |
|
| 623 | + $this->assertEquals(1, count($user->groups->slice(0, 10))); |
|
| 624 | 624 | } |
| 625 | 625 | |
| 626 | 626 | private function loadFixtureData() |
@@ -1106,11 +1106,11 @@ discard block |
||
| 1106 | 1106 | { |
| 1107 | 1107 | public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) |
| 1108 | 1108 | { |
| 1109 | - if (!in_array("LocaleAware", $targetEntity->reflClass->getInterfaceNames())) { |
|
| 1109 | + if ( ! in_array("LocaleAware", $targetEntity->reflClass->getInterfaceNames())) { |
|
| 1110 | 1110 | return ""; |
| 1111 | 1111 | } |
| 1112 | 1112 | |
| 1113 | - return $targetTableAlias.'.locale = ' . $this->getParameter('locale'); // getParam uses connection to quote the value. |
|
| 1113 | + return $targetTableAlias.'.locale = '.$this->getParameter('locale'); // getParam uses connection to quote the value. |
|
| 1114 | 1114 | } |
| 1115 | 1115 | } |
| 1116 | 1116 | |
@@ -1122,7 +1122,7 @@ discard block |
||
| 1122 | 1122 | return ""; |
| 1123 | 1123 | } |
| 1124 | 1124 | |
| 1125 | - return $targetTableAlias.'.country = ' . $this->getParameter('country'); // getParam uses connection to quote the value. |
|
| 1125 | + return $targetTableAlias.'.country = '.$this->getParameter('country'); // getParam uses connection to quote the value. |
|
| 1126 | 1126 | } |
| 1127 | 1127 | } |
| 1128 | 1128 | |
@@ -1134,7 +1134,7 @@ discard block |
||
| 1134 | 1134 | return ""; |
| 1135 | 1135 | } |
| 1136 | 1136 | |
| 1137 | - return $targetTableAlias.'.name LIKE ' . $this->getParameter('prefix'); // getParam uses connection to quote the value. |
|
| 1137 | + return $targetTableAlias.'.name LIKE '.$this->getParameter('prefix'); // getParam uses connection to quote the value. |
|
| 1138 | 1138 | } |
| 1139 | 1139 | } |
| 1140 | 1140 | |
@@ -1146,7 +1146,7 @@ discard block |
||
| 1146 | 1146 | return ""; |
| 1147 | 1147 | } |
| 1148 | 1148 | |
| 1149 | - return $targetTableAlias.'.topic = ' . $this->getParameter('topic'); // getParam uses connection to quote the value. |
|
| 1149 | + return $targetTableAlias.'.topic = '.$this->getParameter('topic'); // getParam uses connection to quote the value. |
|
| 1150 | 1150 | } |
| 1151 | 1151 | } |
| 1152 | 1152 | |
@@ -1158,7 +1158,7 @@ discard block |
||
| 1158 | 1158 | return ""; |
| 1159 | 1159 | } |
| 1160 | 1160 | |
| 1161 | - return $targetTableAlias.'.name LIKE ' . $this->getParameter('name'); |
|
| 1161 | + return $targetTableAlias.'.name LIKE '.$this->getParameter('name'); |
|
| 1162 | 1162 | } |
| 1163 | 1163 | } |
| 1164 | 1164 | |
@@ -1170,7 +1170,7 @@ discard block |
||
| 1170 | 1170 | return ""; |
| 1171 | 1171 | } |
| 1172 | 1172 | |
| 1173 | - return $targetTableAlias.'.completed = ' . $this->getParameter('completed'); |
|
| 1173 | + return $targetTableAlias.'.completed = '.$this->getParameter('completed'); |
|
| 1174 | 1174 | } |
| 1175 | 1175 | } |
| 1176 | 1176 | |
@@ -1182,6 +1182,6 @@ discard block |
||
| 1182 | 1182 | return ""; |
| 1183 | 1183 | } |
| 1184 | 1184 | |
| 1185 | - return $targetTableAlias.'.id = ' . $this->getParameter('id'); |
|
| 1185 | + return $targetTableAlias.'.id = '.$this->getParameter('id'); |
|
| 1186 | 1186 | } |
| 1187 | 1187 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | * @DiscriminatorMap({"parent" = "CTIParent", "child" = "CTIChild"}) |
| 85 | 85 | */ |
| 86 | 86 | class CTIParent { |
| 87 | - /** |
|
| 87 | + /** |
|
| 88 | 88 | * @Id @Column(type="integer") |
| 89 | 89 | * @GeneratedValue(strategy="AUTO") |
| 90 | 90 | */ |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | * @Entity @Table(name="cti_children") |
| 112 | 112 | */ |
| 113 | 113 | class CTIChild extends CTIParent { |
| 114 | - /** |
|
| 114 | + /** |
|
| 115 | 115 | * @Column(type="string") |
| 116 | 116 | */ |
| 117 | 117 | private $data; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | public function testMultiLevelUpdateAndFind() |
| 97 | 97 | { |
| 98 | - $manager = new CompanyManager; |
|
| 98 | + $manager = new CompanyManager; |
|
| 99 | 99 | $manager->setName('Roman S. Borschel'); |
| 100 | 100 | $manager->setSalary(100000); |
| 101 | 101 | $manager->setDepartment('IT'); |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | public function testSelfReferencingOneToOne() |
| 145 | 145 | { |
| 146 | - $manager = new CompanyManager; |
|
| 146 | + $manager = new CompanyManager; |
|
| 147 | 147 | $manager->setName('John Smith'); |
| 148 | 148 | $manager->setSalary(100000); |
| 149 | 149 | $manager->setDepartment('IT'); |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | public function testBulkUpdateIssueDDC368() |
| 285 | 285 | { |
| 286 | 286 | $this->_em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.salary = 1') |
| 287 | - ->execute(); |
|
| 287 | + ->execute(); |
|
| 288 | 288 | |
| 289 | 289 | $result = $this->_em->createQuery('SELECT count(p.id) FROM ' . CompanyEmployee::class . ' p WHERE p.salary = 1') |
| 290 | 290 | ->getResult(); |
@@ -298,9 +298,9 @@ discard block |
||
| 298 | 298 | public function testBulkUpdateNonScalarParameterDDC1341() |
| 299 | 299 | { |
| 300 | 300 | $this->_em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.startDate = ?0 WHERE p.department = ?1') |
| 301 | - ->setParameter(0, new \DateTime()) |
|
| 302 | - ->setParameter(1, 'IT') |
|
| 303 | - ->execute(); |
|
| 301 | + ->setParameter(0, new \DateTime()) |
|
| 302 | + ->setParameter(1, 'IT') |
|
| 303 | + ->execute(); |
|
| 304 | 304 | |
| 305 | 305 | $this->addToAssertionCount(1); |
| 306 | 306 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | $this->_em->clear(); |
| 49 | 49 | |
| 50 | - $query = $this->_em->createQuery('select p from ' . CompanyPerson::class . ' p order by p.name desc'); |
|
| 50 | + $query = $this->_em->createQuery('select p from '.CompanyPerson::class.' p order by p.name desc'); |
|
| 51 | 51 | |
| 52 | 52 | $entities = $query->getResult(); |
| 53 | 53 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | $this->_em->clear(); |
| 64 | 64 | |
| 65 | - $query = $this->_em->createQuery('select p from ' . CompanyEmployee::class . ' p'); |
|
| 65 | + $query = $this->_em->createQuery('select p from '.CompanyEmployee::class.' p'); |
|
| 66 | 66 | |
| 67 | 67 | $entities = $query->getResult(); |
| 68 | 68 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | $this->_em->clear(); |
| 82 | 82 | |
| 83 | - $query = $this->_em->createQuery("update " . CompanyEmployee::class . " p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3"); |
|
| 83 | + $query = $this->_em->createQuery("update ".CompanyEmployee::class." p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3"); |
|
| 84 | 84 | $query->setParameter(1, 'NewName', 'string'); |
| 85 | 85 | $query->setParameter(2, 'NewDepartment'); |
| 86 | 86 | $query->setParameter(3, 100000); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $numUpdated = $query->execute(); |
| 89 | 89 | $this->assertEquals(1, $numUpdated); |
| 90 | 90 | |
| 91 | - $query = $this->_em->createQuery('delete from ' . CompanyPerson::class . ' p'); |
|
| 91 | + $query = $this->_em->createQuery('delete from '.CompanyPerson::class.' p'); |
|
| 92 | 92 | $numDeleted = $query->execute(); |
| 93 | 93 | $this->assertEquals(2, $numDeleted); |
| 94 | 94 | } |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | $this->_em->flush(); |
| 162 | 162 | $this->_em->clear(); |
| 163 | 163 | |
| 164 | - $query = $this->_em->createQuery('select p, s from ' . CompanyPerson::class . ' p join p.spouse s where p.name=\'Mary Smith\''); |
|
| 164 | + $query = $this->_em->createQuery('select p, s from '.CompanyPerson::class.' p join p.spouse s where p.name=\'Mary Smith\''); |
|
| 165 | 165 | |
| 166 | 166 | $result = $query->getResult(); |
| 167 | 167 | $this->assertCount(1, $result); |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | |
| 194 | 194 | $this->_em->clear(); |
| 195 | 195 | |
| 196 | - $query = $this->_em->createQuery('select p, f from ' . CompanyPerson::class . ' p join p.friends f where p.name=?1'); |
|
| 196 | + $query = $this->_em->createQuery('select p, f from '.CompanyPerson::class.' p join p.friends f where p.name=?1'); |
|
| 197 | 197 | $query->setParameter(1, 'Roman'); |
| 198 | 198 | |
| 199 | 199 | $result = $query->getResult(); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | $this->_em->flush(); |
| 256 | 256 | $this->_em->clear(); |
| 257 | 257 | |
| 258 | - $q = $this->_em->createQuery('select a from ' . CompanyEvent::class . ' a where a.id = ?1'); |
|
| 258 | + $q = $this->_em->createQuery('select a from '.CompanyEvent::class.' a where a.id = ?1'); |
|
| 259 | 259 | $q->setParameter(1, $event1->getId()); |
| 260 | 260 | |
| 261 | 261 | $result = $q->getResult(); |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | |
| 265 | 265 | $this->_em->clear(); |
| 266 | 266 | |
| 267 | - $q = $this->_em->createQuery('select a from ' . CompanyOrganization::class . ' a where a.id = ?1'); |
|
| 267 | + $q = $this->_em->createQuery('select a from '.CompanyOrganization::class.' a where a.id = ?1'); |
|
| 268 | 268 | $q->setParameter(1, $org->getId()); |
| 269 | 269 | |
| 270 | 270 | $result = $q->getResult(); |
@@ -283,10 +283,10 @@ discard block |
||
| 283 | 283 | */ |
| 284 | 284 | public function testBulkUpdateIssueDDC368() |
| 285 | 285 | { |
| 286 | - $this->_em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.salary = 1') |
|
| 286 | + $this->_em->createQuery('UPDATE '.CompanyEmployee::class.' AS p SET p.salary = 1') |
|
| 287 | 287 | ->execute(); |
| 288 | 288 | |
| 289 | - $result = $this->_em->createQuery('SELECT count(p.id) FROM ' . CompanyEmployee::class . ' p WHERE p.salary = 1') |
|
| 289 | + $result = $this->_em->createQuery('SELECT count(p.id) FROM '.CompanyEmployee::class.' p WHERE p.salary = 1') |
|
| 290 | 290 | ->getResult(); |
| 291 | 291 | |
| 292 | 292 | $this->assertGreaterThan(0, count($result)); |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | */ |
| 298 | 298 | public function testBulkUpdateNonScalarParameterDDC1341() |
| 299 | 299 | { |
| 300 | - $this->_em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.startDate = ?0 WHERE p.department = ?1') |
|
| 300 | + $this->_em->createQuery('UPDATE '.CompanyEmployee::class.' AS p SET p.startDate = ?0 WHERE p.department = ?1') |
|
| 301 | 301 | ->setParameter(0, new \DateTime()) |
| 302 | 302 | ->setParameter(1, 'IT') |
| 303 | 303 | ->execute(); |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | $this->_em->flush(); |
| 356 | 356 | $this->_em->clear(); |
| 357 | 357 | |
| 358 | - $dqlManager = $this->_em->createQuery('SELECT m FROM ' . CompanyManager::class . ' m WHERE m.spouse = ?1') |
|
| 358 | + $dqlManager = $this->_em->createQuery('SELECT m FROM '.CompanyManager::class.' m WHERE m.spouse = ?1') |
|
| 359 | 359 | ->setParameter(1, $person->getId()) |
| 360 | 360 | ->getSingleResult(); |
| 361 | 361 | |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | { |
| 198 | 198 | $listener = new ListenerSecondLevelCacheTest( |
| 199 | 199 | [ |
| 200 | - Events::postFlush => function(){ |
|
| 200 | + Events::postFlush => function() { |
|
| 201 | 201 | throw new \RuntimeException('post flush failure'); |
| 202 | 202 | } |
| 203 | 203 | ] |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | |
| 232 | 232 | $listener = new ListenerSecondLevelCacheTest( |
| 233 | 233 | [ |
| 234 | - Events::postUpdate => function(){ |
|
| 234 | + Events::postUpdate => function() { |
|
| 235 | 235 | throw new \RuntimeException('post update failure'); |
| 236 | 236 | } |
| 237 | 237 | ] |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | $this->assertInstanceOf(State::class, $state); |
| 251 | 251 | $this->assertEquals($stateName, $state->getName()); |
| 252 | 252 | |
| 253 | - $state->setName($stateName . uniqid()); |
|
| 253 | + $state->setName($stateName.uniqid()); |
|
| 254 | 254 | |
| 255 | 255 | $this->_em->persist($state); |
| 256 | 256 | |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | |
| 280 | 280 | $listener = new ListenerSecondLevelCacheTest( |
| 281 | 281 | [ |
| 282 | - Events::postRemove => function(){ |
|
| 282 | + Events::postRemove => function() { |
|
| 283 | 283 | throw new \RuntimeException('post remove failure'); |
| 284 | 284 | } |
| 285 | 285 | ] |
@@ -25,8 +25,8 @@ discard block |
||
| 25 | 25 | public function testAggregateWithHavingClause() |
| 26 | 26 | { |
| 27 | 27 | $dql = 'SELECT p.department, AVG(p.salary) AS avgSalary '. |
| 28 | - 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '. |
|
| 29 | - 'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department'; |
|
| 28 | + 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '. |
|
| 29 | + 'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department'; |
|
| 30 | 30 | |
| 31 | 31 | $result = $this->_em->createQuery($dql)->getScalarResult(); |
| 32 | 32 | |
@@ -40,8 +40,8 @@ discard block |
||
| 40 | 40 | public function testUnnamedScalarResultsAreOneBased() |
| 41 | 41 | { |
| 42 | 42 | $dql = 'SELECT p.department, AVG(p.salary) '. |
| 43 | - 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '. |
|
| 44 | - 'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department'; |
|
| 43 | + 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '. |
|
| 44 | + 'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department'; |
|
| 45 | 45 | |
| 46 | 46 | $result = $this->_em->createQuery($dql)->getScalarResult(); |
| 47 | 47 | |
@@ -53,9 +53,9 @@ discard block |
||
| 53 | 53 | public function testOrderByResultVariableCollectionSize() |
| 54 | 54 | { |
| 55 | 55 | $dql = 'SELECT p.name, size(p.friends) AS friends ' . |
| 56 | - 'FROM Doctrine\Tests\Models\Company\CompanyPerson p ' . |
|
| 57 | - 'WHERE p.friends IS NOT EMPTY ' . |
|
| 58 | - 'ORDER BY friends DESC, p.name DESC'; |
|
| 56 | + 'FROM Doctrine\Tests\Models\Company\CompanyPerson p ' . |
|
| 57 | + 'WHERE p.friends IS NOT EMPTY ' . |
|
| 58 | + 'ORDER BY friends DESC, p.name DESC'; |
|
| 59 | 59 | |
| 60 | 60 | $result = $this->_em->createQuery($dql)->getScalarResult(); |
| 61 | 61 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | public function testIsNullAssociation() |
| 78 | 78 | { |
| 79 | 79 | $dql = 'SELECT p FROM Doctrine\Tests\Models\Company\CompanyPerson p '. |
| 80 | - 'WHERE p.spouse IS NULL'; |
|
| 80 | + 'WHERE p.spouse IS NULL'; |
|
| 81 | 81 | $result = $this->_em->createQuery($dql)->getResult(); |
| 82 | 82 | |
| 83 | 83 | $this->assertEquals(2, count($result)); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | public function testSelectSubselect() |
| 92 | 92 | { |
| 93 | 93 | $dql = 'SELECT p, (SELECT c.brand FROM Doctrine\Tests\Models\Company\CompanyCar c WHERE p.car = c) brandName '. |
| 94 | - 'FROM Doctrine\Tests\Models\Company\CompanyManager p'; |
|
| 94 | + 'FROM Doctrine\Tests\Models\Company\CompanyManager p'; |
|
| 95 | 95 | $result = $this->_em->createQuery($dql)->getArrayResult(); |
| 96 | 96 | |
| 97 | 97 | $this->assertEquals(1, count($result)); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | public function testInSubselect() |
| 102 | 102 | { |
| 103 | 103 | $dql = "SELECT p.name FROM Doctrine\Tests\Models\Company\CompanyPerson p ". |
| 104 | - "WHERE p.name IN (SELECT n.name FROM Doctrine\Tests\Models\Company\CompanyPerson n WHERE n.name = 'Roman B.')"; |
|
| 104 | + "WHERE p.name IN (SELECT n.name FROM Doctrine\Tests\Models\Company\CompanyPerson n WHERE n.name = 'Roman B.')"; |
|
| 105 | 105 | $result = $this->_em->createQuery($dql)->getScalarResult(); |
| 106 | 106 | |
| 107 | 107 | $this->assertEquals(1, count($result)); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | public function testGroupByMultipleFields() |
| 112 | 112 | { |
| 113 | 113 | $dql = 'SELECT p.department, p.name, count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p '. |
| 114 | - 'GROUP BY p.department, p.name'; |
|
| 114 | + 'GROUP BY p.department, p.name'; |
|
| 115 | 115 | $result = $this->_em->createQuery($dql)->getResult(); |
| 116 | 116 | |
| 117 | 117 | $this->assertEquals(4, count($result)); |
@@ -52,9 +52,9 @@ |
||
| 52 | 52 | |
| 53 | 53 | public function testOrderByResultVariableCollectionSize() |
| 54 | 54 | { |
| 55 | - $dql = 'SELECT p.name, size(p.friends) AS friends ' . |
|
| 56 | - 'FROM Doctrine\Tests\Models\Company\CompanyPerson p ' . |
|
| 57 | - 'WHERE p.friends IS NOT EMPTY ' . |
|
| 55 | + $dql = 'SELECT p.name, size(p.friends) AS friends '. |
|
| 56 | + 'FROM Doctrine\Tests\Models\Company\CompanyPerson p '. |
|
| 57 | + 'WHERE p.friends IS NOT EMPTY '. |
|
| 58 | 58 | 'ORDER BY friends DESC, p.name DESC'; |
| 59 | 59 | |
| 60 | 60 | $result = $this->_em->createQuery($dql)->getScalarResult(); |