Fixed some more inspection issues

This commit is contained in:
Jan Böhmer 2023-04-15 22:05:29 +02:00
parent de96aae9a5
commit 29d1d49aca
83 changed files with 153 additions and 172 deletions

View file

@ -443,11 +443,13 @@ class AttachmentSubmitHandler
];
if (ctype_digit((string) $maxSize)) {
return (int) $maxSize;
} elseif (preg_match('/^(\d++)('.implode('|', array_keys($factors)).')$/i', $maxSize, $matches)) {
return (((int) $matches[1]) * $factors[strtolower($matches[2])]);
} else {
throw new RuntimeException(sprintf('"%s" is not a valid maximum size.', $maxSize));
}
if (preg_match('/^(\d++)('.implode('|', array_keys($factors)).')$/i', $maxSize, $matches)) {
return (((int) $matches[1]) * $factors[strtolower($matches[2])]);
}
throw new RuntimeException(sprintf('"%s" is not a valid maximum size.', $maxSize));
}
/*