Skip to content

Commit dec98a8

Browse files
kalessilfabpot
authored andcommitted
[minor] SCA
1 parent d559a6f commit dec98a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Loader/Configurator/DefaultsConfigurator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ class DefaultsConfigurator extends AbstractServiceConfigurator
3434
*/
3535
final public function tag(string $name, array $attributes = array())
3636
{
37-
if (!is_string($name) || '' === $name) {
37+
if ('' === $name) {
3838
throw new InvalidArgumentException('The tag name in "_defaults" must be a non-empty string.');
3939
}
4040

4141
foreach ($attributes as $attribute => $value) {
42-
if (!is_scalar($value) && null !== $value) {
42+
if (null !== $value && !is_scalar($value)) {
4343
throw new InvalidArgumentException(sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type.', $name, $attribute));
4444
}
4545
}

0 commit comments

Comments
 (0)