Completed
Pull Request — develop (#6913)
by Filippo
116:44 queued 51:56
created
Doctrine/Tests/ORM/Functional/OneToOneSelfReferentialAssociationTest.php 2 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -161,8 +161,16 @@
 block discarded – undo
161 161
     private $other2;
162 162
 
163 163
     public function getId() {return $this->id;}
164
+
165
+    /**
166
+     * @param MultiSelfReference $other1
167
+     */
164 168
     public function setOther1($other1) {$this->other1 = $other1;}
165 169
     public function getOther1() {return $this->other1;}
170
+
171
+    /**
172
+     * @param MultiSelfReference $other2
173
+     */
166 174
     public function setOther2($other2) {$this->other2 = $other2;}
167 175
     public function getOther2() {return $this->other2;}
168 176
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 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;
6 6
 
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
      */
162 162
     private $other2;
163 163
 
164
-    public function getId() {return $this->id;}
165
-    public function setOther1($other1) {$this->other1 = $other1;}
166
-    public function getOther1() {return $this->other1;}
167
-    public function setOther2($other2) {$this->other2 = $other2;}
168
-    public function getOther2() {return $this->other2;}
164
+    public function getId() {return $this->id; }
165
+    public function setOther1($other1) {$this->other1 = $other1; }
166
+    public function getOther1() {return $this->other1; }
167
+    public function setOther2($other2) {$this->other2 = $other2; }
168
+    public function getOther2() {return $this->other2; }
169 169
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2692Test.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
     public function testIsListenerCalledOnlyOnceOnPreFlush()
33 33
     {
34 34
         $listener = $this->getMockBuilder(DDC2692Listener::class)
35
-                         ->setMethods(['preFlush'])
36
-                         ->getMock();
35
+                            ->setMethods(['preFlush'])
36
+                            ->getMock();
37 37
 
38 38
         $listener->expects($this->once())->method('preFlush');
39 39
 
Please login to merge, or discard this 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
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
                 $this->em->getClassMetadata(DDC2692Foo::class),
27 27
                 ]
28 28
             );
29
-        } catch(\Exception $e) {
29
+        } catch (\Exception $e) {
30 30
             return;
31 31
         }
32 32
         $this->em->clear();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2359Test.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
                                 ->getMock();
33 33
 
34 34
         $configuration = $this->getMockBuilder(Configuration::class)
35
-                              ->setMethods(['getMetadataDriverImpl'])
36
-                              ->getMock();
35
+                                ->setMethods(['getMetadataDriverImpl'])
36
+                                ->getMock();
37 37
 
38 38
         $connection = $this->createMock(Connection::class);
39 39
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3123Test.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
         $uow->scheduleExtraUpdate($user, ['name' => 'changed name']);
30 30
 
31 31
         $listener = $this->getMockBuilder(\stdClass::class)
32
-                         ->setMethods([Events::postFlush])
33
-                         ->getMock();
32
+                            ->setMethods([Events::postFlush])
33
+                            ->getMock();
34 34
 
35 35
         $listener
36 36
             ->expects($this->once())
Please login to merge, or discard this 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
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $listener
38 38
             ->expects($this->once())
39 39
             ->method(Events::postFlush)
