Skip to content

Commit

Permalink
Merge pull request #181 from Internacionalweb/fixed-return-getcroppos…
Browse files Browse the repository at this point in the history
…ition

Modified return type to avoid implicit float to int conversion
  • Loading branch information
adityapatadia authored May 12, 2022
2 parents c8acaa8 + 23d7a71 commit 39066a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ImageResize.php
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ public function getDestHeight()
*
* @param integer $expectedSize
* @param integer $position
* @return float|integer
* @return integer
*/
protected function getCropPosition($expectedSize, $position = self::CROPCENTER)
{
Expand All @@ -758,7 +758,7 @@ protected function getCropPosition($expectedSize, $position = self::CROPCENTER)
$size = $expectedSize / 4;
break;
}
return $size;
return (int) $size;
}

/**
Expand Down

0 comments on commit 39066a3

Please sign in to comment.