Failed Conditions
Pull Request — 2.7 (#7901)
by Luís
06:54
created
tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
         $this->_generator->writeEntityClass($metadata, $this->_tmpDir);
540 540
 
541 541
         $filename = $this->_tmpDir . DIRECTORY_SEPARATOR
542
-                  . $this->_namespace . DIRECTORY_SEPARATOR . 'DDC1784Entity.php';
542
+                    . $this->_namespace . DIRECTORY_SEPARATOR . 'DDC1784Entity.php';
543 543
 
544 544
         $this->assertFileExists($filename);
545 545
         require_once $filename;
@@ -600,9 +600,9 @@  discard block
 block discarded – undo
600 600
 
601 601
     }
602 602
 
603
-     /**
604
-     * @group DDC-2172
605
-     */
603
+        /**
604
+         * @group DDC-2172
605
+         */
606 606
     public function testGetInheritanceTypeString()
607 607
     {
608 608
         $reflection = new \ReflectionClass('\Doctrine\ORM\Mapping\ClassMetadataInfo');
@@ -630,8 +630,8 @@  discard block
 block discarded – undo
630 630
     }
631 631
 
632 632
     /**
633
-    * @group DDC-2172
634
-    */
633
+     * @group DDC-2172
634
+     */
635 635
     public function testGetChangeTrackingPolicyString()
636 636
     {
637 637
         $reflection = new \ReflectionClass('\Doctrine\ORM\Mapping\ClassMetadata');
Please login to merge, or discard this patch.
Spacing   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $this->_namespace = uniqid("doctrine_");
31 31
         $this->_tmpDir = \sys_get_temp_dir();
32
-        \mkdir($this->_tmpDir . \DIRECTORY_SEPARATOR . $this->_namespace);
32
+        \mkdir($this->_tmpDir.\DIRECTORY_SEPARATOR.$this->_namespace);
33 33
         $this->_generator = new EntityGenerator();
34 34
         $this->_generator->setAnnotationPrefix("");
35 35
         $this->_generator->setGenerateAnnotations(true);
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
 
42 42
     public function tearDown()
43 43
     {
44
-        $ri = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->_tmpDir . '/' . $this->_namespace));
44
+        $ri = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->_tmpDir.'/'.$this->_namespace));
45 45
         foreach ($ri AS $file) {
46 46
             /* @var $file \SplFileInfo */
47 47
             if ($file->isFile()) {
48 48
                 \unlink($file->getPathname());
49 49
             }
50 50
         }
51
-        rmdir($this->_tmpDir . '/' . $this->_namespace);
51
+        rmdir($this->_tmpDir.'/'.$this->_namespace);
52 52
     }
53 53
 
