We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3838df commit dedaed7Copy full SHA for dedaed7
1 file changed
src/Type/Constant/ConstantArrayType.php
@@ -3186,10 +3186,6 @@ public function mapValueType(callable $cb): Type
3186
$newValueTypes[] = $cb($valueType);
3187
}
3188
3189
- // A sealed array's unsealed value type is the explicit-never sentinel for
3190
- // "no extra elements". Mapping it through $cb would invent a bogus type for
3191
- // elements that cannot exist (e.g. an ErrorType from an enum property fetch
3192
- // on never), so leave the sentinel untouched.
3193
$newUnsealed = $this->unsealed === null || $this->isUnsealed()->no()
3194
? $this->unsealed
3195
: [$this->unsealed[0], $cb($this->unsealed[1])];
0 commit comments