Skip to content

Commit b505c53

Browse files
committed
Work around PHPStan type silliness.
1 parent a03ab2e commit b505c53

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/EnvMapper.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ public function map(string $class, bool $requireValues = false, ?array $source =
3939
$propName = $rProp->getName();
4040
$envName = $this->normalizeName($propName);
4141
if (isset($source[$envName])) {
42-
$toSet[$propName] = $this->typeNormalize($source[$envName], $rProp);
42+
/** @var string|int|float $val */
43+
$val = $source[$envName];
44+
$toSet[$propName] = $this->typeNormalize($val, $rProp);
4345
} elseif (PropValue::None !== $default = $this->getDefaultValue($rProp)) {
4446
$toSet[$propName] = $default;
4547
} elseif ($requireValues) {

0 commit comments

Comments
 (0)