Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 638f9ec

Browse filesBrowse files
minor #38107 [DependencyInjection] consistently use same types for strict comparisons (xabbuh)
This PR was merged into the 4.4 branch. Discussion ---------- [DependencyInjection] consistently use same types for strict comparisons | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- afc1168 consistently use same types for strict comparisons
2 parents 261a939 + afc1168 commit 638f9ec
Copy full SHA for 638f9ec

File tree

2 files changed

+3
-6
lines changed
Filter options

2 files changed

+3
-6
lines changed

‎src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ public function testPrototype()
675675
sort($ids);
676676
$this->assertSame([Prototype\Foo::class, Prototype\Sub\Bar::class, 'service_container'], $ids);
677677

678-
$resources = $container->getResources();
678+
$resources = array_map('strval', $container->getResources());
679679

680680
$fixturesDir = \dirname(__DIR__).\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR;
681681
$this->assertContains((string) new FileResource($fixturesDir.'xml'.\DIRECTORY_SEPARATOR.'services_prototype.xml'), $resources);
@@ -693,7 +693,6 @@ public function testPrototype()
693693
]
694694
);
695695
$this->assertContains((string) $globResource, $resources);
696-
$resources = array_map('strval', $resources);
697696
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo', $resources);
698697
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar', $resources);
699698
}
@@ -708,7 +707,7 @@ public function testPrototypeExcludeWithArray()
708707
sort($ids);
709708
$this->assertSame([Prototype\Foo::class, Prototype\Sub\Bar::class, 'service_container'], $ids);
710709

711-
$resources = $container->getResources();
710+
$resources = array_map('strval', $container->getResources());
712711

713712
$fixturesDir = \dirname(__DIR__).\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR;
714713
$this->assertContains((string) new FileResource($fixturesDir.'xml'.\DIRECTORY_SEPARATOR.'services_prototype_array.xml'), $resources);
@@ -726,7 +725,6 @@ public function testPrototypeExcludeWithArray()
726725
]
727726
);
728727
$this->assertContains((string) $globResource, $resources);
729-
$resources = array_map('strval', $resources);
730728
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo', $resources);
731729
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar', $resources);
732730
}

‎src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ public function testPrototype()
451451
sort($ids);
452452
$this->assertSame([Prototype\Foo::class, Prototype\Sub\Bar::class, 'service_container'], $ids);
453453

454-
$resources = $container->getResources();
454+
$resources = array_map('strval', $container->getResources());
455455

456456
$fixturesDir = \dirname(__DIR__).\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR;
457457
$this->assertContains((string) new FileResource($fixturesDir.'yaml'.\DIRECTORY_SEPARATOR.'services_prototype.yml'), $resources);
@@ -468,7 +468,6 @@ public function testPrototype()
468468
]
469469
);
470470
$this->assertContains((string) $globResource, $resources);
471-
$resources = array_map('strval', $resources);
472471
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo', $resources);
473472
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar', $resources);
474473
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.