Skip to content

Commit 24c6395

Browse files
Merge pull request #113 from eigan/phpstan
Fix phpstan issues
2 parents 2892593 + 9de1e12 commit 24c6395

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

lib/ImageResize.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ public function __construct($filename)
135135
$this->source_image = $this->imageCreateJpegfromExif($filename);
136136

137137
// set new width and height for image, maybe it has changed
138-
$this->original_w = ImageSX($this->source_image);
139-
$this->original_h = ImageSY($this->source_image);
138+
$this->original_w = imagesx($this->source_image);
139+
$this->original_h = imagesy($this->source_image);
140140

141141
break;
142142

@@ -205,7 +205,7 @@ public function imageCreateJpegfromExif($filename)
205205
* @param string $image_type
206206
* @param integer $quality
207207
* @param integer $permissions
208-
* @return \static
208+
* @return static
209209
*/
210210
public function save($filename, $image_type = null, $quality = null, $permissions = null)
211211
{
@@ -364,7 +364,7 @@ public function output($image_type = null, $quality = null)
364364
*
365365
* @param integer $max_short
366366
* @param boolean $allow_enlarge
367-
* @return \static
367+
* @return static
368368
*/
369369
public function resizeToShortSide($max_short, $allow_enlarge = false)
370370
{
@@ -388,7 +388,7 @@ public function resizeToShortSide($max_short, $allow_enlarge = false)
388388
*
389389
* @param integer $max_long
390390
* @param boolean $allow_enlarge
391-
* @return \static
391+
* @return static
392392
*/
393393
public function resizeToLongSide($max_long, $allow_enlarge = false)
394394
{
@@ -412,7 +412,7 @@ public function resizeToLongSide($max_long, $allow_enlarge = false)
412412
*
413413
* @param integer $height
414414
* @param boolean $allow_enlarge
415-
* @return \static
415+
* @return static
416416
*/
417417
public function resizeToHeight($height, $allow_enlarge = false)
418418
{
@@ -429,7 +429,7 @@ public function resizeToHeight($height, $allow_enlarge = false)
429429
*
430430
* @param integer $width
431431
* @param boolean $allow_enlarge
432-
* @return \static
432+
* @return static
433433
*/
434434
public function resizeToWidth($width, $allow_enlarge = false)
435435
{
@@ -447,7 +447,7 @@ public function resizeToWidth($width, $allow_enlarge = false)
447447
* @param integer $max_width
448448
* @param integer $max_height
449449
* @param boolean $allow_enlarge
450-
* @return \static
450+
* @return static
451451
*/
452452
public function resizeToBestFit($max_width, $max_height, $allow_enlarge = false)
453453
{
@@ -471,7 +471,7 @@ public function resizeToBestFit($max_width, $max_height, $allow_enlarge = false)
471471
* Resizes image according to given scale (proportionally)
472472
*
473473
* @param integer|float $scale
474-
* @return \static
474+
* @return static
475475
*/
476476
public function scale($scale)
477477
{
@@ -489,7 +489,7 @@ public function scale($scale)
489489
* @param integer $width
490490
* @param integer $height
491491
* @param boolean $allow_enlarge
492-
* @return \static
492+
* @return static
493493
*/
494494
public function resize($width, $height, $allow_enlarge = false)
495495
{
@@ -523,7 +523,7 @@ public function resize($width, $height, $allow_enlarge = false)
523523
* @param integer $height
524524
* @param boolean $allow_enlarge
525525
* @param integer $position
526-
* @return \static
526+
* @return static
527527
*/
528528
public function crop($width, $height, $allow_enlarge = false, $position = self::CROPCENTER)
529529
{
@@ -574,7 +574,7 @@ public function crop($width, $height, $allow_enlarge = false, $position = self::
574574
* @param integer $height
575575
* @param integer $x
576576
* @param integer $y
577-
* @return \static
577+
* @return static
578578
*/
579579
public function freecrop($width, $height, $x = false, $y = false)
580580
{
@@ -645,7 +645,7 @@ public function getDestHeight()
645645
*
646646
* @param integer $expectedSize
647647
* @param integer $position
648-
* @return integer
648+
* @return float|integer
649649
*/
650650
protected function getCropPosition($expectedSize, $position = self::CROPCENTER)
651651
{

0 commit comments

Comments
 (0)