54 54
     /** @after */
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public function generateBookEntityFixture(array $embeddedClasses = [])
66 66
     {
67
-        $metadata = new ClassMetadataInfo($this->_namespace . '\EntityGeneratorBook');
67
+        $metadata = new ClassMetadataInfo($this->_namespace.'\EntityGeneratorBook');
68 68
         $metadata->namespace = $this->_namespace;
69
-        $metadata->customRepositoryClassName = $this->_namespace  . '\EntityGeneratorBookRepository';
69
+        $metadata->customRepositoryClassName = $this->_namespace.'\EntityGeneratorBookRepository';
70 70
 
71 71
         $metadata->table['name'] = 'book';
72 72
         $metadata->table['uniqueConstraints']['name_uniq'] = ['columns' => ['name']];
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
     private function generateEntityTypeFixture(array $field)
110 110
     {
111
-        $metadata = new ClassMetadataInfo($this->_namespace . '\EntityType');
111
+        $metadata = new ClassMetadataInfo($this->_namespace.'\EntityType');
112 112
         $metadata->namespace = $this->_namespace;
113 113
 
114 114
         $metadata->table['name'] = 'entity_type';
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     private function generateIsbnEmbeddableFixture(array $embeddedClasses = [], $columnPrefix = null)
131 131
     {
132
-        $metadata = new ClassMetadataInfo($this->_namespace . '\EntityGeneratorIsbn');
132
+        $metadata = new ClassMetadataInfo($this->_namespace.'\EntityGeneratorIsbn');
133 133
         $metadata->namespace = $this->_namespace;
134 134
         $metadata->isEmbeddedClass = true;
135 135
         $metadata->mapField(['fieldName' => 'prefix', 'type' => 'integer']);
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     private function generateTestEmbeddableFixture()
154 154
     {
155
-        $metadata = new ClassMetadataInfo($this->_namespace . '\EntityGeneratorTestEmbeddable');
155
+        $metadata = new ClassMetadataInfo($this->_namespace.'\EntityGeneratorTestEmbeddable');
156 156
         $metadata->namespace = $this->_namespace;
157 157
         $metadata->isEmbeddedClass = true;
158 158
         $metadata->mapField(['fieldName' => 'field1', 'type' => 'integer']);
@@ -195,11 +195,11 @@  discard block
 block discarded – undo
195 195
         foreach ($embeddableMetadata->embeddedClasses as $property => $embeddableClass) {
196 196
             $classMetadata->mapEmbedded(
197 197
                 [
198
-                'fieldName' => $fieldName . '.' . $property,
198
+                'fieldName' => $fieldName.'.'.$property,
199 199
                 'class' => $embeddableClass['class'],
200 200
                 'columnPrefix' => $embeddableClass['columnPrefix'],
201 201
                 'declaredField' => $embeddableClass['declaredField']
202
-                        ? $fieldName . '.' . $embeddableClass['declaredField']
202
+                        ? $fieldName.'.'.$embeddableClass['declaredField']
203 203
                         : $fieldName,
204 204
                 'originalField' => $embeddableClass['originalField'] ?: $property,
205 205
                 ]
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
     private function loadEntityClass(ClassMetadataInfo $metadata)
214 214
     {
215 215
         $className = basename(str_replace('\\', '/', $metadata->name));
216
-        $path = $this->_tmpDir . '/' . $this->_namespace . '/' . $className . '.php';
216
+        $path = $this->_tmpDir.'/'.$this->_namespace.'/'.$className.'.php';
217 217
 
218 218
         $this->assertFileExists($path);
219 219
 
@@ -273,19 +273,19 @@  discard block
 block discarded – undo
273 273
 
274 274
         $book = $this->newInstance($metadata);
275 275
         $this->assertTrue(class_exists($metadata->name), "Class does not exist.");
276
-        $this->assertTrue(method_exists($metadata->namespace . '\EntityGeneratorBook', '__construct'), "EntityGeneratorBook::__construct() missing.");
277
-        $this->assertTrue(method_exists($metadata->namespace . '\EntityGeneratorBook', 'getId'), "EntityGeneratorBook::getId() missing.");
278
-        $this->assertTrue(method_exists($metadata->namespace . '\EntityGeneratorBook', 'setName'), "EntityGeneratorBook::setName() missing.");
279
-        $this->assertTrue(method_exists($metadata->namespace . '\EntityGeneratorBook', 'getName'), "EntityGeneratorBook::getName() missing.");
280
-        $this->assertTrue(method_exists($metadata->namespace . '\EntityGeneratorBook', 'setStatus'), "EntityGeneratorBook::setStatus() missing.");
281
-        $this->assertTrue(method_exists($metadata->namespace . '\EntityGeneratorBook', 'getStatus'), "EntityGeneratorBook::getStatus() missing.");
282
-        $this->assertTrue(method_exists($metadata->namespace . '\EntityGeneratorBook', 'setAuthor'), "EntityGeneratorBook::setAuthor() missing.");
283
-        $this->assertTrue(method_exists($metadata->namespace . '\EntityGeneratorBook', 'getAuthor'), "EntityGeneratorBook::getAuthor() missing.");
284
-        $this->assertTrue(method_exists($metadata->namespace . '\EntityGeneratorBook', 'getComments'), "EntityGeneratorBook::getComments() missing.");
285
-        $this->assertTrue(method_exists($metadata->namespace . '\EntityGeneratorBook', 'addComment'), "EntityGeneratorBook::addComment() missing.");
286
-        $this->assertTrue(method_exists($metadata->namespace . '\EntityGeneratorBook', 'removeComment'), "EntityGeneratorBook::removeComment() missing.");
287
-        $this->assertTrue(method_exists($metadata->namespace . '\EntityGeneratorBook', 'setIsbn'), "EntityGeneratorBook::setIsbn() missing.");
288
-        $this->assertTrue(method_exists($metadata->namespace . '\EntityGeneratorBook', 'getIsbn'), "EntityGeneratorBook::getIsbn() missing.");
276
+        $this->assertTrue(method_exists($metadata->namespace.'\EntityGeneratorBook', '__construct'), "EntityGeneratorBook::__construct() missing.");
277
+        $this->assertTrue(method_exists($metadata->namespace.'\EntityGeneratorBook', 'getId'), "EntityGeneratorBook::getId() missing.");
278
+        $this->assertTrue(method_exists($metadata->namespace.'\EntityGeneratorBook', 'setName'), "EntityGeneratorBook::setName() missing.");
279
+        $this->assertTrue(method_exists($metadata->namespace.'\EntityGeneratorBook', 'getName'), "EntityGeneratorBook::getName() missing.");
280
+        $this->assertTrue(method_exists($metadata->namespace.'\EntityGeneratorBook', 'setStatus'), "EntityGeneratorBook::setStatus() missing.");
281
+        $this->assertTrue(method_exists($metadata->namespace.'\EntityGeneratorBook', 'getStatus'), "EntityGeneratorBook::getStatus() missing.");
282
+        $this->assertTrue(method_exists($metadata->namespace.'\EntityGeneratorBook', 'setAuthor'), "EntityGeneratorBook::setAuthor() missing.");
283
+        $this->assertTrue(method_exists($metadata->namespace.'\EntityGeneratorBook', 'getAuthor'), "EntityGeneratorBook::getAuthor() missing.");
284
+        $this->assertTrue(method_exists($metadata->namespace.'\EntityGeneratorBook', 'getComments'), "EntityGeneratorBook::getComments() missing.");
285
+        $this->assertTrue(method_exists($metadata->namespace.'\EntityGeneratorBook', 'addComment'), "EntityGeneratorBook::addComment() missing.");
286
+        $this->assertTrue(method_exists($metadata->namespace.'\EntityGeneratorBook', 'removeComment'), "EntityGeneratorBook::removeComment() missing.");
287
+        $this->assertTrue(method_exists($metadata->namespace.'\EntityGeneratorBook', 'setIsbn'), "EntityGeneratorBook::setIsbn() missing.");
288
+        $this->assertTrue(method_exists($metadata->namespace.'\EntityGeneratorBook', 'getIsbn'), "EntityGeneratorBook::getIsbn() missing.");
289 289
 
290 290
         $reflClass = new \ReflectionClass($metadata->name);
291 291
 
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 
339 339
         $this->_generator->writeEntityClass($metadata, $this->_tmpDir);
340 340
 
341
-        $this->assertFileExists($this->_tmpDir . "/" . $this->_namespace . "/EntityGeneratorBook.php~");
341
+        $this->assertFileExists($this->_tmpDir."/".$this->_namespace."/EntityGeneratorBook.php~");
342 342
 
343 343
         $book = $this->newInstance($metadata);
344 344
         $reflClass = new \ReflectionClass($metadata->name);
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
         // Should not throw a PHP fatal error
384 384
         $this->_generator->writeEntityClass($metadata, $this->_tmpDir);
385 385
 
386
-        $this->assertFileExists($this->_tmpDir . "/" . $this->_namespace . "/EntityGeneratorBook.php~");
386
+        $this->assertFileExists($this->_tmpDir."/".$this->_namespace."/EntityGeneratorBook.php~");
387 387
 
388 388
         $this->newInstance($metadata);
389 389
         $reflClass = new \ReflectionClass($metadata->name);
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
         $this->assertPhpDocReturnType('\Doctrine\Tests\ORM\Tools\EntityGeneratorAuthor|null', new \ReflectionMethod($book, 'getAuthor'));
419 419
         $this->assertPhpDocParamType('\Doctrine\Tests\ORM\Tools\EntityGeneratorAuthor|null', new \ReflectionMethod($book, 'setAuthor'));
420 420
 
421
-        $expectedClassName = '\\' . $embeddedMetadata->name;
421
+        $expectedClassName = '\\'.$embeddedMetadata->name;
422 422
         $this->assertPhpDocVarType($expectedClassName, new \ReflectionProperty($book, 'isbn'));
423 423
         $this->assertPhpDocReturnType($expectedClassName, new \ReflectionMethod($book, 'getIsbn'));
424 424
         $this->assertPhpDocParamType($expectedClassName, new \ReflectionMethod($book, 'setIsbn'));
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
      */
529 529
     public function testMappedSuperclassAnnotationGeneration()
530 530
     {
531
-        $metadata                     = new ClassMetadataInfo($this->_namespace . '\EntityGeneratorBook');
531
+        $metadata                     = new ClassMetadataInfo($this->_namespace.'\EntityGeneratorBook');
532 532
         $metadata->namespace          = $this->_namespace;
533 533
         $metadata->isMappedSuperclass = true;
534 534
 
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
      */
567 567
     public function testGenerateEntityWithSequenceGenerator()
568 568
     {
569
-        $metadata               = new ClassMetadataInfo($this->_namespace . '\DDC1784Entity');
569
+        $metadata               = new ClassMetadataInfo($this->_namespace.'\DDC1784Entity');
570 570
         $metadata->namespace    = $this->_namespace;
571 571
         $metadata->mapField(['fieldName' => 'id', 'type' => 'integer', 'id' => true]);
572 572
         $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE);
@@ -579,8 +579,8 @@  discard block
 block discarded – undo
579 579
         );
580 580
         $this->_generator->writeEntityClass($metadata, $this->_tmpDir);
581 581
 
582
-        $filename = $this->_tmpDir . DIRECTORY_SEPARATOR
583
-                  . $this->_namespace . DIRECTORY_SEPARATOR . 'DDC1784Entity.php';
582
+        $filename = $this->_tmpDir.DIRECTORY_SEPARATOR
583
+                  . $this->_namespace.DIRECTORY_SEPARATOR.'DDC1784Entity.php';
584 584
 
585 585
         $this->assertFileExists($filename);
586 586
         require_once $filename;
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
      */
601 601
     public function testGenerateEntityWithMultipleInverseJoinColumns()
602 602
     {
603
-        $metadata               = new ClassMetadataInfo($this->_namespace . '\DDC2079Entity');
603
+        $metadata               = new ClassMetadataInfo($this->_namespace.'\DDC2079Entity');
604 604
         $metadata->namespace    = $this->_namespace;
605 605
         $metadata->mapField(['fieldName' => 'id', 'type' => 'integer', 'id' => true]);
606 606
         $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE);
@@ -611,20 +611,20 @@  discard block
 block discarded – undo
611 611
             'joinTable'     => [
612 612
                 'name'                  => 'unidade_centro_custo',
613 613
                 'joinColumns'           => [
614
-                    ['name' => 'idorcamento',      'referencedColumnName' => 'idorcamento'],
615
-                    ['name' => 'idunidade',        'referencedColumnName' => 'idunidade']
614
+                    ['name' => 'idorcamento', 'referencedColumnName' => 'idorcamento'],
615
+                    ['name' => 'idunidade', 'referencedColumnName' => 'idunidade']
616 616
                 ],
617 617
                 'inverseJoinColumns'    => [
618
-                    ['name' => 'idcentrocusto',    'referencedColumnName' => 'idcentrocusto'],
619
-                    ['name' => 'idpais',           'referencedColumnName' => 'idpais'],
618
+                    ['name' => 'idcentrocusto', 'referencedColumnName' => 'idcentrocusto'],
619
+                    ['name' => 'idpais', 'referencedColumnName' => 'idpais'],
620 620
                 ],
621 621
             ],
622 622
             ]
623 623
         );
624 624
         $this->_generator->writeEntityClass($metadata, $this->_tmpDir);
625 625
 
626
-        $filename = $this->_tmpDir . DIRECTORY_SEPARATOR
627
-            . $this->_namespace . DIRECTORY_SEPARATOR . 'DDC2079Entity.php';
626
+        $filename = $this->_tmpDir.DIRECTORY_SEPARATOR
627
+            . $this->_namespace.DIRECTORY_SEPARATOR.'DDC2079Entity.php';
628 628
 
629 629
         $this->assertFileExists($filename);
630 630
         require_once $filename;
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
         $method->setAccessible(true);
655 655
 
656 656
         foreach ($constants as $name => $value) {
657
-            if( ! preg_match($pattern, $name)) {
657
+            if ( ! preg_match($pattern, $name)) {
658 658
                 continue;
659 659
             }
660 660
 
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
         $method->setAccessible(true);
684 684
 
685 685
         foreach ($constants as $name => $value) {
686
-            if( ! preg_match($pattern, $name)) {
686
+            if ( ! preg_match($pattern, $name)) {
687 687
                 continue;
688 688
             }
689 689
 
@@ -712,7 +712,7 @@  discard block
 block discarded – undo
712 712
         $method->setAccessible(true);
713 713
 
714 714
         foreach ($constants as $name => $value) {
715
-            if( ! preg_match($pattern, $name)) {
715
+            if ( ! preg_match($pattern, $name)) {
716 716
                 continue;
717 717
             }
718 718
 
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
     public function testEntityTypeAlias(array $field)
737 737
     {
738 738
         $metadata   = $this->generateEntityTypeFixture($field);
739
-        $path       = $this->_tmpDir . '/'. $this->_namespace . '/EntityType.php';
739
+        $path       = $this->_tmpDir.'/'.$this->_namespace.'/EntityType.php';
740 740
 
741 741
         $this->assertFileExists($path);
742 742
         require_once $path;
@@ -747,8 +747,8 @@  discard block
 block discarded – undo
747 747
         $type   = $field['phpType'];
748 748
         $name   = $field['fieldName'];
749 749
         $value  = $field['value'];
750
-        $getter = "get" . ucfirst($name);
751
-        $setter = "set" . ucfirst($name);
750
+        $getter = "get".ucfirst($name);
751
+        $setter = "set".ucfirst($name);
752 752
 
753 753
         $this->assertPhpDocVarType($type, $reflClass->getProperty($name));
754 754
         $this->assertPhpDocParamType($type, $reflClass->getMethod($setter));
@@ -769,13 +769,13 @@  discard block
 block discarded – undo
769 769
 
770 770
         $user = new DDC2372User();
771 771
         $metadata = $cmf->getMetadataFor(get_class($user));
772
-        $metadata->name = $this->_namespace . "\DDC2372User";
772
+        $metadata->name = $this->_namespace."\DDC2372User";
773 773
         $metadata->namespace = $this->_namespace;
774 774
 
775 775
         $this->_generator->writeEntityClass($metadata, $this->_tmpDir);
776 776
 
777
-        $this->assertFileExists($this->_tmpDir . "/" . $this->_namespace . "/DDC2372User.php");
778
-        require $this->_tmpDir . "/" . $this->_namespace . "/DDC2372User.php";
777
+        $this->assertFileExists($this->_tmpDir."/".$this->_namespace."/DDC2372User.php");
778
+        require $this->_tmpDir."/".$this->_namespace."/DDC2372User.php";
779 779
 
780 780
         $reflClass = new \ReflectionClass($metadata->name);
781 781
 
@@ -795,13 +795,13 @@  discard block
 block discarded – undo
795 795
 
796 796
         $user = new DDC2372Admin();
797 797
         $metadata = $cmf->getMetadataFor(get_class($user));
798
-        $metadata->name = $this->_namespace . "\DDC2372Admin";
798
+        $metadata->name = $this->_namespace."\DDC2372Admin";
799 799
         $metadata->namespace = $this->_namespace;
800 800
 
801 801
         $this->_generator->writeEntityClass($metadata, $this->_tmpDir);
802 802
 
803
-        $this->assertFileExists($this->_tmpDir . "/" . $this->_namespace . "/DDC2372Admin.php");
804
-        require $this->_tmpDir . "/" . $this->_namespace . "/DDC2372Admin.php";
803
+        $this->assertFileExists($this->_tmpDir."/".$this->_namespace."/DDC2372Admin.php");
804
+        require $this->_tmpDir."/".$this->_namespace."/DDC2372Admin.php";
805 805
 
806 806
         $reflClass = new \ReflectionClass($metadata->name);
807 807
 
@@ -821,20 +821,20 @@  discard block
 block discarded – undo
821 821
         $cmf->setEntityManager($em);
822 822
 
823 823
         $ns     = $this->_namespace;
824
-        $nsdir  = $this->_tmpDir . '/' . $ns;
824
+        $nsdir  = $this->_tmpDir.'/'.$ns;
825 825
 
826 826
         $content = str_replace(
827 827
             'namespace Doctrine\Tests\Models\DDC1590',
828
-            'namespace ' . $ns,
829
-            file_get_contents(__DIR__ . '/../../Models/DDC1590/DDC1590User.php')
828
+            'namespace '.$ns,
829
+            file_get_contents(__DIR__.'/../../Models/DDC1590/DDC1590User.php')
830 830
         );
831 831
 
832
-        $fname = $nsdir . "/DDC1590User.php";
832
+        $fname = $nsdir."/DDC1590User.php";
833 833
         file_put_contents($fname, $content);
834 834
         require $fname;
835 835
 
836 836
 
837
-        $metadata = $cmf->getMetadataFor($ns . '\DDC1590User');
837
+        $metadata = $cmf->getMetadataFor($ns.'\DDC1590User');
838 838
         $this->_generator->writeEntityClass($metadata, $this->_tmpDir);
839 839
 
840 840
         // class DDC1590User extends DDC1590Entity { ... }
@@ -842,13 +842,13 @@  discard block
 block discarded – undo
842 842
 
843 843
         // class _DDC1590User extends DDC1590Entity { ... }
844 844
         $source2    = str_replace('class DDC1590User', 'class _DDC1590User', $source);
845
-        $fname2     = $nsdir . "/_DDC1590User.php";
845
+        $fname2     = $nsdir."/_DDC1590User.php";
846 846
         file_put_contents($fname2, $source2);
847 847
         require $fname2;
848 848
 
849 849
         // class __DDC1590User { ... }
850 850
         $source3    = str_replace('class DDC1590User extends DDC1590Entity', 'class __DDC1590User', $source);
851
-        $fname3     = $nsdir . "/__DDC1590User.php";
851
+        $fname3     = $nsdir."/__DDC1590User.php";
852 852
         file_put_contents($fname3, $source3);
853 853
         require $fname3;
854 854
 
@@ -1002,7 +1002,7 @@  discard block
 block discarded – undo
1002 1002
         $this->loadEntityClass($metadata);
1003 1003
 
1004 1004
         $className = basename(str_replace('\\', '/', $metadata->name));
1005
-        $path = $this->_tmpDir . '/' . $this->_namespace . '/' . $className . '.php';
1005
+        $path = $this->_tmpDir.'/'.$this->_namespace.'/'.$className.'.php';
1006 1006
         $classTest = file_get_contents($path);
1007 1007
 
1008 1008
         $this->_generator->setRegenerateEntityIfExists(true);
@@ -1011,7 +1011,7 @@  discard block
 block discarded – undo
1011 1011
         $this->_generator->writeEntityClass($metadata, $this->_tmpDir);
1012 1012
         $classNew = file_get_contents($path);
1013 1013
 
1014
-        $this->assertSame($classTest,$classNew);
1014
+        $this->assertSame($classTest, $classNew);
1015 1015
     }
1016 1016
 
1017 1017
     /**
@@ -1198,14 +1198,14 @@  discard block
 block discarded – undo
1198 1198
      */
1199 1199
     public function testOptionsAreGeneratedProperly(string $expectedAnnotation, array $fieldConfiguration) : void
1200 1200
     {
1201
-        $metadata               = new ClassMetadataInfo($this->_namespace . '\GH6703Options');
1201
+        $metadata               = new ClassMetadataInfo($this->_namespace.'\GH6703Options');
1202 1202
         $metadata->namespace    = $this->_namespace;
1203 1203
         $metadata->mapField(['fieldName' => 'id', 'type' => 'integer', 'id' => true]);
1204 1204
         $metadata->mapField(['fieldName' => 'test'] + $fieldConfiguration);
1205 1205
         $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE);
1206 1206
         $this->_generator->writeEntityClass($metadata, $this->_tmpDir);
1207 1207
 
1208
-        $filename = $this->_tmpDir . DIRECTORY_SEPARATOR . $this->_namespace . DIRECTORY_SEPARATOR . 'GH6703Options.php';
1208
+        $filename = $this->_tmpDir.DIRECTORY_SEPARATOR.$this->_namespace.DIRECTORY_SEPARATOR.'GH6703Options.php';
1209 1209
 
1210 1210
         self::assertFileExists($filename);
1211 1211
         require_once $filename;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Tools/Pagination/LimitSubqueryWalkerTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
     /**
73 73
      * Arbitrary Join
74 74
      */
75
-     public function testLimitSubqueryWithArbitraryJoin()
75
+        public function testLimitSubqueryWithArbitraryJoin()
76 76
     {
77 77
         $dql        = 'SELECT p, c FROM Doctrine\Tests\ORM\Tools\Pagination\MyBlogPost p JOIN Doctrine\Tests\ORM\Tools\Pagination\Category c WITH p.category = c';
78 78
         $query      = $this->entityManager->createQuery($dql);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Tools/Pagination/LimitSubqueryOutputWalkerTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
         $this->entityManager->getConnection()->setDatabasePlatform(new PostgreSqlPlatform);
85 85
 
86 86
         $query = $this->entityManager->createQuery(
87
-           'SELECT u, g, COUNT(g.id) AS hidden g_quantity FROM Doctrine\Tests\ORM\Tools\Pagination\User u JOIN u.groups g ORDER BY g_quantity, u.id DESC'
87
+            'SELECT u, g, COUNT(g.id) AS hidden g_quantity FROM Doctrine\Tests\ORM\Tools\Pagination\User u JOIN u.groups g ORDER BY g_quantity, u.id DESC'
88 88
         );
89 89
         $limitQuery = clone $query;
90 90
         $limitQuery->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, LimitSubqueryOutputWalker::class);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Cache/DefaultQueryCacheTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             $result[] = $city;
135 135
 
136 136
             $cityClass->setFieldValue($city, 'id', $i);
137
-            $stateClass->setFieldValue($state, 'id', $i*2);
137
+            $stateClass->setFieldValue($state, 'id', $i * 2);
138 138
 
139 139
             $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $city->getName()]);
140 140
             $uow->registerManaged($city, ['id' => $city->getId()], ['name' => $city->getName(), 'state' => $state]);
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
             $result[] = $city;
180 180
 
181 181
             $cityClass->setFieldValue($city, 'id', $i);
182
-            $stateClass->setFieldValue($state, 'id', $i*2);
183
-            $countryClass->setFieldValue($country, 'id', $i*3);
182
+            $stateClass->setFieldValue($state, 'id', $i * 2);
183
+            $countryClass->setFieldValue($country, 'id', $i * 3);
184 184
 
185 185
             $uow->registerManaged($country, ['id' => $country->getId()], ['name' => $country->getName()]);
186 186
             $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $state->getName(), 'country' => $country]
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
         $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $city->getName()]);
365 365
         $uow->registerManaged($city, ['id' => $city->getId()], ['name' => $city->getName(), 'state' => $state]);
366 366
 
367
-        $this->region->addReturn('put', true);  // put root entity
367
+        $this->region->addReturn('put', true); // put root entity
368 368
         $this->region->addReturn('put', false); // association fails
369 369
 
370 370
         $this->assertFalse($this->queryCache->put($key, $rsm, $result));
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
         $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $state->getName(), 'cities' => $state->getCities()]
400 400
         );
401 401
 
402
-        $this->region->addReturn('put', true);  // put root entity
402
+        $this->region->addReturn('put', true); // put root entity
403 403
         $this->region->addReturn('put', false); // collection association fails
404 404
 
405 405
         $this->assertFalse($this->queryCache->put($key, $rsm, $result));
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
         $attractions = $reflection->invoke($this->queryCache, $rsm, 'a', $bavaria);
565 565
 
566 566
         $this->assertCount(2, $cities);
567
-        $this->assertCount(2,  $attractions);
567
+        $this->assertCount(2, $attractions);
568 568
 
569 569
         $this->assertInstanceOf(Collection::class, $cities);
570 570
         $this->assertInstanceOf(Collection::class, $attractions[0]);
Please login to merge, or discard this patch.
Tests/ORM/Cache/Persister/Collection/AbstractCollectionPersisterTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,8 @@
 block discarded – undo
83 83
         $this->em                   = $this->_getTestEntityManager();
84 84
         $this->region               = $this->createRegion();
85 85
         $this->collectionPersister  = $this->getMockBuilder(CollectionPersister::class)
86
-                                           ->setMethods($this->collectionPersisterMockMethods)
87
-                                           ->getMock();
86
+                                            ->setMethods($this->collectionPersisterMockMethods)
87
+                                            ->getMock();
88 88
     }
89 89
 
90 90
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             ->with($this->equalTo($collection), $this->equalTo(1), $this->equalTo(2))
192 192
             ->will($this->returnValue($slice));
193 193
 
194
-        $this->assertEquals($slice, $persister->slice($collection, 1 , 2));
194
+        $this->assertEquals($slice, $persister->slice($collection, 1, 2));
195 195
     }
196 196
 
197 197
     public function testInvokeContains()
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
             ->with($this->equalTo($collection), $this->equalTo($element))
209 209
             ->will($this->returnValue(false));
210 210
 
211
-        $this->assertFalse($persister->contains($collection,$element));
211
+        $this->assertFalse($persister->contains($collection, $element));
212 212
     }
213 213
 
214 214
     public function testInvokeContainsKey()
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Cache/Persister/Entity/AbstractEntityPersisterTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
             ->with($this->equalTo([]), $this->equalTo('Foo'), $this->equalTo(1), $this->equalTo(2))
381 381
             ->will($this->returnValue([$entity]));
382 382
 
383
-        $this->assertEquals([$entity], $persister->getManyToManyCollection([], 'Foo', 1 ,2));
383
+        $this->assertEquals([$entity], $persister->getManyToManyCollection([], 'Foo', 1, 2));
384 384
     }
