Passed
Pull Request — master (#7885)
by Šimon
05:58
created
tests/Doctrine/Tests/ORM/Internal/HydrationCompleteHandlerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 $metadata,
71 71
                 Events::postLoad,
72 72
                 $entity,
73
-                $this->callback(static function (LifecycleEventArgs $args) use ($entityManager, $entity) {
73
+                $this->callback(static function(LifecycleEventArgs $args) use ($entityManager, $entity) {
74 74
                     return $entity === $args->getEntity() && $entityManager === $args->getObjectManager();
75 75
                 }),
76 76
                 $listenersFlag
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                 $this->logicalOr($metadata1, $metadata2),
139 139
                 Events::postLoad,
140 140
                 $this->logicalOr($entity1, $entity2),
141
-                $this->callback(static function (LifecycleEventArgs $args) use ($entityManager, $entity1, $entity2) {
141
+                $this->callback(static function(LifecycleEventArgs $args) use ($entityManager, $entity1, $entity2) {
142 142
                     return in_array($args->getEntity(), [$entity1, $entity2], true)
143 143
                         && $entityManager === $args->getObjectManager();
144 144
                 }),
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Proxy/ProxyFactoryTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
                     self::isInstanceOf(CompanyEmployee::class)
227 227
                 )
228 228
             )
229
-            ->willReturnCallback(static function (array $id, CompanyEmployee $companyEmployee) {
229
+            ->willReturnCallback(static function(array $id, CompanyEmployee $companyEmployee) {
230 230
                 $companyEmployee->setSalary(1000); // A property on the CompanyEmployee
231 231
                 $companyEmployee->setName('Bob'); // A property on the parent class, CompanyPerson
232 232
 
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
                     self::isInstanceOf(ComparableObject::class)
289 289
                 )
290 290
             )
291
-            ->willReturnCallback(static function (array $id, ComparableObject $comparableObject) {
291
+            ->willReturnCallback(static function(array $id, ComparableObject $comparableObject) {
292 292
                 $comparableObject->setComparedFieldValue(json_encode($id));
293 293
 
294 294
                 return $comparableObject;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Decorator/EntityManagerDecoratorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
             return [
58 58
                 $method->getName(),
59 59
                 [
60
-                    static function () {
60
+                    static function() {
61 61
                     },
62 62
                 ],
63 63
             ];
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
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 {
29 29
     protected function loadDriver()
30 30
     {
31
-        return new XmlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'xml');
31
+        return new XmlDriver(__DIR__.DIRECTORY_SEPARATOR.'xml');
32 32
     }
33 33
 
34 34
     public function testClassTableInheritanceDiscriminatorMap() : void
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      */
173 173
     public function testValidateXmlSchema($xmlMappingFile) : void
174 174
     {
175
-        $xsdSchemaFile = __DIR__ . '/../../../../../doctrine-mapping.xsd';
175
+        $xsdSchemaFile = __DIR__.'/../../../../../doctrine-mapping.xsd';
176 176
         $dom           = new DOMDocument();
177 177
 
178 178
         $dom->load($xmlMappingFile);
@@ -182,14 +182,14 @@  discard block
 block discarded – undo
182 182
 
183 183
     public static function dataValidSchema()
184 184
     {
185
-        $list    = glob(__DIR__ . '/xml/*.xml');
185
+        $list    = glob(__DIR__.'/xml/*.xml');
186 186
         $invalid = ['Doctrine.Tests.Models.DDC889.DDC889Class.dcm'];
187 187
 
188
-        $list = array_filter($list, static function ($item) use ($invalid) {
188
+        $list = array_filter($list, static function($item) use ($invalid) {
189 189
             return ! in_array(pathinfo($item, PATHINFO_FILENAME), $invalid, true);
190 190
         });
191 191
 
192
-        return array_map(static function ($item) {
192
+        return array_map(static function($item) {
193 193
             return [$item];
194 194
         }, $list);
195 195
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
             $query->free();
67 67
         } catch (Exception $e) {
68
-            $this->fail($e->getMessage() . "\n" . $e->getTraceAsString());
68
+            $this->fail($e->getMessage()."\n".$e->getTraceAsString());
69 69
         }
70 70
 
71 71
         self::assertEquals($sqlToBeConfirmed, $sqlGenerated);
@@ -1625,7 +1625,7 @@  discard block
 block discarded – undo
1625 1625
     public function testAliasDoesNotExceedPlatformDefinedLength() : void
1626 1626
     {
1627 1627
         $this->assertSqlGeneration(
1628
-            'SELECT m FROM ' . __NAMESPACE__ . '\\DDC1384Model m',
1628
+            'SELECT m FROM '.__NAMESPACE__.'\\DDC1384Model m',
1629 1629
             'SELECT t0."aVeryLongIdentifierThatShouldBeShortenedByTheSQLWalker_fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" AS c0 FROM "DDC1384Model" t0'
1630 1630
         );
1631 1631
     }
@@ -1658,12 +1658,12 @@  discard block
 block discarded – undo
1658 1658
     public function testSelectWithArithmeticExpressionBeforeField() : void
1659 1659
     {
1660 1660
         $this->assertSqlGeneration(
1661
-            'SELECT - e.value AS value, e.id FROM ' . __NAMESPACE__ . '\DDC1474Entity e',
1661
+            'SELECT - e.value AS value, e.id FROM '.__NAMESPACE__.'\DDC1474Entity e',
1662 1662
             'SELECT -t0."value" AS c0, t0."id" AS c1 FROM "DDC1474Entity" t0'
1663 1663
         );
1664 1664
 
1665 1665
         $this->assertSqlGeneration(
1666
-            'SELECT e.id, + e.value AS value FROM ' . __NAMESPACE__ . '\DDC1474Entity e',
1666
+            'SELECT e.id, + e.value AS value FROM '.__NAMESPACE__.'\DDC1474Entity e',
1667 1667
             'SELECT t0."id" AS c0, +t0."value" AS c1 FROM "DDC1474Entity" t0'
1668 1668
         );
1669 1669
     }
@@ -2340,8 +2340,8 @@  discard block
 block discarded – undo
2340 2340
     public function testHavingRegressionUsingVariableWithMathOperatorsExpression($operator) : void
2341 2341
     {
2342 2342
         $this->assertSqlGeneration(
2343
-            'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 ' . $operator . ' countName > 0',
2344
-            'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 ' . $operator . ' c0 > 0'
2343
+            'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 '.$operator.' countName > 0',
2344
+            'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 '.$operator.' c0 > 0'
2345 2345
         );
2346 2346
     }
2347 2347
 
@@ -2360,7 +2360,7 @@  discard block
 block discarded – undo
2360 2360
 
2361 2361
     public function getSql(SqlWalker $sqlWalker)
2362 2362
     {
2363
-        return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression) . ')';
2363
+        return 'ABS('.$sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression).')';
2364 2364
     }
2365 2365
 
2366 2366
     public function parse(Parser $parser)
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Query/CustomTreeWalkersTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         try {
46 46
             $sqlGenerated = $this->generateSql($dqlToBeTested, $treeWalkers, $outputWalker);
47 47
         } catch (Exception $e) {
48
-            $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine());
48
+            $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine());
49 49
         }
50 50
 
51 51
         self::assertEquals($sqlToBeConfirmed, $sqlGenerated);
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             $condExpr = $whereClause->conditionalExpression;
146 146
 
147 147
             // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression
148
-            if (! ($condExpr instanceof Query\AST\ConditionalExpression)) {
148
+            if ( ! ($condExpr instanceof Query\AST\ConditionalExpression)) {
149 149
                 $condExpr = new Query\AST\ConditionalExpression([$condExpr]);
150 150
 
151 151
                 $whereClause->conditionalExpression = $condExpr;
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
                 $singleTerm = $selectStatement->whereClause->conditionalExpression->conditionalTerms[0];
169 169
 
170 170
                 // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression
171
-                if (! ($singleTerm instanceof Query\AST\ConditionalTerm)) {
171
+                if ( ! ($singleTerm instanceof Query\AST\ConditionalTerm)) {
172 172
                     $singleTerm = new Query\AST\ConditionalTerm([$singleTerm]);
173 173
 
174 174
                     $selectStatement->whereClause->conditionalExpression->conditionalTerms[0] = $singleTerm;
@@ -206,9 +206,9 @@  discard block
 block discarded – undo
206 206
     {
207 207
         $rangeVariableDecl       = $identificationVariableDecl->rangeVariableDeclaration;
208 208
         $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address');
209
-        $joinAssocDeclaration    = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null);
209
+        $joinAssocDeclaration    = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null);
210 210
         $join                    = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration);
211
-        $selectExpression        = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false);
211
+        $selectExpression        = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false);
212 212
 
213 213
         $identificationVariableDecl->joins[]                = $join;
214 214
         $selectStatement->selectClause->selectExpressions[] = $selectExpression;
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
         $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class);
219 219
 
220 220
         $this->setQueryComponent(
221
-            $rangeVariableDecl->aliasIdentificationVariable . 'a',
221
+            $rangeVariableDecl->aliasIdentificationVariable.'a',
222 222
             [
223 223
                 'metadata'     => $addressMetadata,
224 224
                 'parent'       => $rangeVariableDecl->aliasIdentificationVariable,
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
@@ -19,16 +19,16 @@
 block discarded – undo
19 19
     public function providerParameterTypeInferer()
20 20
     {
21 21
         $data = [
22
-            [1,                 Type::INTEGER],
23
-            ['bar',             ParameterType::STRING],
24
-            ['1',               ParameterType::STRING],
25
-            [new DateTime(),     Type::DATETIME],
22
+            [1, Type::INTEGER],
23
+            ['bar', ParameterType::STRING],
24
+            ['1', ParameterType::STRING],
25
+            [new DateTime(), Type::DATETIME],
26 26
             [new DateInterval('P1D'), Type::DATEINTERVAL],
27
-            [[2],          Connection::PARAM_INT_ARRAY],
28
-            [['foo'],      Connection::PARAM_STR_ARRAY],
29
-            [['1','2'],    Connection::PARAM_STR_ARRAY],
30
-            [[],           Connection::PARAM_STR_ARRAY],
31
-            [true,              Type::BOOLEAN],
27
+            [[2], Connection::PARAM_INT_ARRAY],
28
+            [['foo'], Connection::PARAM_STR_ARRAY],
29
+            [['1', '2'], Connection::PARAM_STR_ARRAY],
30
+            [[], Connection::PARAM_STR_ARRAY],
31
+            [true, Type::BOOLEAN],
32 32
         ];
33 33
 
34 34
         if (PHP_VERSION_ID >= 50500) {
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Cache/FileLockRegionTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
     protected function createRegion()
61 61
     {
62
-        $this->directory = sys_get_temp_dir() . '/doctrine_lock_' . uniqid();
62
+        $this->directory = sys_get_temp_dir().'/doctrine_lock_'.uniqid();
63 63
 
64 64
         $region = new DefaultRegion('concurren_region_test', $this->cache);
65 65
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         $reflectionDirectory->setAccessible(true);
263 263
         $reflectionDirectory->setValue($region, str_repeat('a', 10000));
264 264
 
265
-        set_error_handler(static function () {
265
+        set_error_handler(static function() {
266 266
         }, E_WARNING);
267 267
         self::assertTrue($region->evictAll());
268 268
         restore_error_handler();
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
     {
276 276
         $path = $path ?: $this->directory;
277 277
 
278
-        if (! is_dir($path)) {
278
+        if ( ! is_dir($path)) {
279 279
             return;
280 280
         }
281 281
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/PersistentCollectionTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
             ->expects(self::once())
174 174
             ->method('loadCollection')
175 175
             ->with($this->collection)
176
-            ->willReturnCallback(static function (PersistentCollection $persistentCollection) use ($persistedElement) : void {
176
+            ->willReturnCallback(static function(PersistentCollection $persistentCollection) use ($persistedElement) : void {
177 177
                 $persistentCollection->unwrap()->add($persistedElement);
178 178
             });
179 179
 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
             ->expects(self::once())
211 211
             ->method('loadCollection')
212 212
             ->with($this->collection)
213
-            ->willReturnCallback(static function (PersistentCollection $persistentCollection) use (
213
+            ->willReturnCallback(static function(PersistentCollection $persistentCollection) use (
214 214
                 $persistedElement,
215 215
                 $newElementThatIsAlsoPersisted
216 216
             ) : void {
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
             ->expects(self::once())
253 253
             ->method('loadCollection')
254 254
             ->with($this->collection)
255
-            ->willReturnCallback(static function (PersistentCollection $persistentCollection) use (
255
+            ->willReturnCallback(static function(PersistentCollection $persistentCollection) use (
256 256
                 $persistedElement,
257 257
                 $newElementThatIsAlsoPersisted
258 258
             ) : void {
Please login to merge, or discard this patch.