@@ -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\Ticket; |
| 6 | 6 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | $this->em->getClassMetadata(DDC735Review::class) |
| 20 | 20 | ] |
| 21 | 21 | ); |
| 22 | - } catch(\Exception $e) { |
|
| 22 | + } catch (\Exception $e) { |
|
| 23 | 23 | |
| 24 | 24 | } |
| 25 | 25 | } |
@@ -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\Ticket; |
| 6 | 6 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | $this->em->getClassMetadata(DDC522ForeignKeyTest::class) |
| 26 | 26 | ] |
| 27 | 27 | ); |
| 28 | - } catch(\Exception $e) { |
|
| 28 | + } catch (\Exception $e) { |
|
| 29 | 29 | } |
| 30 | 30 | } |
| 31 | 31 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $this->em->clear(); |
| 49 | 49 | |
| 50 | 50 | $cart = $this->em |
| 51 | - ->createQuery('select ca, c from ' . DDC522Cart::class . ' ca join ca.customer c') |
|
| 51 | + ->createQuery('select ca, c from '.DDC522Cart::class.' ca join ca.customer c') |
|
| 52 | 52 | ->getSingleResult() |
| 53 | 53 | ; |
| 54 | 54 | |
@@ -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\Ticket; |
| 6 | 6 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $this->em->persist($user); |
| 46 | 46 | $this->em->flush(); |
| 47 | 47 | |
| 48 | - $repository = $this->em->getRepository(__NAMESPACE__ . "\DDC2984User"); |
|
| 48 | + $repository = $this->em->getRepository(__NAMESPACE__."\DDC2984User"); |
|
| 49 | 49 | |
| 50 | 50 | $sameUser = $repository->find(new DDC2984DomainUserId('unique_id_within_a_vo')); |
| 51 | 51 | |
@@ -51,10 +51,10 @@ discard block |
||
| 51 | 51 | private function createQuery() |
| 52 | 52 | { |
| 53 | 53 | return $this->em->createQueryBuilder() |
| 54 | - ->select('car') |
|
| 55 | - ->from(GH2947Car::class, 'car') |
|
| 56 | - ->getQuery() |
|
| 57 | - ->useResultCache(true, 3600, 'foo-cache-id'); |
|
| 54 | + ->select('car') |
|
| 55 | + ->from(GH2947Car::class, 'car') |
|
| 56 | + ->getQuery() |
|
| 57 | + ->useResultCache(true, 3600, 'foo-cache-id'); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | private function createData() |
@@ -67,13 +67,13 @@ discard block |
||
| 67 | 67 | private function updateData() |
| 68 | 68 | { |
| 69 | 69 | $this->em->createQueryBuilder() |
| 70 | - ->update(GH2947Car::class, 'car') |
|
| 71 | - ->set('car.brand', ':newBrand') |
|
| 72 | - ->where('car.brand = :oldBrand') |
|
| 73 | - ->setParameter('newBrand', 'Dacia') |
|
| 74 | - ->setParameter('oldBrand', 'BMW') |
|
| 75 | - ->getQuery() |
|
| 76 | - ->execute(); |
|
| 70 | + ->update(GH2947Car::class, 'car') |
|
| 71 | + ->set('car.brand', ':newBrand') |
|
| 72 | + ->where('car.brand = :oldBrand') |
|
| 73 | + ->setParameter('newBrand', 'Dacia') |
|
| 74 | + ->setParameter('oldBrand', 'BMW') |
|
| 75 | + ->getQuery() |
|
| 76 | + ->execute(); |
|
| 77 | 77 | } |
| 78 | 78 | } |
| 79 | 79 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Functional\Ticket; |
| 6 | 6 | |
@@ -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\Ticket; |
| 6 | 6 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $sqlLogger = $this->em->getConnection()->getConfiguration()->getSQLLogger(); |
| 40 | 40 | $repository = $this->em->getRepository(DDC1595InheritedEntity1::class); |
| 41 | 41 | |
| 42 | - $entity1 = $repository->find($e1->id); |
|
| 42 | + $entity1 = $repository->find($e1->id); |
|
| 43 | 43 | |
| 44 | 44 | // DDC-1596 |
| 45 | 45 | self::assertSQLEquals( |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | $this->em->clear(); |
| 58 | 58 | |
| 59 | - $entity1 = $repository->find($e1->id); |
|
| 59 | + $entity1 = $repository->find($e1->id); |
|
| 60 | 60 | |
| 61 | 61 | $entity1->getEntities()->count(); |
| 62 | 62 | |
@@ -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\Ticket; |
| 6 | 6 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | { |
| 21 | 21 | parent::setUp(); |
| 22 | 22 | |
| 23 | - $testDir = sys_get_temp_dir() . '/DDC742Test' . uniqid(); |
|
| 23 | + $testDir = sys_get_temp_dir().'/DDC742Test'.uniqid(); |
|
| 24 | 24 | |
| 25 | 25 | mkdir($testDir); |
| 26 | 26 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $this->em->getClassMetadata(DDC742Comment::class) |
| 35 | 35 | ] |
| 36 | 36 | ); |
| 37 | - } catch(\Exception $e) { |
|
| 37 | + } catch (\Exception $e) { |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | // make sure classes will be deserialized from caches |
@@ -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\Ticket; |
| 6 | 6 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | if (Type::hasType('ddc3192_currency_code')) { |
| 22 | 22 | $this->fail( |
| 23 | - 'Type ddc3192_currency_code exists for testing DDC-3192 only, ' . |
|
| 23 | + 'Type ddc3192_currency_code exists for testing DDC-3192 only, '. |
|
| 24 | 24 | 'but it has already been registered for some reason' |
| 25 | 25 | ); |
| 26 | 26 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $this->em->close(); |
| 58 | 58 | |
| 59 | 59 | $query = $this->em->createQuery(); |
| 60 | - $query->setDQL('SELECT t FROM ' . DDC3192Transaction::class . ' t WHERE t.id = ?1'); |
|
| 60 | + $query->setDQL('SELECT t FROM '.DDC3192Transaction::class.' t WHERE t.id = ?1'); |
|
| 61 | 61 | $query->setParameter(1, $transaction->id); |
| 62 | 62 | |
| 63 | 63 | $resultByQuery = $query->getSingleResult(); |
@@ -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\Ticket; |
| 6 | 6 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | $this->em->getClassMetadata(DDC1209_3::class) |
| 21 | 21 | ] |
| 22 | 22 | ); |
| 23 | - } catch(\Exception $e) { |
|
| 23 | + } catch (\Exception $e) { |
|
| 24 | 24 | } |
| 25 | 25 | } |
| 26 | 26 | |
@@ -27,30 +27,30 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | public function testFailingCase() |
| 29 | 29 | { |
| 30 | - $parent = new DDC1383Entity(); |
|
| 31 | - $child = new DDC1383Entity(); |
|
| 30 | + $parent = new DDC1383Entity(); |
|
| 31 | + $child = new DDC1383Entity(); |
|
| 32 | 32 | |
| 33 | - $child->setReference($parent); |
|
| 33 | + $child->setReference($parent); |
|
| 34 | 34 | |
| 35 | - $this->em->persist($parent); |
|
| 36 | - $this->em->persist($child); |
|
| 35 | + $this->em->persist($parent); |
|
| 36 | + $this->em->persist($child); |
|
| 37 | 37 | |
| 38 | - $id = $child->getId(); |
|
| 38 | + $id = $child->getId(); |
|
| 39 | 39 | |
| 40 | - $this->em->flush(); |
|
| 41 | - $this->em->clear(); |
|
| 40 | + $this->em->flush(); |
|
| 41 | + $this->em->clear(); |
|
| 42 | 42 | |
| 43 | - // Try merging the parent entity |
|
| 44 | - $child = $this->em->merge($child); |
|
| 45 | - $parent = $child->getReference(); |
|
| 43 | + // Try merging the parent entity |
|
| 44 | + $child = $this->em->merge($child); |
|
| 45 | + $parent = $child->getReference(); |
|
| 46 | 46 | |
| 47 | - // Parent is not instance of the abstract class |
|
| 48 | - self::assertTrue($parent instanceof DDC1383AbstractEntity, |
|
| 49 | - "Entity class is " . get_class($parent) . ', "DDC1383AbstractEntity" was expected'); |
|
| 47 | + // Parent is not instance of the abstract class |
|
| 48 | + self::assertTrue($parent instanceof DDC1383AbstractEntity, |
|
| 49 | + "Entity class is " . get_class($parent) . ', "DDC1383AbstractEntity" was expected'); |
|
| 50 | 50 | |
| 51 | - // Parent is NOT instance of entity |
|
| 52 | - self::assertTrue($parent instanceof DDC1383Entity, |
|
| 53 | - "Entity class is " . get_class($parent) . ', "DDC1383Entity" was expected'); |
|
| 51 | + // Parent is NOT instance of entity |
|
| 52 | + self::assertTrue($parent instanceof DDC1383Entity, |
|
| 53 | + "Entity class is " . get_class($parent) . ', "DDC1383Entity" was expected'); |
|
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | |
@@ -62,22 +62,22 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | abstract class DDC1383AbstractEntity |
| 64 | 64 | { |
| 65 | - /** |
|
| 66 | - * @ORM\Id |
|
| 67 | - * @ORM\Column(type="integer") |
|
| 68 | - * @ORM\GeneratedValue |
|
| 69 | - */ |
|
| 70 | - protected $id; |
|
| 71 | - |
|
| 72 | - public function getId() |
|
| 73 | - { |
|
| 74 | - return $this->id; |
|
| 75 | - } |
|
| 76 | - |
|
| 77 | - public function setId($id) |
|
| 78 | - { |
|
| 79 | - $this->id = $id; |
|
| 80 | - } |
|
| 65 | + /** |
|
| 66 | + * @ORM\Id |
|
| 67 | + * @ORM\Column(type="integer") |
|
| 68 | + * @ORM\GeneratedValue |
|
| 69 | + */ |
|
| 70 | + protected $id; |
|
| 71 | + |
|
| 72 | + public function getId() |
|
| 73 | + { |
|
| 74 | + return $this->id; |
|
| 75 | + } |
|
| 76 | + |
|
| 77 | + public function setId($id) |
|
| 78 | + { |
|
| 79 | + $this->id = $id; |
|
| 80 | + } |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
@@ -85,18 +85,18 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | class DDC1383Entity extends DDC1383AbstractEntity |
| 87 | 87 | { |
| 88 | - /** |
|
| 89 | - * @ORM\ManyToOne(targetEntity="DDC1383AbstractEntity") |
|
| 90 | - */ |
|
| 91 | - protected $reference; |
|
| 92 | - |
|
| 93 | - public function getReference() |
|
| 94 | - { |
|
| 95 | - return $this->reference; |
|
| 96 | - } |
|
| 97 | - |
|
| 98 | - public function setReference(DDC1383AbstractEntity $reference) |
|
| 99 | - { |
|
| 100 | - $this->reference = $reference; |
|
| 101 | - } |
|
| 88 | + /** |
|
| 89 | + * @ORM\ManyToOne(targetEntity="DDC1383AbstractEntity") |
|
| 90 | + */ |
|
| 91 | + protected $reference; |
|
| 92 | + |
|
| 93 | + public function getReference() |
|
| 94 | + { |
|
| 95 | + return $this->reference; |
|
| 96 | + } |
|
| 97 | + |
|
| 98 | + public function setReference(DDC1383AbstractEntity $reference) |
|
| 99 | + { |
|
| 100 | + $this->reference = $reference; |
|
| 101 | + } |
|
| 102 | 102 | } |
@@ -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\Ticket; |
| 6 | 6 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | $this->em->getClassMetadata(DDC1383Entity::class), |
| 23 | 23 | ] |
| 24 | 24 | ); |
| 25 | - } catch(\Exception $ignored) {} |
|
| 25 | + } catch (\Exception $ignored) {} |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | public function testFailingCase() |
@@ -46,11 +46,11 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | // Parent is not instance of the abstract class |
| 48 | 48 | self::assertTrue($parent instanceof DDC1383AbstractEntity, |
| 49 | - "Entity class is " . get_class($parent) . ', "DDC1383AbstractEntity" was expected'); |
|
| 49 | + "Entity class is ".get_class($parent).', "DDC1383AbstractEntity" was expected'); |
|
| 50 | 50 | |
| 51 | 51 | // Parent is NOT instance of entity |
| 52 | 52 | self::assertTrue($parent instanceof DDC1383Entity, |
| 53 | - "Entity class is " . get_class($parent) . ', "DDC1383Entity" was expected'); |
|
| 53 | + "Entity class is ".get_class($parent).', "DDC1383Entity" was expected'); |
|
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | |