Skip to content

Commit 033a882

Browse files
committed
minor #27676 [minor] SCA (kalessil)
This PR was squashed before being merged into the 4.0 branch (closes #27676). Discussion ---------- [minor] SCA | Q | A | ------------- | --- | Branch? | 4.0> | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Found some leftovers after introducing parameter types in 4.0. Commits ------- afeb89fa06 [minor] SCA
2 parents 02f25f9 + dec98a8 commit 033a882

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)