chore: Проверки для типов
This commit is contained in:
parent
6fdc3eb46b
commit
5d3fae4249
15 changed files with 125 additions and 42 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue