Skip to content
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

Fixing return typo annotation in rotateImage method #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
11 changes: 5 additions & 6 deletions src/PHPThumb/GD.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function __construct($fileName, $options = array(), array $plugins = arra
break;
}

$this->currentDimensions = array (
$this->currentDimensions = array(
'width' => imagesx($this->oldImage),
'height' => imagesy($this->oldImage)
);
Expand Down Expand Up @@ -427,7 +427,6 @@ public function adaptiveResizePercent($width, $height, $percent = 50)
// Image is landscape
$maxCropX = $this->currentDimensions['width'] - $this->maxWidth;
$cropX = intval(($percent / 100) * $maxCropX);

} elseif ($this->currentDimensions['height'] > $this->maxHeight) {
// Image is portrait
$maxCropY = $this->currentDimensions['height'] - $this->maxHeight;
Expand Down Expand Up @@ -594,7 +593,7 @@ public function adaptiveResizeQuadrant($width, $height, $quadrant = 'C')
public function resizePercent($percent = 0)
{
if (!is_numeric($percent)) {
throw new \InvalidArgumentException ('$percent must be numeric');
throw new \InvalidArgumentException('$percent must be numeric');
}

$this->percent = intval($percent);
Expand Down Expand Up @@ -745,7 +744,7 @@ public function crop($startX, $startY, $cropWidth, $cropHeight)
* Rotates image either 90 degrees clockwise or counter-clockwise
*
* @param string $direction
* @retunrn \PHPThumb\GD
* @return \PHPThumb\GD
*/
public function rotateImage($direction = 'CW')
{
Expand Down Expand Up @@ -975,9 +974,9 @@ public function setOptions(array $options = array())
'jpegQuality' => 100,
'correctPermissions' => false,
'preserveAlpha' => true,
'alphaMaskColor' => array (255, 255, 255),
'alphaMaskColor' => array(255, 255, 255),
'preserveTransparency' => true,
'transparencyMaskColor' => array (0, 0, 0),
'transparencyMaskColor' => array(0, 0, 0),
'interlace' => null
);
} else { // otherwise, let's use what we've got already
Expand Down