Skip to content

Commit 0009662

Browse files
Set strict parameter of in_array to true where possible
1 parent a2cb738 commit 0009662

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Compiler/RegisterEnvVarProcessorsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private static function validateProvidedTypes(string $types, string $class): arr
6565
$types = explode('|', $types);
6666

6767
foreach ($types as $type) {
68-
if (!\in_array($type, self::ALLOWED_TYPES)) {
68+
if (!\in_array($type, self::ALLOWED_TYPES, true)) {
6969
throw new InvalidArgumentException(sprintf('Invalid type "%s" returned by "%s::getProvidedTypes()", expected one of "%s".', $type, $class, implode('", "', self::ALLOWED_TYPES)));
7070
}
7171
}

Compiler/ResolveInstanceofConditionalsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private function processDefinition(ContainerBuilder $container, string $id, Defi
127127
foreach ($tags as $k => $v) {
128128
if (null === $definition->getDecoratedService() || $interface === $definition->getClass() || \in_array($k, $tagsToKeep, true)) {
129129
foreach ($v as $v) {
130-
if ($definition->hasTag($k) && \in_array($v, $definition->getTag($k))) {
130+
if ($definition->hasTag($k) && \in_array($v, $definition->getTag($k), true)) {
131131
continue;
132132
}
133133
$definition->addTag($k, $v);

0 commit comments

Comments
 (0)