Completed
Push — master ( ba3223...b47a39 )
by Luís
17s
created
lib/Doctrine/ORM/Tools/ToolsException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 {
32 32
     public static function schemaToolFailure(string $sql, Throwable $e) : self
33 33
     {
34
-        return new self("Schema-Tool failed with Error '" . $e->getMessage() . "' while executing DDL: " . $sql, "0", $e);
34
+        return new self("Schema-Tool failed with Error '".$e->getMessage()."' while executing DDL: ".$sql, "0", $e);
35 35
     }
36 36
 
37 37
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/ResultSetMappingBuilder.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     {
204 204
         switch ($mode) {
205 205
             case self::COLUMN_RENAMING_INCREMENT:
206
-                return $columnName . $this->sqlCounter++;
206
+                return $columnName.$this->sqlCounter++;
207 207
 
208 208
             case self::COLUMN_RENAMING_CUSTOM:
209 209
                 return $customRenameColumns[$columnName] ?? $columnName;
@@ -325,19 +325,19 @@  discard block
 block discarded – undo
325 325
         $counter        = 0;
326 326
         $resultMapping  = $class->getSqlResultSetMapping($resultSetMappingName);
327 327
         $rootShortName  = $class->reflClass->getShortName();
328
-        $rootAlias      = strtolower($rootShortName[0]) . $counter;
328
+        $rootAlias      = strtolower($rootShortName[0]).$counter;
329 329
 
330 330
 
331 331
         if (isset($resultMapping['entities'])) {
332 332
             foreach ($resultMapping['entities'] as $key => $entityMapping) {
333
-                $classMetadata  = $this->em->getClassMetadata($entityMapping['entityClass']);
333
+                $classMetadata = $this->em->getClassMetadata($entityMapping['entityClass']);
334 334
 
335 335
                 if ($class->reflClass->name == $classMetadata->reflClass->name) {
336 336
                     $this->addEntityResult($classMetadata->name, $rootAlias);
337 337
                     $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $rootAlias);
338 338
                 } else {
339 339
                     $shortName      = $classMetadata->reflClass->getShortName();
340
-                    $joinAlias      = strtolower($shortName[0]) . ++ $counter;
340
+                    $joinAlias      = strtolower($shortName[0]).++ $counter;
341 341
                     $associations   = $class->getAssociationsByTargetClass($classMetadata->name);
342 342
 
343 343
                     $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $joinAlias);
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
             $this->addMetaResult($alias, $discriminatorColumn, $discriminatorColumn, false, $discriminatorType);
386 386
         }
387 387
 
388
-        if (isset($entityMapping['fields']) && !empty($entityMapping['fields'])) {
388
+        if (isset($entityMapping['fields']) && ! empty($entityMapping['fields'])) {
389 389
             foreach ($entityMapping['fields'] as $field) {
390 390
                 $fieldName = $field['name'];
391 391
                 $relation  = null;
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
                 $sql .= ", ";
447 447
             }
448 448
 
449
-            $sql .= $tableAlias . ".";
449
+            $sql .= $tableAlias.".";
450 450
 
451 451
             if (isset($this->fieldMappings[$columnName])) {
452 452
                 $class = $this->em->getClassMetadata($this->declaringClasses[$columnName]);
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
                 $sql .= $this->discriminatorColumns[$dqlAlias];
458 458
             }
459 459
 
460
-            $sql .= " AS " . $columnName;
460
+            $sql .= " AS ".$columnName;
461 461
         }
462 462
 
463 463
         return $sql;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Query/ParameterTypeInfererTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,16 +14,16 @@
 block discarded – undo
14 14
     public function providerParameterTypeInferer()
15 15
     {
16 16
         $data = [
17
-            [1,                 Type::INTEGER],
18
-            ["bar",             PDO::PARAM_STR],
19
-            ["1",               PDO::PARAM_STR],
20
-            [new \DateTime,     Type::DATETIME],
17
+            [1, Type::INTEGER],
18
+            ["bar", PDO::PARAM_STR],
19
+            ["1", PDO::PARAM_STR],
20
+            [new \DateTime, Type::DATETIME],
21 21
             [new \DateInterval('P1D'), Type::DATEINTERVAL],
22
-            [[2],          Connection::PARAM_INT_ARRAY],
23
-            [["foo"],      Connection::PARAM_STR_ARRAY],
24
-            [["1","2"],    Connection::PARAM_STR_ARRAY],
25
-            [[],           Connection::PARAM_STR_ARRAY],
26
-            [true,              Type::BOOLEAN],
22
+            [[2], Connection::PARAM_INT_ARRAY],
23
+            [["foo"], Connection::PARAM_STR_ARRAY],
24
+            [["1", "2"], Connection::PARAM_STR_ARRAY],
25
+            [[], Connection::PARAM_STR_ARRAY],
26
+            [true, Type::BOOLEAN],
27 27
         ];
28 28
 
29 29
         if (PHP_VERSION_ID >= 50500) {
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/OneToOneInverseSideLoadAfterDqlQueryTest.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;
6 6
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
                 $this->_em->getClassMetadata(OwningSide::class),
21 21
                 $this->_em->getClassMetadata(InverseSide::class),
22 22
             ]);
23
-        } catch(ToolsException $e) {
23
+        } catch (ToolsException $e) {
24 24
             // ignored
25 25
         }
26 26
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/OneToOneInverseSideLoad/InverseSide.php 1 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\Models\OneToOneInverseSideLoad;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/OneToOneInverseSideLoad/OwningSide.php 1 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\Models\OneToOneInverseSideLoad;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Tools/Console/Command/InfoCommandTest.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
         $em            = $this->createMock(EntityManagerInterface::class);
61 61
 
62 62
         $mappingDriver->method('getAllClassNames')
63
-                      ->willReturn([]);
63
+                        ->willReturn([]);
64 64
 
65 65
         $configuration->method('getMetadataDriverImpl')
66
-                      ->willReturn($mappingDriver);
66
+                        ->willReturn($mappingDriver);
67 67
 
68 68
         $em->method('getConfiguration')
69
-           ->willReturn($configuration);
69
+            ->willReturn($configuration);
70 70
 
71 71
         $application = new Application();
72 72
         $application->setHelperSet(new HelperSet(['em' => new EntityManagerHelper($em)]));
@@ -95,17 +95,17 @@  discard block
 block discarded – undo
95 95
         $em            = $this->createMock(EntityManagerInterface::class);
96 96
 
97 97
         $mappingDriver->method('getAllClassNames')
98
-                      ->willReturn(['InvalidEntity']);
98
+                        ->willReturn(['InvalidEntity']);
99 99
 
100 100
         $configuration->method('getMetadataDriverImpl')
101
-                      ->willReturn($mappingDriver);
101
+                        ->willReturn($mappingDriver);
102 102
 
103 103
         $em->method('getConfiguration')
104
-           ->willReturn($configuration);
104
+            ->willReturn($configuration);
105 105
 
106 106
         $em->method('getClassMetadata')
107
-           ->with('InvalidEntity')
108
-           ->willThrowException(new MappingException('exception message'));
107
+            ->with('InvalidEntity')
108
+            ->willThrowException(new MappingException('exception message'));
109 109
 
110 110
         $application = new Application();
111 111
         $application->setHelperSet(new HelperSet(['em' => new EntityManagerHelper($em)]));
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Tools/Console/Command/RunDqlCommandTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             $this->tester->execute(
63 63
                 [
64 64
                     'command' => $this->command->getName(),
65
-                    'dql'     => 'SELECT e FROM ' . DateTimeModel::class . ' e',
65
+                    'dql'     => 'SELECT e FROM '.DateTimeModel::class.' e',
66 66
                 ]
67 67
             )
68 68
         );
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             $this->tester->execute(
81 81
                 [
82 82
                     'command'    => $this->command->getName(),
83
-                    'dql'        => 'SELECT e FROM ' . DateTimeModel::class . ' e',
83
+                    'dql'        => 'SELECT e FROM '.DateTimeModel::class.' e',
84 84
                     '--show-sql' => 'true',
85 85
                 ]
86 86
             )
Please login to merge, or discard this patch.
Tests/ORM/Tools/Console/Command/GenerateRepositoriesCommandTest.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -143,16 +143,16 @@
 block discarded – undo
143 143
         $em              = $this->createMock(EntityManagerInterface::class);
144 144
 
145 145
         $configuration->method('getDefaultRepositoryClassName')
146
-                      ->willReturn('fooRepository');
146
+                        ->willReturn('fooRepository');
147 147
 
148 148
         $metadataFactory->method('getAllMetadata')
149 149
                         ->willReturn([]);
150 150
 
151 151
         $em->method('getMetadataFactory')
152
-           ->willReturn($metadataFactory);
152
+            ->willReturn($metadataFactory);
153 153
 
154 154
         $em->method('getConfiguration')
155
-           ->willReturn($configuration);
155
+            ->willReturn($configuration);
156 156
 
157 157
         $application = new Application();
158 158
         $application->setHelperSet(new HelperSet(['em' => new EntityManagerHelper($em)]));
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
     {
31 31
         parent::setUp();
32 32
 
33
-        $this->path = \sys_get_temp_dir() . DIRECTORY_SEPARATOR . uniqid('doctrine_');
33
+        $this->path = \sys_get_temp_dir().DIRECTORY_SEPARATOR.uniqid('doctrine_');
34 34
 
35 35
         \mkdir($this->path);
36 36
 
37 37
         $metadataDriver = $this->_em->getConfiguration()->getMetadataDriverImpl();
38
-        $metadataDriver->addPaths([__DIR__ . '/../../../../Models/DDC3231/']);
38
+        $metadataDriver->addPaths([__DIR__.'/../../../../Models/DDC3231/']);
39 39
 
40 40
         $this->application = new Application();
41 41
         $this->application->setHelperSet(new HelperSet(['em' => new EntityManagerHelper($this->_em)]));
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
         $this->generateRepositories('DDC3231User1');
74 74
 
75 75
         $cname = 'Doctrine\Tests\Models\DDC3231\DDC3231User1Repository';
76
-        $fname = str_replace('\\', DIRECTORY_SEPARATOR, $cname) . '.php';
76
+        $fname = str_replace('\\', DIRECTORY_SEPARATOR, $cname).'.php';
77 77
 
78
-        self::assertFileExists($this->path . DIRECTORY_SEPARATOR . $fname);
79
-        self::assertFileExists($this->path . DIRECTORY_SEPARATOR . 'DDC3231User1NoNamespaceRepository.php');
78
+        self::assertFileExists($this->path.DIRECTORY_SEPARATOR.$fname);
79
+        self::assertFileExists($this->path.DIRECTORY_SEPARATOR.'DDC3231User1NoNamespaceRepository.php');
80 80
 
81
-        require $this->path . DIRECTORY_SEPARATOR . $fname;
82
-        require $this->path . DIRECTORY_SEPARATOR . 'DDC3231User1NoNamespaceRepository.php';
81
+        require $this->path.DIRECTORY_SEPARATOR.$fname;
82
+        require $this->path.DIRECTORY_SEPARATOR.'DDC3231User1NoNamespaceRepository.php';
83 83
 
84 84
         self::assertTrue(class_exists($cname));
85 85
         self::assertTrue(class_exists('DDC3231User1NoNamespaceRepository'));
@@ -96,13 +96,13 @@  discard block
 block discarded – undo
96 96
         $this->generateRepositories('DDC3231User2', DDC3231EntityRepository::class);
97 97
 
98 98
         $cname = 'Doctrine\Tests\Models\DDC3231\DDC3231User2Repository';
99
-        $fname = str_replace('\\', DIRECTORY_SEPARATOR, $cname) . '.php';
99
+        $fname = str_replace('\\', DIRECTORY_SEPARATOR, $cname).'.php';
100 100
 
101
-        self::assertFileExists($this->path . DIRECTORY_SEPARATOR . $fname);
102
-        self::assertFileExists($this->path . DIRECTORY_SEPARATOR . 'DDC3231User2NoNamespaceRepository.php');
101
+        self::assertFileExists($this->path.DIRECTORY_SEPARATOR.$fname);
102
+        self::assertFileExists($this->path.DIRECTORY_SEPARATOR.'DDC3231User2NoNamespaceRepository.php');
103 103
 
104
-        require $this->path . DIRECTORY_SEPARATOR . $fname;
105
-        require $this->path . DIRECTORY_SEPARATOR . 'DDC3231User2NoNamespaceRepository.php';
104
+        require $this->path.DIRECTORY_SEPARATOR.$fname;
105
+        require $this->path.DIRECTORY_SEPARATOR.'DDC3231User2NoNamespaceRepository.php';
106 106
 
107 107
         self::assertTrue(class_exists($cname));
108 108
         self::assertTrue(class_exists('DDC3231User2NoNamespaceRepository'));
Please login to merge, or discard this patch.