385 385
 
386 386
     public function testInvokeGetOneToManyCollection()
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
             ->with($this->equalTo([]), $this->equalTo('Foo'), $this->equalTo(1), $this->equalTo(2))
394 394
             ->will($this->returnValue([$entity]));
395 395
 
396
-        $this->assertEquals([$entity], $persister->getOneToManyCollection([], 'Foo', 1 ,2));
396
+        $this->assertEquals([$entity], $persister->getOneToManyCollection([], 'Foo', 1, 2));
397 397
     }
398 398
 
399 399
     public function testInvokeLoadManyToManyCollection()
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Cache/FileLockRegionTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
     protected function createRegion()
54 54
     {
55
-        $this->directory = sys_get_temp_dir() . '/doctrine_lock_'. uniqid();
55
+        $this->directory = sys_get_temp_dir().'/doctrine_lock_'.uniqid();
56 56
 
57 57
         $region = new DefaultRegion('concurren_region_test', $this->cache);
58 58
 
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
 
101 101
         file_put_contents($file, 'foo');
102 102
         $this->assertFileExists($file);
103
-        $this->assertEquals('foo' , file_get_contents($file));
103
+        $this->assertEquals('foo', file_get_contents($file));
104 104
 
105 105
         $this->assertNull($this->region->lock($key));
106
-        $this->assertEquals('foo' , file_get_contents($file));
106
+        $this->assertEquals('foo', file_get_contents($file));
107 107
         $this->assertFileExists($file);
108 108
 
109 109
         // should be not available
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
         // change the lock
129 129
         file_put_contents($file, 'foo');
130 130
         $this->assertFileExists($file);
131
-        $this->assertEquals('foo' , file_get_contents($file));
131
+        $this->assertEquals('foo', file_get_contents($file));
132 132
 
133 133
         //try to unlock
134 134
         $this->assertFalse($this->region->unlock($key, $lock));
135
-        $this->assertEquals('foo' , file_get_contents($file));
135
+        $this->assertEquals('foo', file_get_contents($file));
136 136
         $this->assertFileExists($file);
137 137
 
138 138
         // should be not available
@@ -153,14 +153,14 @@  discard block
 block discarded – undo
153 153
         // create lock
154 154
         file_put_contents($file, 'foo');
155 155
         $this->assertFileExists($file);
156
-        $this->assertEquals('foo' , file_get_contents($file));
156
+        $this->assertEquals('foo', file_get_contents($file));
157 157
 
158 158
         $this->assertFalse($this->region->contains($key));
159 159
         $this->assertFalse($this->region->put($key, $entry));
160 160
         $this->assertFalse($this->region->contains($key));
161 161
 
162 162
         $this->assertFileExists($file);
163
-        $this->assertEquals('foo' , file_get_contents($file));
163
+        $this->assertEquals('foo', file_get_contents($file));
164 164
     }
