Completed
Pull Request — master (#7046)
by Gabriel
12:18
created
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC512Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $this->em->flush();
35 35
         $this->em->clear();
36 36
 
37
-        $q = $this->em->createQuery('select u,i from ' . __NAMESPACE__ . '\\DDC512Customer u left join u.item i');
37
+        $q = $this->em->createQuery('select u,i from '.__NAMESPACE__.'\\DDC512Customer u left join u.item i');
38 38
         $result = $q->getResult();
39 39
 
40 40
         self::assertCount(2, $result);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC881Test.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
         $this->em->clear();
82 82
 
83 83
         // fetch-join that foreign-key/primary-key entity association
84
-        $dql = 'SELECT c, p FROM ' . DDC881PhoneCall::class . ' c JOIN c.phonenumber p';
84
+        $dql = 'SELECT c, p FROM '.DDC881PhoneCall::class.' c JOIN c.phonenumber p';
85 85
         $calls = $this->em->createQuery($dql)->getResult();
86 86
 
87 87
         self::assertCount(2, $calls);
88 88
         self::assertNotInstanceOf(GhostObjectInterface::class, $calls[0]->getPhoneNumber());
89 89
         self::assertNotInstanceOf(GhostObjectInterface::class, $calls[1]->getPhoneNumber());
90 90
 
91
-        $dql = 'SELECT p, c FROM ' . DDC881PhoneNumber::class . ' p JOIN p.calls c';
91
+        $dql = 'SELECT p, c FROM '.DDC881PhoneNumber::class.' p JOIN p.calls c';
92 92
         $numbers = $this->em->createQuery($dql)->getResult();
93 93
 
94 94
         self::assertCount(2, $numbers);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2984Test.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
19 19
     {
20 20
         parent::setUp();
21 21
 
22
-        if (! Type::hasType('ddc2984_domain_user_id')) {
22
+        if ( ! Type::hasType('ddc2984_domain_user_id')) {
23 23
             Type::addType(
24 24
                 'ddc2984_domain_user_id',
25 25
                 DDC2984UserIdCustomDbalType::class
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
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
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
             return $value;
194 194
         }
195 195
 
196
-        if (! $value instanceof DDC2984DomainUserId) {
196
+        if ( ! $value instanceof DDC2984DomainUserId) {
197 197
             throw ConversionException::conversionFailed($value, $this->getName());
198 198
         }
199 199
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2214Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
         $related = $this
50 50
             ->em
51
-            ->createQuery('SELECT b FROM ' . __NAMESPACE__ . '\DDC2214Bar b WHERE b.id IN(:ids)')
51
+            ->createQuery('SELECT b FROM '.__NAMESPACE__.'\DDC2214Bar b WHERE b.id IN(:ids)')
52 52
             ->setParameter('ids', [$bar])
53 53
             ->getResult();
54 54
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2602Test.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     {
135 135
         $entity = $event->getEntity();
136 136
 
137
-        if (! ($entity instanceof DDC2602Biography)) {
137
+        if ( ! ($entity instanceof DDC2602Biography)) {
138 138
             return;
139 139
         }
140 140
 
@@ -152,10 +152,10 @@  discard block
 block discarded – undo
152 152
         foreach ($content as $selection) {
153 153
             $field      = $result[$selection->field];
154 154
             $choiceList = $selection->choiceList;
155
-            $fieldSelection     = new DDC2602FieldSelection();
155
+            $fieldSelection = new DDC2602FieldSelection();
156 156
 
157 157
             $fieldSelection->field      = $field;
158
-            $fieldSelection->choiceList = $field->choiceList->filter(function ($choice) use ($choiceList) {
158
+            $fieldSelection->choiceList = $field->choiceList->filter(function($choice) use ($choiceList) {
159 159
                 return in_array($choice->id, $choiceList, true);
160 160
             });
161 161
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC618Test.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     public function testIndexByJoin()
75 75
     {
76 76
         $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A ' .
77
-               'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
77
+                'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
78 78
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
79 79
 
80 80
         self::assertCount(3, $result[0]->books); // Alice, Joe doesn't appear because he has no books.
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
     public function testIndexByToOneJoinSilentlyIgnored()
99 99
     {
100 100
         $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' .
101
-               'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
101
+                'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
102 102
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
103 103
 
104 104
         self::assertInstanceOf(DDC618Book::class, $result[0]);
105 105
         self::assertInstanceOf(DDC618Author::class, $result[0]->author);
106 106
 
107 107
         $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' .
108
-               'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
108
+                'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
109 109
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
110 110
 
111 111
         self::assertEquals('Alice', $result[0]['author']['name']);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     public function testCombineIndexBy()
118 118
     {
119 119
         $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id ' .
120
-               'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
120
+                'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
121 121
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
122 122
 
123 123
         self::assertArrayHasKey(11, $result); // Alice
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -73,23 +73,23 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function testIndexByJoin()
75 75
     {
76
-        $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A ' .
76
+        $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A '.
77 77
                'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
78 78
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
79 79
 
80 80
         self::assertCount(3, $result[0]->books); // Alice, Joe doesn't appear because he has no books.
81 81
         self::assertEquals('Alice', $result[0]->name);
82
-        self::assertTrue( isset($result[0]->books['In Wonderland'] ), 'Indexing by title should have books by title.');
83
-        self::assertTrue( isset($result[0]->books['Reloaded'] ), 'Indexing by title should have books by title.');
84
-        self::assertTrue( isset($result[0]->books['Test'] ), 'Indexing by title should have books by title.');
82
+        self::assertTrue(isset($result[0]->books['In Wonderland']), 'Indexing by title should have books by title.');
83
+        self::assertTrue(isset($result[0]->books['Reloaded']), 'Indexing by title should have books by title.');
84
+        self::assertTrue(isset($result[0]->books['Test']), 'Indexing by title should have books by title.');
85 85
 
86 86
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
87 87
 
88 88
         self::assertCount(3, $result[0]['books']); // Alice, Joe doesn't appear because he has no books.
89 89
         self::assertEquals('Alice', $result[0]['name']);
90
-        self::assertTrue( isset($result[0]['books']['In Wonderland'] ), 'Indexing by title should have books by title.');
91
-        self::assertTrue( isset($result[0]['books']['Reloaded'] ), 'Indexing by title should have books by title.');
92
-        self::assertTrue( isset($result[0]['books']['Test'] ), 'Indexing by title should have books by title.');
90
+        self::assertTrue(isset($result[0]['books']['In Wonderland']), 'Indexing by title should have books by title.');
91
+        self::assertTrue(isset($result[0]['books']['Reloaded']), 'Indexing by title should have books by title.');
92
+        self::assertTrue(isset($result[0]['books']['Test']), 'Indexing by title should have books by title.');
93 93
     }
94 94
 
95 95
     /**
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public function testIndexByToOneJoinSilentlyIgnored()
99 99
     {
100
-        $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' .
100
+        $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '.
101 101
                'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
102 102
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
103 103
 
104 104
         self::assertInstanceOf(DDC618Book::class, $result[0]);
105 105
         self::assertInstanceOf(DDC618Author::class, $result[0]->author);
106 106
 
107
-        $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' .
107
+        $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '.
108 108
                'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC';
109 109
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
110 110
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function testCombineIndexBy()
118 118
     {
119
-        $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id ' .
119
+        $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id '.
120 120
                'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
121 121
         $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
122 122
 
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
 
125 125
         self::assertCount(3, $result[11]->books); // Alice, Joe doesn't appear because he has no books.
126 126
         self::assertEquals('Alice', $result[11]->name);
127
-        self::assertTrue( isset($result[11]->books['In Wonderland'] ), 'Indexing by title should have books by title.');
128
-        self::assertTrue( isset($result[11]->books['Reloaded'] ), 'Indexing by title should have books by title.');
129
-        self::assertTrue( isset($result[11]->books['Test'] ), 'Indexing by title should have books by title.');
127
+        self::assertTrue(isset($result[11]->books['In Wonderland']), 'Indexing by title should have books by title.');
128
+        self::assertTrue(isset($result[11]->books['Reloaded']), 'Indexing by title should have books by title.');
129
+        self::assertTrue(isset($result[11]->books['Test']), 'Indexing by title should have books by title.');
130 130
     }
131 131
 }
132 132
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3330Test.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
         $this->em->clear();
36 36
 
37 37
         $query = $this->em->createQuery(
38
-            'SELECT b, h' .
39
-            ' FROM Doctrine\Tests\ORM\Functional\Ticket\DDC3330_Building b' .
40
-            ' LEFT JOIN b.halls h' .
38
+            'SELECT b, h'.
39
+            ' FROM Doctrine\Tests\ORM\Functional\Ticket\DDC3330_Building b'.
40
+            ' LEFT JOIN b.halls h'.
41 41
             ' ORDER BY b.id ASC, h.name DESC'
42 42
         )
43 43
         ->setMaxResults(3);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
         for ($i = 0; $i < 10; $i++) {
58 58
             $hall = new DDC3330_Hall();
59
-            $hall->name = 'HALL-' . $i;
59
+            $hall->name = 'HALL-'.$i;
60 60
             $building->addHall($hall);
61 61
         }
62 62
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC719Test.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function addGroup(Group $child)
96 96
     {
97
-        if (! $this->children->contains($child)) {
97
+        if ( ! $this->children->contains($child)) {
98 98
             $this->children->add($child);
99 99
             $child->addGroup($this);
100 100
         }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function addChannel(Channel $child)
109 109
     {
110
-        if (! $this->channels->contains($child)) {
110
+        if ( ! $this->channels->contains($child)) {
111 111
             $this->channels->add($child);
112 112
         }
113 113
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1514Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $this->em->flush();
57 57
         $this->em->clear();
58 58
 
59
-        $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";
59
+        $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 60
         $results = $this->em->createQuery($dql)->getResult();
61 61
 
62 62
         self::assertEquals($a1->id, $results[0]->id);
Please login to merge, or discard this patch.