@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | $entity = new DDC1526Menu; |
| 25 | 25 | |
| 26 | 26 | if (isset ($parents[($i % 3)])) { |
| 27 | - $entity->parent = $parents[($i%3)]; |
|
| 27 | + $entity->parent = $parents[($i % 3)]; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | $this->_em->persist($entity); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | |
| 37 | 37 | $dql = "SELECT m, c |
| 38 | - FROM " . __NAMESPACE__ . "\DDC1526Menu m |
|
| 38 | + FROM " . __NAMESPACE__."\DDC1526Menu m |
|
| 39 | 39 | LEFT JOIN m.children c"; |
| 40 | 40 | $menus = $this->_em->createQuery($dql)->getResult(); |
| 41 | 41 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | $product->addBuyer($user); |
| 33 | 33 | |
| 34 | 34 | $this->_em->getUnitOfWork() |
| 35 | - ->computeChangeSets(); |
|
| 35 | + ->computeChangeSets(); |
|
| 36 | 36 | |
| 37 | 37 | $this->_em->persist($product); |
| 38 | 38 | $this->_em->flush(); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | |
| 36 | 36 | public function testSavesVeryLargeIntegerAutoGeneratedValue() |
| 37 | 37 | { |
| 38 | - $veryLargeId = PHP_INT_MAX . PHP_INT_MAX; |
|
| 38 | + $veryLargeId = PHP_INT_MAX.PHP_INT_MAX; |
|
| 39 | 39 | |
| 40 | 40 | $entityManager = EntityManager::create( |
| 41 | 41 | new DDC3634LastInsertIdMockingConnection($veryLargeId, $this->_em->getConnection()), |
@@ -148,9 +148,9 @@ discard block |
||
| 148 | 148 | |
| 149 | 149 | $dql = "DELETE Doctrine\Tests\Models\DDC117\DDC117Reference r WHERE r.source = ?1 AND r.target = ?2"; |
| 150 | 150 | $this->_em->createQuery($dql) |
| 151 | - ->setParameter(1, $this->article1->id()) |
|
| 152 | - ->setParameter(2, $this->article2->id()) |
|
| 153 | - ->execute(); |
|
| 151 | + ->setParameter(1, $this->article1->id()) |
|
| 152 | + ->setParameter(2, $this->article2->id()) |
|
| 153 | + ->execute(); |
|
| 154 | 154 | |
| 155 | 155 | $this->assertNull($this->_em->find(DDC117Reference::class, $idCriteria)); |
| 156 | 156 | } |
@@ -200,9 +200,9 @@ discard block |
||
| 200 | 200 | |
| 201 | 201 | $dql = 'SELECT t, a FROM Doctrine\Tests\Models\DDC117\DDC117Translation t JOIN t.article a WHERE t.article = ?1 AND t.language = ?2'; |
| 202 | 202 | $dqlTrans = $this->_em->createQuery($dql) |
| 203 | - ->setParameter(1, $this->article1->id()) |
|
| 204 | - ->setParameter(2, 'en') |
|
| 205 | - ->getSingleResult(); |
|
| 203 | + ->setParameter(1, $this->article1->id()) |
|
| 204 | + ->setParameter(2, 'en') |
|
| 205 | + ->getSingleResult(); |
|
| 206 | 206 | |
| 207 | 207 | $this->assertInstanceOf(DDC117Translation::class, $this->translation); |
| 208 | 208 | } |
@@ -367,11 +367,11 @@ discard block |
||
| 367 | 367 | $this->_em->clear(); |
| 368 | 368 | |
| 369 | 369 | $dql = "SELECT t, e FROM Doctrine\Tests\Models\DDC117\DDC117Translation t ". |
| 370 | - "JOIN t.reviewedByEditors e WHERE t.article = ?1 AND t.language = ?2"; |
|
| 370 | + "JOIN t.reviewedByEditors e WHERE t.article = ?1 AND t.language = ?2"; |
|
| 371 | 371 | $trans = $this->_em->createQuery($dql) |
| 372 | - ->setParameter(1, $this->translation->getArticleId()) |
|
| 373 | - ->setParameter(2, $this->translation->getLanguage()) |
|
| 374 | - ->getSingleResult(); |
|
| 372 | + ->setParameter(1, $this->translation->getArticleId()) |
|
| 373 | + ->setParameter(2, $this->translation->getLanguage()) |
|
| 374 | + ->getSingleResult(); |
|
| 375 | 375 | |
| 376 | 376 | $this->assertInstanceOf(DDC117Translation::class, $trans); |
| 377 | 377 | $this->assertContainsOnly(DDC117Editor::class, $trans->reviewedByEditors); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | $this->_em->clear(); |
| 66 | 66 | |
| 67 | - $dql = 'SELECT r, s FROM ' . DDC117Reference::class . ' r JOIN r.source s WHERE r.source = ?1'; |
|
| 67 | + $dql = 'SELECT r, s FROM '.DDC117Reference::class.' r JOIN r.source s WHERE r.source = ?1'; |
|
| 68 | 68 | $dqlRef = $this->_em->createQuery($dql)->setParameter(1, 1)->getSingleResult(); |
| 69 | 69 | |
| 70 | 70 | $this->assertInstanceOf(DDC117Reference::class, $mapRef); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | $this->_em->clear(); |
| 76 | 76 | |
| 77 | - $dql = 'SELECT r, s FROM ' . DDC117Reference::class . ' r JOIN r.source s WHERE s.title = ?1'; |
|
| 77 | + $dql = 'SELECT r, s FROM '.DDC117Reference::class.' r JOIN r.source s WHERE s.title = ?1'; |
|
| 78 | 78 | $dqlRef = $this->_em->createQuery($dql)->setParameter(1, 'Foo')->getSingleResult(); |
| 79 | 79 | |
| 80 | 80 | $this->assertInstanceOf(DDC117Reference::class, $dqlRef); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $this->assertInstanceOf(DDC117Article::class, $dqlRef->source()); |
| 83 | 83 | $this->assertSame($dqlRef, $this->_em->find(DDC117Reference::class, $idCriteria)); |
| 84 | 84 | |
| 85 | - $dql = 'SELECT r, s FROM ' . DDC117Reference::class . ' r JOIN r.source s WHERE s.title = ?1'; |
|
| 85 | + $dql = 'SELECT r, s FROM '.DDC117Reference::class.' r JOIN r.source s WHERE s.title = ?1'; |
|
| 86 | 86 | $dqlRef = $this->_em->createQuery($dql)->setParameter(1, 'Foo')->getSingleResult(); |
| 87 | 87 | |
| 88 | 88 | $this->_em->contains($dqlRef); |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | try { |
| 221 | 221 | // exception depending on the underlying Database Driver |
| 222 | 222 | $this->_em->flush(); |
| 223 | - } catch(\Exception $e) { |
|
| 223 | + } catch (\Exception $e) { |
|
| 224 | 224 | $exceptionThrown = true; |
| 225 | 225 | } |
| 226 | 226 | |
@@ -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 | |
@@ -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; |