165 165
 
166 166
     public function testLockedEvict()
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
         $reflectionDirectory->setAccessible(true);
256 256
         $reflectionDirectory->setValue($region, str_repeat('a', 10000));
257 257
 
258
-        set_error_handler(function () {}, E_WARNING);
258
+        set_error_handler(function() {}, E_WARNING);
259 259
         $this->assertTrue($region->evictAll());
260 260
         restore_error_handler();
261 261
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Cache/DefaultEntityHydratorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         $entity->setId(1);
82 82
         $uow->registerManaged($entity, $key->identifier, $data);
83 83
 
84
-        $cache  = $this->structure->buildCacheEntry($metadata, $key, $entity);
84
+        $cache = $this->structure->buildCacheEntry($metadata, $key, $entity);
85 85
 
86 86
         $this->assertInstanceOf(CacheEntry::class, $cache);
87 87
         $this->assertInstanceOf(EntityCacheEntry::class, $cache);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/QuoteStrategyTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
         $cm->mapField(['fieldName' => 'name', 'columnName' => '`name`']);
69 69
         $cm->mapField(['fieldName' => 'id', 'columnName' => 'id']);
70 70
 
71
-        $this->assertEquals('id' ,$this->strategy->getColumnName('id', $cm, $this->platform));
72
-        $this->assertEquals('"name"' ,$this->strategy->getColumnName('name', $cm, $this->platform));
71
+        $this->assertEquals('id', $this->strategy->getColumnName('id', $cm, $this->platform));
72
+        $this->assertEquals('"name"', $this->strategy->getColumnName('name', $cm, $this->platform));
73 73
     }
74 74
 
75 75
     public function testGetTableName()
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         );
190 190
 
191 191
         $joinColumn = $cm->associationMappings['article']['joinColumns'][0];
192
-        $this->assertEquals('"article"',$this->strategy->getJoinColumnName($joinColumn, $cm, $this->platform));
192
+        $this->assertEquals('"article"', $this->strategy->getJoinColumnName($joinColumn, $cm, $this->platform));
193 193
     }
194 194
 
195 195
     public function testReferencedJoinColumnName()
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         );
211 211
 
212 212
         $joinColumn = $cm->associationMappings['article']['joinColumns'][0];
213
-        $this->assertEquals('"id"',$this->strategy->getReferencedJoinColumnName($joinColumn, $cm, $this->platform));
213
+        $this->assertEquals('"id"', $this->strategy->getReferencedJoinColumnName($joinColumn, $cm, $this->platform));
214 214
     }
215 215
 }
216 216
 
Please login to merge, or discard this patch.