@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | $entity = $this->em->find('\Doctrine\Tests\Models\CustomType\CustomTypeUpperCase', $id); |
| 48 | 48 | |
| 49 | 49 | self::assertEquals('foo', $entity->lowerCaseString, 'Entity holds lowercase string'); |
| 50 | - self::assertEquals('FOO', $this->em->getConnection()->fetchColumn('select lowerCaseString from customtype_uppercases where id=' . $entity->id . ''), 'Database holds uppercase string'); |
|
| 50 | + self::assertEquals('FOO', $this->em->getConnection()->fetchColumn('select lowerCaseString from customtype_uppercases where id='.$entity->id.''), 'Database holds uppercase string'); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | $entity = $this->em->find('\Doctrine\Tests\Models\CustomType\CustomTypeUpperCase', $id); |
| 70 | 70 | self::assertEquals('foo', $entity->namedLowerCaseString, 'Entity holds lowercase string'); |
| 71 | - self::assertEquals('FOO', $this->em->getConnection()->fetchColumn('select named_lower_case_string from customtype_uppercases where id=' . $entity->id . ''), 'Database holds uppercase string'); |
|
| 71 | + self::assertEquals('FOO', $this->em->getConnection()->fetchColumn('select named_lower_case_string from customtype_uppercases where id='.$entity->id.''), 'Database holds uppercase string'); |
|
| 72 | 72 | |
| 73 | 73 | $entity->namedLowerCaseString = 'bar'; |
| 74 | 74 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | $entity = $this->em->find('\Doctrine\Tests\Models\CustomType\CustomTypeUpperCase', $id); |
| 83 | 83 | self::assertEquals('bar', $entity->namedLowerCaseString, 'Entity holds lowercase string'); |
| 84 | - self::assertEquals('BAR', $this->em->getConnection()->fetchColumn('select named_lower_case_string from customtype_uppercases where id=' . $entity->id . ''), 'Database holds uppercase string'); |
|
| 84 | + self::assertEquals('BAR', $this->em->getConnection()->fetchColumn('select named_lower_case_string from customtype_uppercases where id='.$entity->id.''), 'Database holds uppercase string'); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | public function testTypeValueSqlWithAssociations() : void |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $entity = $this->em->find(CustomTypeParent::class, $parentId); |
| 109 | 109 | |
| 110 | 110 | self::assertTrue($entity->customInteger < 0, 'Fetched customInteger negative'); |
| 111 | - self::assertEquals(1, $this->em->getConnection()->fetchColumn('select customInteger from customtype_parents where id=' . $entity->id . ''), 'Database has stored customInteger positive'); |
|
| 111 | + self::assertEquals(1, $this->em->getConnection()->fetchColumn('select customInteger from customtype_parents where id='.$entity->id.''), 'Database has stored customInteger positive'); |
|
| 112 | 112 | |
| 113 | 113 | self::assertNotNull($parent->child, 'Child attached'); |
| 114 | 114 | self::assertCount(2, $entity->getMyFriends(), '2 friends attached'); |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | $this->em->clear(); |
| 129 | 129 | |
| 130 | - $query = $this->em->createQuery('SELECT p, p.customInteger, c from Doctrine\Tests\Models\CustomType\CustomTypeParent p JOIN p.child c where p.id = ' . $parentId); |
|
| 130 | + $query = $this->em->createQuery('SELECT p, p.customInteger, c from Doctrine\Tests\Models\CustomType\CustomTypeParent p JOIN p.child c where p.id = '.$parentId); |
|
| 131 | 131 | |
| 132 | 132 | $result = $query->getResult(); |
| 133 | 133 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | protected function setUp() : void |
| 25 | 25 | { |
| 26 | - if (! class_exists('GearmanClient', false)) { |
|
| 26 | + if ( ! class_exists('GearmanClient', false)) { |
|
| 27 | 27 | $this->markTestSkipped('pecl/gearman is required for this test to run.'); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -140,13 +140,13 @@ discard block |
||
| 140 | 140 | |
| 141 | 141 | self::assertTrue( |
| 142 | 142 | $this->maxRunTime > $forTime, |
| 143 | - 'Because of locking this tests should have run at least ' . $forTime . ' seconds, ' . |
|
| 144 | - 'but only did for ' . $this->maxRunTime . ' seconds.' |
|
| 143 | + 'Because of locking this tests should have run at least '.$forTime.' seconds, '. |
|
| 144 | + 'but only did for '.$this->maxRunTime.' seconds.' |
|
| 145 | 145 | ); |
| 146 | 146 | self::assertTrue( |
| 147 | 147 | $this->maxRunTime < $notLongerThan, |
| 148 | - 'The longest task should not run longer than ' . $notLongerThan . ' seconds, ' . |
|
| 149 | - 'but did for ' . $this->maxRunTime . ' seconds.' |
|
| 148 | + 'The longest task should not run longer than '.$notLongerThan.' seconds, '. |
|
| 149 | + 'but did for '.$this->maxRunTime.' seconds.' |
|
| 150 | 150 | ); |
| 151 | 151 | } |
| 152 | 152 | |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | $test = new OptimisticStandard(); |
| 121 | 121 | |
| 122 | 122 | for ($i = 0; $i < 5; $i++) { |
| 123 | - $test->name = 'test' . $i; |
|
| 123 | + $test->name = 'test'.$i; |
|
| 124 | 124 | |
| 125 | 125 | $this->em->persist($test); |
| 126 | 126 | $this->em->flush(); |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | $caughtException = null; |
| 253 | 253 | |
| 254 | 254 | try { |
| 255 | - $expectedVersionExpired = DateTime::createFromFormat('U', (string) ($test->version->getTimestamp()-3600)); |
|
| 255 | + $expectedVersionExpired = DateTime::createFromFormat('U', (string) ($test->version->getTimestamp() - 3600)); |
|
| 256 | 256 | |
| 257 | 257 | $this->em->lock($test, LockMode::OPTIMISTIC, $expectedVersionExpired); |
| 258 | 258 | } catch (OptimisticLockException $e) { |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | public function testIssue() : void |
| 25 | 25 | { |
| 26 | - $q = $this->em->createQuery('select u, c.data from ' . __NAMESPACE__ . '\\DDC493Distributor u JOIN u.contact c'); |
|
| 26 | + $q = $this->em->createQuery('select u, c.data from '.__NAMESPACE__.'\\DDC493Distributor u JOIN u.contact c'); |
|
| 27 | 27 | |
| 28 | 28 | self::assertSQLEquals( |
| 29 | 29 | 'SELECT t0."id" AS c0, t1."data" AS c1, t0."discr" AS c2, t0."contact" AS c3 FROM "DDC493Distributor" t2 INNER JOIN "DDC493Customer" t0 ON t2."id" = t0."id" INNER JOIN "DDC493Contact" t1 ON t0."contact" = t1."id"', |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | public function testIssue() : Query |
| 26 | 26 | { |
| 27 | - $dql = 'SELECT e FROM ' . __NAMESPACE__ . '\DDC2224Entity e WHERE e.field = :field'; |
|
| 27 | + $dql = 'SELECT e FROM '.__NAMESPACE__.'\DDC2224Entity e WHERE e.field = :field'; |
|
| 28 | 28 | $query = $this->em->createQuery($dql); |
| 29 | 29 | $query->setQueryCacheDriver(new ArrayCache()); |
| 30 | 30 | |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | $this->em->flush(); |
| 58 | 58 | $this->em->clear(); |
| 59 | 59 | |
| 60 | - $dql = 'SELECT a, b, ba, c FROM ' . __NAMESPACE__ . '\DDC1514EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba LEFT JOIN a.entityC AS c ORDER BY a.title'; |
|
| 60 | + $dql = 'SELECT a, b, ba, c FROM '.__NAMESPACE__.'\DDC1514EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba LEFT JOIN a.entityC AS c ORDER BY a.title'; |
|
| 61 | 61 | $results = $this->em->createQuery($dql)->getResult(); |
| 62 | 62 | |
| 63 | 63 | self::assertEquals($a1->id, $results[0]->id); |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $this->em->flush(); |
| 52 | 52 | $this->em->clear(); |
| 53 | 53 | |
| 54 | - $dql = 'SELECT a, b, ba FROM ' . __NAMESPACE__ . '\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba'; |
|
| 54 | + $dql = 'SELECT a, b, ba FROM '.__NAMESPACE__.'\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba'; |
|
| 55 | 55 | $results = $this->em->createQuery($dql)->setMaxResults(1)->getResult(); |
| 56 | 56 | |
| 57 | 57 | self::assertSame($results[0], $results[0]->entitiesB[0]->entityAFrom); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | public function testIssue() : void |
| 25 | 25 | { |
| 26 | - $q = $this->em->createQuery('select u from ' . __NAMESPACE__ . '\\DDC513OfferItem u left join u.price p'); |
|
| 26 | + $q = $this->em->createQuery('select u from '.__NAMESPACE__.'\\DDC513OfferItem u left join u.price p'); |
|
| 27 | 27 | |
| 28 | 28 | self::assertSQLEquals( |
| 29 | 29 | 'SELECT t0."id" AS c0, t0."discr" AS c1, t0."price" AS c2 FROM "DDC513OfferItem" t1 INNER JOIN "DDC513Item" t0 ON t1."id" = t0."id" LEFT JOIN "DDC513Price" t2 ON t0."price" = t2."id"', |
@@ -83,14 +83,14 @@ |
||
| 83 | 83 | $this->em->clear(); |
| 84 | 84 | |
| 85 | 85 | // fetch-join that foreign-key/primary-key entity association |
| 86 | - $dql = 'SELECT c, p FROM ' . DDC881PhoneCall::class . ' c JOIN c.phonenumber p'; |
|
| 86 | + $dql = 'SELECT c, p FROM '.DDC881PhoneCall::class.' c JOIN c.phonenumber p'; |
|
| 87 | 87 | $calls = $this->em->createQuery($dql)->getResult(); |
| 88 | 88 | |
| 89 | 89 | self::assertCount(2, $calls); |
| 90 | 90 | self::assertNotInstanceOf(GhostObjectInterface::class, $calls[0]->getPhoneNumber()); |
| 91 | 91 | self::assertNotInstanceOf(GhostObjectInterface::class, $calls[1]->getPhoneNumber()); |
| 92 | 92 | |
| 93 | - $dql = 'SELECT p, c FROM ' . DDC881PhoneNumber::class . ' p JOIN p.calls c'; |
|
| 93 | + $dql = 'SELECT p, c FROM '.DDC881PhoneNumber::class.' p JOIN p.calls c'; |
|
| 94 | 94 | $numbers = $this->em->createQuery($dql)->getResult(); |
| 95 | 95 | |
| 96 | 96 | self::assertCount(2, $numbers); |