Skip to content

Commit 2cc29b7

Browse files
author
Timon de Groot
committed
Fix requested changes from review
1 parent 5015928 commit 2cc29b7

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
/**
1212
* Image adapter from ImageMagick.
13-
*
14-
* @property \Imagick $_imageHandler
1513
*/
1614
class ImageMagick extends AbstractAdapter
1715
{
@@ -38,18 +36,23 @@ class ImageMagick extends AbstractAdapter
3836
'sharpen' => ['radius' => 4, 'deviation' => 1],
3937
];
4038

39+
/**
40+
* @var \Imagick
41+
*/
42+
protected $_imageHandler;
43+
4144
/**
4245
* Colorspace of the image
4346
*
4447
* @var int
4548
*/
46-
protected $colorspace = -1;
49+
private $colorspace = -1;
4750
/**
4851
* Original colorspace of the image
4952
*
5053
* @var int
5154
*/
52-
protected $originalColorspace = -1;
55+
private $originalColorspace = -1;
5356

5457
/**
5558
* Set/get background color. Check Imagick::COLOR_* constants
@@ -589,7 +592,8 @@ private function addSingleWatermark($positionX, int $positionY, \Imagick $waterm
589592
public function getColorspace(): int
590593
{
591594
if ($this->colorspace === -1) {
592-
$this->originalColorspace = $this->colorspace = $this->_imageHandler->getImageColorspace();
595+
$this->colorspace = $this->_imageHandler->getImageColorspace();
596+
$this->originalColorspace = $this->colorspace;
593597
}
594598

595599
return $this->colorspace;

0 commit comments

Comments
 (0)