Skip to content

Fix phpstan issues #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions lib/ImageResize.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ public function __construct($filename)
$this->source_image = $this->imageCreateJpegfromExif($filename);

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

break;

Expand Down Expand Up @@ -205,7 +205,7 @@ public function imageCreateJpegfromExif($filename)
* @param string $image_type
* @param integer $quality
* @param integer $permissions
* @return \static
* @return static
*/
public function save($filename, $image_type = null, $quality = null, $permissions = null)
{
Expand Down Expand Up @@ -364,7 +364,7 @@ public function output($image_type = null, $quality = null)
*
* @param integer $max_short
* @param boolean $allow_enlarge
* @return \static
* @return static
*/
public function resizeToShortSide($max_short, $allow_enlarge = false)
{
Expand All @@ -388,7 +388,7 @@ public function resizeToShortSide($max_short, $allow_enlarge = false)
*
* @param integer $max_long
* @param boolean $allow_enlarge
* @return \static
* @return static
*/
public function resizeToLongSide($max_long, $allow_enlarge = false)
{
Expand All @@ -412,7 +412,7 @@ public function resizeToLongSide($max_long, $allow_enlarge = false)
*
* @param integer $height
* @param boolean $allow_enlarge
* @return \static
* @return static
*/
public function resizeToHeight($height, $allow_enlarge = false)
{
Expand All @@ -429,7 +429,7 @@ public function resizeToHeight($height, $allow_enlarge = false)
*
* @param integer $width
* @param boolean $allow_enlarge
* @return \static
* @return static
*/
public function resizeToWidth($width, $allow_enlarge = false)
{
Expand All @@ -447,7 +447,7 @@ public function resizeToWidth($width, $allow_enlarge = false)
* @param integer $max_width
* @param integer $max_height
* @param boolean $allow_enlarge
* @return \static
* @return static
*/
public function resizeToBestFit($max_width, $max_height, $allow_enlarge = false)
{
Expand All @@ -471,7 +471,7 @@ public function resizeToBestFit($max_width, $max_height, $allow_enlarge = false)
* Resizes image according to given scale (proportionally)
*
* @param integer|float $scale
* @return \static
* @return static
*/
public function scale($scale)
{
Expand All @@ -489,7 +489,7 @@ public function scale($scale)
* @param integer $width
* @param integer $height
* @param boolean $allow_enlarge
* @return \static
* @return static
*/
public function resize($width, $height, $allow_enlarge = false)
{
Expand Down Expand Up @@ -523,7 +523,7 @@ public function resize($width, $height, $allow_enlarge = false)
* @param integer $height
* @param boolean $allow_enlarge
* @param integer $position
* @return \static
* @return static
*/
public function crop($width, $height, $allow_enlarge = false, $position = self::CROPCENTER)
{
Expand Down Expand Up @@ -574,7 +574,7 @@ public function crop($width, $height, $allow_enlarge = false, $position = self::
* @param integer $height
* @param integer $x
* @param integer $y
* @return \static
* @return static
*/
public function freecrop($width, $height, $x = false, $y = false)
{
Expand Down Expand Up @@ -645,7 +645,7 @@ public function getDestHeight()
*
* @param integer $expectedSize
* @param integer $position
* @return integer
* @return float|integer
*/
protected function getCropPosition($expectedSize, $position = self::CROPCENTER)
{
Expand Down