generator: fixup issues reported by PHPStan 2.0

This commit is contained in:
Dylan K. Taylor
2025-01-07 22:07:38 +00:00
parent 28d31c97f8
commit 7b1b35ab1f
2 changed files with 3 additions and 4 deletions

View File

@@ -75,8 +75,7 @@ final class FlatGeneratorOptions{
$y = 0;
$itemParser = LegacyStringToItemParser::getInstance();
foreach($split as $line){
preg_match('#^(?:(\d+)[x|*])?(.+)$#', $line, $matches);
if(count($matches) !== 3){
if(preg_match('#^(?:(\d+)[x|*])?(.+)$#', $line, $matches) !== 1){
throw new InvalidGeneratorOptionsException("Invalid preset layer \"$line\"");
}