Skip to content

Commit 7c2503b

Browse files
Girgiasnicolas-grekas
authored andcommitted
Remove some implicit bool type juggling
1 parent 926765f commit 7c2503b

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

DependencyInjection/FormPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private function processFormTypes(ContainerBuilder $container): Reference
5454
// Add form type service to the service locator
5555
$serviceDefinition = $container->getDefinition($serviceId);
5656
$servicesMap[$formType = $serviceDefinition->getClass()] = new Reference($serviceId);
57-
$namespaces[substr($formType, 0, strrpos($formType, '\\'))] = true;
57+
$namespaces[substr($formType, 0, strrpos($formType, '\\') ?: \strlen($formType))] = true;
5858

5959
if (isset($tag[0]['csrf_token_id'])) {
6060
$csrfTokenIds[$formType] = $tag[0]['csrf_token_id'];

Tests/ButtonBuilderTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public static function getInvalidNames()
5050
{
5151
return [
5252
[''],
53-
[false],
5453
[null],
5554
];
5655
}

0 commit comments

Comments
 (0)