Completed
Pull Request — master (#7902)
by
unknown
63:54
created
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1655Test.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
                 ]
31 31
             );
32 32
         } catch (Exception $e) {
33
-            $this->fail($e->getMessage() . PHP_EOL . $e->getTraceAsString());
33
+            $this->fail($e->getMessage().PHP_EOL.$e->getTraceAsString());
34 34
         }
35 35
     }
36 36
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $conn = static::$sharedConn;
40 40
 
41 41
         // In case test is skipped, tearDown is called, but no setup may have run
42
-        if (! $conn) {
42
+        if ( ! $conn) {
43 43
             return;
44 44
         }
45 45
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         $baz = $this->em->find(\get_class($baz), $baz->id);
83 83
         foreach ($baz->foos as $foo) {
84
-            self::assertEquals(1, $foo->loaded, 'should have loaded callback counter incremented for ' . \get_class($foo));
84
+            self::assertEquals(1, $foo->loaded, 'should have loaded callback counter incremented for '.\get_class($foo));
85 85
         }
86 86
     }
87 87
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         self::assertEquals(1, $bar->loaded);
106 106
         self::assertEquals(1, $bar->subLoaded);
107 107
 
108
-        $dql = 'SELECT b FROM ' . __NAMESPACE__ . '\DDC1655Bar b WHERE b.id = ?1';
108
+        $dql = 'SELECT b FROM '.__NAMESPACE__.'\DDC1655Bar b WHERE b.id = ?1';
109 109
         $bar = $this->em->createQuery($dql)->setParameter(1, $bar->id)->getSingleResult();
110 110
 
111 111
         self::assertEquals(1, $bar->loaded);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2825Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
         $platform = $this->em->getConnection()->getDatabasePlatform();
30 30
 
31
-        if (! $platform->supportsSchemas() && ! $platform->canEmulateSchemas()) {
31
+        if ( ! $platform->supportsSchemas() && ! $platform->canEmulateSchemas()) {
32 32
             $this->markTestSkipped('This test is only useful for databases that support schemas or can emulate them.');
33 33
         }
34 34
     }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
         // Checks sequence name validity
66 66
         self::assertEquals(
67
-            \str_replace('"', '', $fullTableName) . '_' . $property->getColumnName() . '_seq',
67
+            \str_replace('"', '', $fullTableName).'_'.$property->getColumnName().'_seq',
68 68
             $idSequenceName
69 69
         );
70 70
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaTool/PostgreSqlSchemaToolTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         parent::setUp();
22 22
 
23 23
         if ($this->em->getConnection()->getDatabasePlatform()->getName() !== 'postgresql') {
24
-            $this->markTestSkipped('The ' . self::class . ' requires the use of postgresql.');
24
+            $this->markTestSkipped('The '.self::class.' requires the use of postgresql.');
25 25
         }
26 26
     }
27 27
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $tool->createSchema($classes);
133 133
 
134 134
         $sql = $tool->getUpdateSchemaSql($classes);
