@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function setMaxRunningTime($maxRunningTime) |
| 43 | 43 | { |
| 44 | - if (! (is_int($maxRunningTime) && $maxRunningTime >= 0)) { |
|
| 44 | + if ( ! (is_int($maxRunningTime) && $maxRunningTime >= 0)) { |
|
| 45 | 45 | throw new InvalidArgumentException(); |
| 46 | 46 | } |
| 47 | 47 | |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | public function testBulkUpdateIssueDDC368() : void |
| 302 | 302 | { |
| 303 | 303 | $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.salary = 1') |
| 304 | - ->execute(); |
|
| 304 | + ->execute(); |
|
| 305 | 305 | |
| 306 | 306 | $result = $this->em->createQuery('SELECT count(p.id) FROM ' . CompanyEmployee::class . ' p WHERE p.salary = 1') |
| 307 | 307 | ->getResult(); |
@@ -315,9 +315,9 @@ discard block |
||
| 315 | 315 | public function testBulkUpdateNonScalarParameterDDC1341() : void |
| 316 | 316 | { |
| 317 | 317 | $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.startDate = ?0 WHERE p.department = ?1') |
| 318 | - ->setParameter(0, new DateTime()) |
|
| 319 | - ->setParameter(1, 'IT') |
|
| 320 | - ->execute(); |
|
| 318 | + ->setParameter(0, new DateTime()) |
|
| 319 | + ->setParameter(1, 'IT') |
|
| 320 | + ->execute(); |
|
| 321 | 321 | |
| 322 | 322 | self::addToAssertionCount(1); |
| 323 | 323 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | $this->em->clear(); |
| 52 | 52 | |
| 53 | - $query = $this->em->createQuery('select p from ' . CompanyPerson::class . ' p order by p.name desc'); |
|
| 53 | + $query = $this->em->createQuery('select p from '.CompanyPerson::class.' p order by p.name desc'); |
|
| 54 | 54 | |
| 55 | 55 | $entities = $query->getResult(); |
| 56 | 56 | |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $this->em->clear(); |
| 67 | 67 | |
| 68 | - $query = $this->em->createQuery('select p from ' . CompanyEmployee::class . ' p'); |
|
| 68 | + $query = $this->em->createQuery('select p from '.CompanyEmployee::class.' p'); |
|
| 69 | 69 | |
| 70 | 70 | $entities = $query->getResult(); |
| 71 | 71 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | $this->em->clear(); |
| 86 | 86 | |
| 87 | - $query = $this->em->createQuery('update ' . CompanyEmployee::class . " p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3"); |
|
| 87 | + $query = $this->em->createQuery('update '.CompanyEmployee::class." p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3"); |
|
| 88 | 88 | |
| 89 | 89 | $query->setParameter(1, 'NewName', 'string'); |
| 90 | 90 | $query->setParameter(2, 'NewDepartment'); |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | self::assertEquals(1, $numUpdated); |
| 97 | 97 | |
| 98 | - $query = $this->em->createQuery('delete from ' . CompanyPerson::class . ' p'); |
|
| 98 | + $query = $this->em->createQuery('delete from '.CompanyPerson::class.' p'); |
|
| 99 | 99 | |
| 100 | 100 | $numDeleted = $query->execute(); |
| 101 | 101 | |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | $this->em->flush(); |
| 171 | 171 | $this->em->clear(); |
| 172 | 172 | |
| 173 | - $query = $this->em->createQuery('select p, s from ' . CompanyPerson::class . ' p join p.spouse s where p.name=\'Mary Smith\''); |
|
| 173 | + $query = $this->em->createQuery('select p, s from '.CompanyPerson::class.' p join p.spouse s where p.name=\'Mary Smith\''); |
|
| 174 | 174 | |
| 175 | 175 | $result = $query->getResult(); |
| 176 | 176 | |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | |
| 203 | 203 | $this->em->clear(); |
| 204 | 204 | |
| 205 | - $query = $this->em->createQuery('select p, f from ' . CompanyPerson::class . ' p join p.friends f where p.name=?1'); |
|
| 205 | + $query = $this->em->createQuery('select p, f from '.CompanyPerson::class.' p join p.friends f where p.name=?1'); |
|
| 206 | 206 | |
| 207 | 207 | $query->setParameter(1, 'Roman'); |
| 208 | 208 | |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | $this->em->flush(); |
| 269 | 269 | $this->em->clear(); |
| 270 | 270 | |
| 271 | - $q = $this->em->createQuery('select a from ' . CompanyEvent::class . ' a where a.id = ?1'); |
|
| 271 | + $q = $this->em->createQuery('select a from '.CompanyEvent::class.' a where a.id = ?1'); |
|
| 272 | 272 | |
| 273 | 273 | $q->setParameter(1, $event1->getId()); |
| 274 | 274 | |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | |
| 280 | 280 | $this->em->clear(); |
| 281 | 281 | |
| 282 | - $q = $this->em->createQuery('select a from ' . CompanyOrganization::class . ' a where a.id = ?1'); |
|
| 282 | + $q = $this->em->createQuery('select a from '.CompanyOrganization::class.' a where a.id = ?1'); |
|
| 283 | 283 | |
| 284 | 284 | $q->setParameter(1, $org->getId()); |
| 285 | 285 | |
@@ -300,10 +300,10 @@ discard block |
||
| 300 | 300 | */ |
| 301 | 301 | public function testBulkUpdateIssueDDC368() : void |
| 302 | 302 | { |
| 303 | - $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.salary = 1') |
|
| 303 | + $this->em->createQuery('UPDATE '.CompanyEmployee::class.' AS p SET p.salary = 1') |
|
| 304 | 304 | ->execute(); |
| 305 | 305 | |
| 306 | - $result = $this->em->createQuery('SELECT count(p.id) FROM ' . CompanyEmployee::class . ' p WHERE p.salary = 1') |
|
| 306 | + $result = $this->em->createQuery('SELECT count(p.id) FROM '.CompanyEmployee::class.' p WHERE p.salary = 1') |
|
| 307 | 307 | ->getResult(); |
| 308 | 308 | |
| 309 | 309 | self::assertGreaterThan(0, $result); |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | */ |
| 315 | 315 | public function testBulkUpdateNonScalarParameterDDC1341() : void |
| 316 | 316 | { |
| 317 | - $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.startDate = ?0 WHERE p.department = ?1') |
|
| 317 | + $this->em->createQuery('UPDATE '.CompanyEmployee::class.' AS p SET p.startDate = ?0 WHERE p.department = ?1') |
|
| 318 | 318 | ->setParameter(0, new DateTime()) |
| 319 | 319 | ->setParameter(1, 'IT') |
| 320 | 320 | ->execute(); |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | $this->em->flush(); |
| 373 | 373 | $this->em->clear(); |
| 374 | 374 | |
| 375 | - $dqlManager = $this->em->createQuery('SELECT m FROM ' . CompanyManager::class . ' m WHERE m.spouse = ?1') |
|
| 375 | + $dqlManager = $this->em->createQuery('SELECT m FROM '.CompanyManager::class.' m WHERE m.spouse = ?1') |
|
| 376 | 376 | ->setParameter(1, $person->getId()) |
| 377 | 377 | ->getSingleResult(); |
| 378 | 378 | |
@@ -294,9 +294,9 @@ discard block |
||
| 294 | 294 | $user->username = 'gblanco'; |
| 295 | 295 | $user->status = 'developer'; |
| 296 | 296 | |
| 297 | - for ($i=0; $i < $groupCount; ++$i) { |
|
| 297 | + for ($i = 0; $i < $groupCount; ++$i) { |
|
| 298 | 298 | $group = new CmsGroup(); |
| 299 | - $group->name = 'Developers_' . $i; |
|
| 299 | + $group->name = 'Developers_'.$i; |
|
| 300 | 300 | $user->addGroup($group); |
| 301 | 301 | } |
| 302 | 302 | |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | $user |
| 429 | 429 | ->getGroups() |
| 430 | 430 | ->matching($criteria) |
| 431 | - ->map(static function (CmsGroup $group) { |
|
| 431 | + ->map(static function(CmsGroup $group) { |
|
| 432 | 432 | return $group->getName(); |
| 433 | 433 | }) |
| 434 | 434 | ->toArray() |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | $user |
| 473 | 473 | ->getTags() |
| 474 | 474 | ->matching($criteria) |
| 475 | - ->map(static function (CmsTag $tag) { |
|
| 475 | + ->map(static function(CmsTag $tag) { |
|
| 476 | 476 | return $tag->getName(); |
| 477 | 477 | }) |
| 478 | 478 | ->toArray() |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | |
| 234 | 234 | $contracts = $this->em->createQuery('SELECT c FROM Doctrine\Tests\Models\Company\CompanyContract c ORDER BY c.id')->getScalarResult(); |
| 235 | 235 | |
| 236 | - $discrValues = array_map(static function ($a) { |
|
| 236 | + $discrValues = array_map(static function($a) { |
|
| 237 | 237 | return $a['c_discr']; |
| 238 | 238 | }, $contracts); |
| 239 | 239 | |
@@ -335,19 +335,19 @@ discard block |
||
| 335 | 335 | |
| 336 | 336 | $repos = $this->em->getRepository(CompanyContract::class); |
| 337 | 337 | $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]); |
| 338 | - self::assertCount(3, $contracts, 'There should be 3 entities related to ' . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyContract'"); |
|
| 338 | + self::assertCount(3, $contracts, 'There should be 3 entities related to '.$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyContract'"); |
|
| 339 | 339 | |
| 340 | 340 | $repos = $this->em->getRepository(CompanyFixContract::class); |
| 341 | 341 | $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]); |
| 342 | - self::assertCount(1, $contracts, 'There should be 1 entities related to ' . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFixContract'"); |
|
| 342 | + self::assertCount(1, $contracts, 'There should be 1 entities related to '.$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyFixContract'"); |
|
| 343 | 343 | |
| 344 | 344 | $repos = $this->em->getRepository(CompanyFlexContract::class); |
| 345 | 345 | $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]); |
| 346 | - self::assertCount(2, $contracts, 'There should be 2 entities related to ' . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFlexContract'"); |
|
| 346 | + self::assertCount(2, $contracts, 'There should be 2 entities related to '.$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyFlexContract'"); |
|
| 347 | 347 | |
| 348 | 348 | $repos = $this->em->getRepository(CompanyFlexUltraContract::class); |
| 349 | 349 | $contracts = $repos->findBy(['salesPerson' => $this->salesPerson->getId()]); |
| 350 | - self::assertCount(1, $contracts, 'There should be 1 entities related to ' . $this->salesPerson->getId() . " for 'Doctrine\Tests\Models\Company\CompanyFlexUltraContract'"); |
|
| 350 | + self::assertCount(1, $contracts, 'There should be 1 entities related to '.$this->salesPerson->getId()." for 'Doctrine\Tests\Models\Company\CompanyFlexUltraContract'"); |
|
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | /** |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | $user->username = 'gblanco'; |
| 187 | 187 | $user->status = 'developer'; |
| 188 | 188 | |
| 189 | - for ($i=0; $i<3; ++$i) { |
|
| 189 | + for ($i = 0; $i < 3; ++$i) { |
|
| 190 | 190 | $phone = new CmsPhonenumber(); |
| 191 | 191 | $phone->phonenumber = 100 + $i; |
| 192 | 192 | $user->addPhonenumber($phone); |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | $user->username = 'gblanco'; |
| 415 | 415 | $user->status = 'developer'; |
| 416 | 416 | |
| 417 | - for ($i=0; $i<3; ++$i) { |
|
| 417 | + for ($i = 0; $i < 3; ++$i) { |
|
| 418 | 418 | $phone = new CmsPhonenumber(); |
| 419 | 419 | $phone->phonenumber = 100 + $i; |
| 420 | 420 | $user->addPhonenumber($phone); |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | $user->username = 'gblanco'; |
| 455 | 455 | $user->status = 'developer'; |
| 456 | 456 | |
| 457 | - for ($i=0; $i<3; ++$i) { |
|
| 457 | + for ($i = 0; $i < 3; ++$i) { |
|
| 458 | 458 | $phone = new CmsPhonenumber(); |
| 459 | 459 | $phone->phonenumber = 100 + $i; |
| 460 | 460 | $user->addPhonenumber($phone); |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | $user->username = 'gblanco'; |
| 496 | 496 | $user->status = 'developer'; |
| 497 | 497 | |
| 498 | - for ($i=0; $i<3; ++$i) { |
|
| 498 | + for ($i = 0; $i < 3; ++$i) { |
|
| 499 | 499 | $phone = new CmsPhonenumber(); |
| 500 | 500 | $phone->phonenumber = 100 + $i; |
| 501 | 501 | $user->addPhonenumber($phone); |
@@ -642,7 +642,7 @@ discard block |
||
| 642 | 642 | |
| 643 | 643 | $user->setAddress($address); |
| 644 | 644 | |
| 645 | - $this->em->transactional(static function ($em) use ($user) { |
|
| 645 | + $this->em->transactional(static function($em) use ($user) { |
|
| 646 | 646 | $em->persist($user); |
| 647 | 647 | }); |
| 648 | 648 | $this->em->clear(); |
@@ -683,12 +683,12 @@ discard block |
||
| 683 | 683 | $this->em->persist($user); |
| 684 | 684 | $this->em->flush(); |
| 685 | 685 | |
| 686 | - self::assertEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = ' . $user->id)); |
|
| 686 | + self::assertEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = '.$user->id)); |
|
| 687 | 687 | |
| 688 | 688 | $address->user = null; |
| 689 | 689 | $this->em->flush(); |
| 690 | 690 | |
| 691 | - self::assertNotEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = ' . $user->id)); |
|
| 691 | + self::assertNotEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = '.$user->id)); |
|
| 692 | 692 | } |
| 693 | 693 | |
| 694 | 694 | /** |
@@ -882,7 +882,7 @@ discard block |
||
| 882 | 882 | |
| 883 | 883 | self::assertInstanceOf(GhostObjectInterface::class, $fetchedUser, 'It IS a proxy, ...'); |
| 884 | 884 | self::assertTrue($fetchedUser->isProxyInitialized(), '...but its initialized!'); |
| 885 | - self::assertEquals($qc+2, $this->getCurrentQueryCount()); |
|
| 885 | + self::assertEquals($qc + 2, $this->getCurrentQueryCount()); |
|
| 886 | 886 | } |
| 887 | 887 | |
| 888 | 888 | /** |
@@ -943,7 +943,7 @@ discard block |
||
| 943 | 943 | |
| 944 | 944 | $this->expectException(ORMInvalidArgumentException::class); |
| 945 | 945 | $this->expectExceptionMessage( |
| 946 | - 'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field ' . |
|
| 946 | + 'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field '. |
|
| 947 | 947 | '"Doctrine\Tests\Models\CMS\CmsUser#$address", got "Doctrine\Tests\Models\CMS\CmsUser" instead.' |
| 948 | 948 | ); |
| 949 | 949 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | { |
| 138 | 138 | $entity = $event->getEntity(); |
| 139 | 139 | |
| 140 | - if (! ($entity instanceof DDC2602Biography)) { |
|
| 140 | + if ( ! ($entity instanceof DDC2602Biography)) { |
|
| 141 | 141 | return; |
| 142 | 142 | } |
| 143 | 143 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $fieldSelection = new DDC2602FieldSelection(); |
| 159 | 159 | |
| 160 | 160 | $fieldSelection->field = $field; |
| 161 | - $fieldSelection->choiceList = $field->choiceList->filter(static function ($choice) use ($choiceList) { |
|
| 161 | + $fieldSelection->choiceList = $field->choiceList->filter(static function($choice) use ($choiceList) { |
|
| 162 | 162 | return in_array($choice->id, $choiceList, true); |
| 163 | 163 | }); |
| 164 | 164 | |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $this->em->clear(); |
| 52 | 52 | |
| 53 | 53 | $cart = $this->em |
| 54 | - ->createQuery('select ca, c from ' . DDC522Cart::class . ' ca join ca.customer c') |
|
| 54 | + ->createQuery('select ca, c from '.DDC522Cart::class.' ca join ca.customer c') |
|
| 55 | 55 | ->getSingleResult(); |
| 56 | 56 | |
| 57 | 57 | self::assertInstanceOf(DDC522Cart::class, $cart); |
@@ -19,8 +19,8 @@ discard block |
||
| 19 | 19 | try { |
| 20 | 20 | $this->schemaTool->createSchema( |
| 21 | 21 | [ |
| 22 | - $this->em->getClassMetadata(__NAMESPACE__ . '\DDC2084\MyEntity1'), |
|
| 23 | - $this->em->getClassMetadata(__NAMESPACE__ . '\DDC2084\MyEntity2'), |
|
| 22 | + $this->em->getClassMetadata(__NAMESPACE__.'\DDC2084\MyEntity1'), |
|
| 23 | + $this->em->getClassMetadata(__NAMESPACE__.'\DDC2084\MyEntity2'), |
|
| 24 | 24 | ] |
| 25 | 25 | ); |
| 26 | 26 | } catch (Exception $exc) { |
@@ -47,10 +47,10 @@ discard block |
||
| 47 | 47 | { |
| 48 | 48 | $e1 = $this->loadFixture(); |
| 49 | 49 | $e2 = $e1->getMyEntity2(); |
| 50 | - $e = $this->em->find(__NAMESPACE__ . '\DDC2084\MyEntity1', $e2); |
|
| 50 | + $e = $this->em->find(__NAMESPACE__.'\DDC2084\MyEntity1', $e2); |
|
| 51 | 51 | |
| 52 | - self::assertInstanceOf(__NAMESPACE__ . '\DDC2084\MyEntity1', $e); |
|
| 53 | - self::assertInstanceOf(__NAMESPACE__ . '\DDC2084\MyEntity2', $e->getMyEntity2()); |
|
| 52 | + self::assertInstanceOf(__NAMESPACE__.'\DDC2084\MyEntity1', $e); |
|
| 53 | + self::assertInstanceOf(__NAMESPACE__.'\DDC2084\MyEntity2', $e->getMyEntity2()); |
|
| 54 | 54 | self::assertEquals('Foo', $e->getMyEntity2()->getValue()); |
| 55 | 55 | } |
| 56 | 56 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public function testinvalidIdentifierBindingEntityException() : void |
| 62 | 62 | { |
| 63 | - $this->em->find(__NAMESPACE__ . '\DDC2084\MyEntity1', new DDC2084\MyEntity2('Foo')); |
|
| 63 | + $this->em->find(__NAMESPACE__.'\DDC2084\MyEntity1', new DDC2084\MyEntity2('Foo')); |
|
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function convertToDatabaseValue($value, AbstractPlatform $platform) |
| 82 | 82 | { |
| 83 | - if (! $value instanceof GH6141People) { |
|
| 83 | + if ( ! $value instanceof GH6141People) { |
|
| 84 | 84 | $value = GH6141People::get($value); |
| 85 | 85 | } |
| 86 | 86 | |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | */ |
| 122 | 122 | public static function get($value) |
| 123 | 123 | { |
| 124 | - if (! self::isValid($value)) { |
|
| 124 | + if ( ! self::isValid($value)) { |
|
| 125 | 125 | throw new InvalidArgumentException(); |
| 126 | 126 | } |
| 127 | 127 | |