chore: Проверки для типов

This commit is contained in:
origami11@yandex.ru 2025-12-01 16:19:28 +03:00
parent 6fdc3eb46b
commit 5d3fae4249
15 changed files with 125 additions and 42 deletions

View file

@ -25,8 +25,11 @@ class Image
{
$width = imagesx($image);
$height = imagesy($image);
$percent = min($prewidth / $width, $preheight / $height);
if ($percent > 1 && !$force) $percent = 1;
if ($percent > 1 && !$force) {
$percent = 1;
}
$new_width = $width * $percent;
$new_height = $height * $percent;