the function stringToLegacy gives already null useless to put a default null (#4338)

This commit is contained in:
Sensei Tarzan 2021-07-31 17:54:31 +02:00 committed by GitHub
parent 22c3736d63
commit 1bbf739385
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,7 +87,7 @@ final class RuntimeBlockMapping{
$idToStatesMap[$state->getString("name")][] = $k;
}
foreach($legacyStateMap as $pair){
$id = $legacyIdMap->stringToLegacy($pair->getId()) ?? null;
$id = $legacyIdMap->stringToLegacy($pair->getId());
if($id === null){
throw new \RuntimeException("No legacy ID matches " . $pair->getId());
}