aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/IImage.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-13 00:34:28 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-17 10:00:33 +0100
commite4b3ee8d8f93262423eaaeee390deb6e680bb1e3 (patch)
tree3c24e04be9a760d73490fdc75f9ae788051eb886 /lib/public/IImage.php
parent16f4d71efd257e66550d61013e39ecf96c10fa0f (diff)
downloadnextcloud-server-e4b3ee8d8f93262423eaaeee390deb6e680bb1e3.tar.gz
nextcloud-server-e4b3ee8d8f93262423eaaeee390deb6e680bb1e3.zip
Fix float/integer handling in image API
* IImage::crop/preciseResize now have type hinting for integers * found while testing strict typing for PHP 7+ Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/public/IImage.php')
-rw-r--r--lib/public/IImage.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/public/IImage.php b/lib/public/IImage.php
index 70e8b3cff75..4311f44f1bc 100644
--- a/lib/public/IImage.php
+++ b/lib/public/IImage.php
@@ -147,7 +147,7 @@ interface IImage {
* @return bool
* @since 8.1.0
*/
- public function preciseResize($width, $height);
+ public function preciseResize(int $width, int $height): bool;
/**
* Crops the image to the middle square. If the image is already square it just returns.
@@ -168,7 +168,7 @@ interface IImage {
* @return bool for success or failure
* @since 8.1.0
*/
- public function crop($x, $y, $w, $h);
+ public function crop(int $x, int $y, int $w, int $h): bool;
/**
* Resizes the image to fit within a boundary while preserving ratio.