40
-            ->will($this->returnCallback(function () use ($uow, $test) {
40
+            ->will($this->returnCallback(function() use ($uow, $test) {
41 41
                 $test->assertAttributeEmpty('extraUpdates', $uow, 'ExtraUpdates are reset before postFlush');
42 42
             }));
43 43
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -136,24 +136,24 @@
 block discarded – undo
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
 
Please login to merge, or discard this 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;
6 6
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
         $sqlExecMock->expects($this->once())
137 137
                     ->method('execute')
138
-                    ->will($this->returnValue( 10 ));
138
+                    ->will($this->returnValue(10));
139 139
 
140 140
         $parserResultMock = $this->getMockBuilder(ParserResult::class)
141 141
                                  ->setMethods(['getSqlExecutor'])
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -302,8 +302,8 @@
 block discarded – undo
302 302
     }
303 303
 
304 304
     /**
305
-    * @group DDC-1955
306
-    */
305
+     * @group DDC-1955
306
+     */
307 307
     public function testLifecycleCallbackEventArgs()
308 308
     {
309 309
         $e = new LifecycleCallbackEventArgEntity;
Please login to merge, or discard this patch.
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -396,8 +396,16 @@
 block discarded – undo
396 396
     private $name;
397 397
     public function getId() {return $this->id;}
398 398
     public function getValue() {return $this->value;}
399
+
400
+    /**
401
+     * @param string $value
402
+     */
399 403
     public function setValue($value) {$this->value = $value;}
400 404
     public function getName() {return $this->name;}
405
+
406
+    /**
407
+     * @param string $name
408
+     */
401 409
     public function setName($name) {$this->name = $name;}
402 410
     /** @ORM\PreUpdate */
403 411
     public function testCallback() {$this->value = 'Hello World';}
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 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;
6 6
 
@@ -394,13 +394,13 @@  discard block
 block discarded – undo
394 394
     private $value;
395 395
     /** @ORM\Column(type="string") */
396 396
     private $name;
397
-    public function getId() {return $this->id;}
398
-    public function getValue() {return $this->value;}
399
-    public function setValue($value) {$this->value = $value;}
400
-    public function getName() {return $this->name;}
401
-    public function setName($name) {$this->name = $name;}
397
+    public function getId() {return $this->id; }
398
+    public function getValue() {return $this->value; }
399
+    public function setValue($value) {$this->value = $value; }
400
+    public function getName() {return $this->name; }
401
+    public function setName($name) {$this->name = $name; }
402 402
     /** @ORM\PreUpdate */
403
-    public function testCallback() {$this->value = 'Hello World';}
403
+    public function testCallback() {$this->value = 'Hello World'; }
404 404
 }
405 405
 
406 406
 /**
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ResultCacheTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
  */
17 17
 class ResultCacheTest extends OrmFunctionalTestCase
18 18
 {
19
-   /**
19
+    /**
20 20
      * @var \ReflectionProperty
21 21
      */
22 22
     private $cacheDataReflection;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
         $query->setDQL($dql);
57 57
 
58 58
         foreach ($hints as $key => $value) {
59
-        	$query->setHint($key, $value);
59
+            $query->setHint($key, $value);
60 60
         }
61 61
 
62 62
         $parser = new Query\Parser($query);
Please login to merge, or discard this patch.
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -23,6 +23,9 @@  discard block
 block discarded – undo
23 23
         $this->em = $this->getTestEntityManager();
24 24
     }
25 25
 
26
+    /**
27
+     * @param string $dql
28
+     */
26 29
     public function assertValidDQL($dql, $debug = false)
27 30
     {
28 31
         try {
@@ -37,6 +40,9 @@  discard block
 block discarded – undo
37 40
         }
38 41
     }
39 42
 
43
+    /**
44
+     * @param string $dql
45
+     */
40 46
     public function assertInvalidDQL($dql, $debug = false)
41 47
     {
42 48
         try {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 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\Query;
6 6
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             $this->addToAssertionCount(1);
31 31
         } catch (QueryException $e) {
32 32
             if ($debug) {
33
-                echo $e->getTraceAsString() . PHP_EOL;
33
+                echo $e->getTraceAsString().PHP_EOL;
34 34
             }
35 35
 
36 36
             $this->fail($e->getMessage());
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
             $this->fail('No syntax errors were detected, when syntax errors were expected');
46 46
         } catch (QueryException $e) {
47 47
             if ($debug) {
48
-                echo $e->getMessage() . PHP_EOL;
49
-                echo $e->getTraceAsString() . PHP_EOL;
48
+                echo $e->getMessage().PHP_EOL;
49
+                echo $e->getTraceAsString().PHP_EOL;
50 50
             }
51 51
             $this->addToAssertionCount(1);
52 52
         }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             ['SELECT foo: FROM Doctrine\Tests\Models\CMS\CmsUser foo:'],
116 116
 
117 117
             /* Checks for invalid AbstractSchemaName */
118
-            ['SELECT u FROM UnknownClass u'],  // unknown
118
+            ['SELECT u FROM UnknownClass u'], // unknown
119 119
             ['SELECT u FROM Unknown\Class u'], // unknown with namespace
120 120
             ['SELECT u FROM \Unknown\Class u'], // unknown, leading backslash
121 121
             ['SELECT u FROM Unknown\\\\Class u'], // unknown, syntactically bogus (duplicate \\)
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
      */
589 589
     public function testDQLKeywordInJoinIsAllowed()
590 590
     {
591
-        self::assertValidDQL('SELECT u FROM ' . __NAMESPACE__ . '\DQLKeywordsModelUser u JOIN u.group g');
591
+        self::assertValidDQL('SELECT u FROM '.__NAMESPACE__.'\DQLKeywordsModelUser u JOIN u.group g');
592 592
     }
593 593
 
594 594
     /**
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
      */
597 597
     public function testDQLKeywordInConditionIsAllowed()
598 598
     {
599
-        self::assertValidDQL('SELECT g FROM ' . __NAMESPACE__ . '\DQLKeywordsModelGroup g WHERE g.from=0');
599
+        self::assertValidDQL('SELECT g FROM '.__NAMESPACE__.'\DQLKeywordsModelGroup g WHERE g.from=0');
600 600
     }
601 601
 
602 602
     /* The exception is currently thrown in the SQLWalker, not earlier.
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
      */
702 702
     public function testNewLiteralExpression()
703 703
     {
704
-        self::assertValidDQL("SELECT new " . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
704
+        self::assertValidDQL("SELECT new ".__NAMESPACE__."\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
705 705
     }
706 706
 
707 707
     /**
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
      */
710 710
     public function testNewLiteralWithSubselectExpression()
711 711
     {
712
-        self::assertValidDQL("SELECT new " . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
712
+        self::assertValidDQL("SELECT new ".__NAMESPACE__."\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
713 713
     }
714 714
 }
715 715
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Tools/SchemaValidatorTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@
 block discarded – undo
30 30
     public function testCmsModelSet(string $path)
31 31
     {
32 32
         $this->em->getConfiguration()
33
-                 ->getMetadataDriverImpl()
34
-                 ->addPaths([$path]);
33
+                    ->getMetadataDriverImpl()
34
+                    ->addPaths([$path]);
35 35
 
36 36
         self::assertEmpty($this->validator->validateMapping());
37 37
     }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 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\Tools;
6 6
 
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
     public function modelSetProvider(): array
43 43
     {
44 44
         return [
45
-            'cms'        => [__DIR__ . '/../../Models/CMS'],
46
-            'company'    => [__DIR__ . '/../../Models/Company'],
47
-            'ecommerce'  => [__DIR__ . '/../../Models/ECommerce'],
48
-            'forum'      => [__DIR__ . '/../../Models/Forum'],
49
-            'navigation' => [__DIR__ . '/../../Models/Navigation'],
50
-            'routing'    => [__DIR__ . '/../../Models/Routing'],
45
+            'cms'        => [__DIR__.'/../../Models/CMS'],
46
+            'company'    => [__DIR__.'/../../Models/Company'],
47
+            'ecommerce'  => [__DIR__.'/../../Models/ECommerce'],
48
+            'forum'      => [__DIR__.'/../../Models/Forum'],
49
+            'navigation' => [__DIR__.'/../../Models/Navigation'],
50
+            'routing'    => [__DIR__.'/../../Models/Routing'],
51 51
         ];
52 52
     }
53 53
 
Please login to merge, or discard this patch.