Skip to content

Commit c63b80d

Browse files
committed
Simplify check in Configuration
1 parent cfece50 commit c63b80d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/DependencyInjection/Configuration.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ public function getConfigTreeBuilder(): TreeBuilder
8080
->prototype('scalar')
8181
->validate()
8282
->ifTrue(function ($value): bool {
83-
if (! is_string($value)) {
83+
if (! is_string($value) && '' != $value) {
8484
return true;
8585
}
8686

87-
return '@' !== substr($value, 0, 1);
87+
return '@' !== $value[0];
8888
})
89-
->thenInvalid('Expecting service reference, got %s');
89+
->thenInvalid('Expecting service reference, got "%s"');
9090
$optionsChildNodes->scalarNode('logger');
9191
$optionsChildNodes->integerNode('max_breadcrumbs')
9292
->min(1);

0 commit comments

Comments
 (0)