135
-        $sql = \array_filter($sql, static function ($sql) {
135
+        $sql = \array_filter($sql, static function($sql) {
136 136
             return \strpos($sql, 'DROP SEQUENCE stonewood.') === 0;
137 137
         });
138 138
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaTool/DBAL483Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
         $updateSql = $this->schemaTool->getUpdateSchemaSql([$class]);
34 34
 
35
-        $updateSql = \array_filter($updateSql, static function ($sql) {
35
+        $updateSql = \array_filter($updateSql, static function($sql) {
36 36
             return \strpos($sql, 'DBAL483') !== false;
37 37
         });
38 38
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaTool/DDC214Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,10 +89,10 @@
 block discarded – undo
89 89
         $schemaDiff = $comparator->compare($fromSchema, $toSchema);
90 90
 
91 91
         $sql = $schemaDiff->toSql($this->em->getConnection()->getDatabasePlatform());
92
-        $sql = \array_filter($sql, static function ($sql) {
92
+        $sql = \array_filter($sql, static function($sql) {
93 93
             return \strpos($sql, 'DROP') === false;
94 94
         });
95 95
 
96
-        self::assertCount(0, $sql, 'SQL: ' . \implode(PHP_EOL, $sql));
96
+        self::assertCount(0, $sql, 'SQL: '.\implode(PHP_EOL, $sql));
97 97
     }
98 98
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 {
31 31
     protected function loadDriver()
32 32
     {
33
-        return new XmlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'xml');
33
+        return new XmlDriver(__DIR__.DIRECTORY_SEPARATOR.'xml');
34 34
     }
35 35
 
36 36
     public function testClassTableInheritanceDiscriminatorMap() : void
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      */
168 168
     public function testValidateXmlSchema($xmlMappingFile) : void
169 169
     {
170
-        $xsdSchemaFile = __DIR__ . '/../../../../../doctrine-mapping.xsd';
170
+        $xsdSchemaFile = __DIR__.'/../../../../../doctrine-mapping.xsd';
171 171
         $dom           = new DOMDocument();
172 172
 
173 173
         $dom->load($xmlMappingFile);
@@ -177,14 +177,14 @@  discard block
 block discarded – undo
177 177
 
178 178
     public static function dataValidSchema()
179 179
     {
180
-        $list    = \glob(__DIR__ . '/xml/*.xml');
180
+        $list    = \glob(__DIR__.'/xml/*.xml');
181 181
         $invalid = ['Doctrine.Tests.Models.DDC889.DDC889Class.dcm'];
182 182
 
183
-        $list = \array_filter($list, static function ($item) use ($invalid) {
183
+        $list = \array_filter($list, static function($item) use ($invalid) {
184 184
             return ! \in_array(\pathinfo($item, PATHINFO_FILENAME), $invalid, true);
185 185
         });
186 186
 
187
-        return \array_map(static function ($item) {
187
+        return \array_map(static function($item) {
188 188
             return [$item];
189 189
         }, $list);
190 190
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/Symfony/AbstractDriverTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
             ]
29 29
         );
30 30
 
31
-        \touch($filename = $this->dir . '/Foo' . $this->getFileExtension());
31
+        \touch($filename = $this->dir.'/Foo'.$this->getFileExtension());
32 32
         self::assertEquals($filename, $driver->getLocator()->findMappingFile('MyNamespace\MySubnamespace\Entity\Foo'));
33 33
     }
34 34
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             ]
41 41
         );
42 42
 
43
-        \touch($filename = $this->dir . '/Foo.Bar' . $this->getFileExtension());
43
+        \touch($filename = $this->dir.'/Foo.Bar'.$this->getFileExtension());
44 44
         self::assertEquals($filename, $driver->getLocator()->findMappingFile('MyNamespace\MySubnamespace\Entity\Foo\Bar'));
45 45
     }
46 46
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     public function testFindMappingNamespaceNotFound() : void
62 62
     {
63 63
         $this->expectException(MappingException::class);
64
-        $this->expectExceptionMessage("No mapping file found named 'Foo" . $this->getFileExtension() . "' for class 'MyOtherNamespace\MySubnamespace\Entity\Foo'.");
64
+        $this->expectExceptionMessage("No mapping file found named 'Foo".$this->getFileExtension()."' for class 'MyOtherNamespace\MySubnamespace\Entity\Foo'.");
65 65
 
66 66
         $driver = $this->getDriver(
67 67
             [
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
     protected function setUp() : void
76 76
     {
77
-        $this->dir = \sys_get_temp_dir() . '/abstract_driver_test';
77
+        $this->dir = \sys_get_temp_dir().'/abstract_driver_test';
78 78
         @\mkdir($this->dir, 0777, true);
79 79
     }
80 80
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 use function strtoupper;
37 37
 use function unserialize;
38 38
 
39
-require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
39
+require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
40 40
 
41 41
 class ClassMetadataTest extends OrmTestCase
42 42
 {
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      */
166 166
     public function testMapAssociationInGlobalNamespace() : void
167 167
     {
168
-        require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
168
+        require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
169 169
 
170 170
         $cm = new ClassMetadata(DoctrineGlobalArticle::class, null);
171 171
         $cm->setTable(new Mapping\TableMetadata('doctrine_global_article'));
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
      */
266 266
     public function testSetDiscriminatorMapInGlobalNamespace() : void
267 267
     {
268
-        require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
268
+        require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
269 269
 
270 270
         $cm = new ClassMetadata('DoctrineGlobalUser', null);
271 271
         $cm->setTable(new Mapping\TableMetadata('doctrine_global_user'));
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
      */
282 282
     public function testSetSubClassesInGlobalNamespace() : void
283 283
     {
284
-        require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
284
+        require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
285 285
 
286 286
         $cm = new ClassMetadata('DoctrineGlobalUser', null);
287 287
         $cm->setTable(new Mapping\TableMetadata('doctrine_global_user'));
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
     public function testEmptyFieldNameThrowsException() : void
768 768
     {
769 769
         $this->expectException(MappingException::class);
770
-        $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '" . CMS\CmsUser::class . "'.");
770
+        $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '".CMS\CmsUser::class."'.");
771 771
 
772 772
         $cm = new ClassMetadata(CMS\CmsUser::class, null);
773 773
         $cm->setTable(new Mapping\TableMetadata('cms_users'));
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
         $cm->addLifecycleCallback('postLoad', 'notfound');
820 820
 
821 821
         $this->expectException(MappingException::class);
822
-        $this->expectExceptionMessage("Entity '" . CMS\CmsUser::class . "' has no public method 'notfound' to be registered as lifecycle callback.");
822
+        $this->expectExceptionMessage("Entity '".CMS\CmsUser::class."' has no public method 'notfound' to be registered as lifecycle callback.");
823 823
 
824 824
         $cm->validateLifecycleCallbacks(new RuntimeReflectionService());
825 825
     }
@@ -841,7 +841,7 @@  discard block
 block discarded – undo
841 841
         $cm->addProperty($association);
842 842
 
843 843
         $this->expectException(MappingException::class);
844
-        $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '" . CMS\CmsUser::class . "#address'.");
844
+        $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '".CMS\CmsUser::class."#address'.");
845 845
 
846 846
         $cm->validateAssociations();
847 847
     }
@@ -1089,6 +1089,6 @@  discard block
 block discarded – undo
1089 1089
      */
1090 1090
     public function propertyToColumnName(string $propertyName, ?string $className = null) : string
1091 1091
     {
1092
-        return \strtolower($this->classToTableName($className)) . '_' . $propertyName;
1092
+        return \strtolower($this->classToTableName($className)).'_'.$propertyName;
1093 1093
     }
1094 1094
 }
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Mapping/NamingStrategy/JoinColumnClassNamingStrategy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     public function joinColumnName(string $propertyName, ?string $className = null) : string
19 19
     {
20 20
         return \strtolower($this->classToTableName($className))
21
-            . '_' . $propertyName
22
-            . '_' . $this->referenceColumnName();
21
+            . '_'.$propertyName
22
+            . '_'.$this->referenceColumnName();
23 23
     }
24 24
 }
Please login to merge, or discard this patch.