@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | /** |
| 33 | 33 | * @param int $width |
| 34 | 34 | * @throws InvalidArgumentException |
| 35 | - * @return Rotate Chainable |
|
| 35 | + * @return AbstractCropEffect Chainable |
|
| 36 | 36 | */ |
| 37 | 37 | public function setWidth($width) |
| 38 | 38 | { |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | - * @return float |
|
| 49 | + * @return integer |
|
| 50 | 50 | */ |
| 51 | 51 | public function width() |
| 52 | 52 | { |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | - * @return float |
|
| 73 | + * @return integer |
|
| 74 | 74 | */ |
| 75 | 75 | public function height() |
| 76 | 76 | { |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | /** |
| 99 | - * @return float |
|
| 99 | + * @return integer |
|
| 100 | 100 | */ |
| 101 | 101 | public function x() |
| 102 | 102 | { |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | - * @return float |
|
| 125 | + * @return integer |
|
| 126 | 126 | */ |
| 127 | 127 | public function x() |
| 128 | 128 | { |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | /** |
| 133 | 133 | * @param array $data |
| 134 | 134 | * @throws Exception |
| 135 | - * @return AbstractResizeEffect Chainable |
|
| 135 | + * @return AbstractCropEffect Chainable |
|
| 136 | 136 | */ |
| 137 | 137 | public function process(array $data = null) |
| 138 | 138 | { |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | /** |
| 154 | 154 | * @param integer $width |
| 155 | 155 | * @param integer $height |
| 156 | - * @param boolean $best_fit |
|
| 156 | + * @param integer $x |
|
| 157 | 157 | * @return void |
| 158 | 158 | */ |
| 159 | 159 | abstract protected function doCrop($x, $y, $width, $height); |
@@ -13,27 +13,27 @@ discard block |
||
| 13 | 13 | abstract class AbstractCropEffect extends AbstractEffect |
| 14 | 14 | { |
| 15 | 15 | /** |
| 16 | - * @var integer $x |
|
| 17 | - */ |
|
| 16 | + * @var integer $x |
|
| 17 | + */ |
|
| 18 | 18 | private $x = 0; |
| 19 | 19 | /** |
| 20 | - * @var integer $y |
|
| 21 | - */ |
|
| 20 | + * @var integer $y |
|
| 21 | + */ |
|
| 22 | 22 | private $y = 0; |
| 23 | 23 | /** |
| 24 | - * @var integer $width |
|
| 25 | - */ |
|
| 24 | + * @var integer $width |
|
| 25 | + */ |
|
| 26 | 26 | private $width = 0; |
| 27 | 27 | /** |
| 28 | - * @var integer $height |
|
| 29 | - */ |
|
| 28 | + * @var integer $height |
|
| 29 | + */ |
|
| 30 | 30 | private $height = 0; |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | - * @param int $width |
|
| 34 | - * @throws InvalidArgumentException |
|
| 35 | - * @return Rotate Chainable |
|
| 36 | - */ |
|
| 33 | + * @param int $width |
|
| 34 | + * @throws InvalidArgumentException |
|
| 35 | + * @return Rotate Chainable |
|
| 36 | + */ |
|
| 37 | 37 | public function setWidth($width) |
| 38 | 38 | { |
| 39 | 39 | if (!is_int($width) || ($width < 0)) { |
@@ -46,18 +46,18 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | - * @return float |
|
| 50 | - */ |
|
| 49 | + * @return float |
|
| 50 | + */ |
|
| 51 | 51 | public function width() |
| 52 | 52 | { |
| 53 | 53 | return $this->width; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | - * @param integer $height |
|
| 58 | - * @throws InvalidArgumentException |
|
| 59 | - * @return $this Chainable |
|
| 60 | - */ |
|
| 57 | + * @param integer $height |
|
| 58 | + * @throws InvalidArgumentException |
|
| 59 | + * @return $this Chainable |
|
| 60 | + */ |
|
| 61 | 61 | public function setHeight($height) |
| 62 | 62 | { |
| 63 | 63 | if (!is_int($height) || ($height < 0)) { |
@@ -70,20 +70,20 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | - * @return float |
|
| 74 | - */ |
|
| 73 | + * @return float |
|
| 74 | + */ |
|
| 75 | 75 | public function height() |
| 76 | 76 | { |
| 77 | 77 | return $this->height; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | /** |
| 81 | - * The X coordinate of the cropped region's top left corner |
|
| 82 | - * |
|
| 83 | - * @param integer $x |
|
| 84 | - * @throws InvalidArgumentException |
|
| 85 | - * @return $this Chainable |
|
| 86 | - */ |
|
| 81 | + * The X coordinate of the cropped region's top left corner |
|
| 82 | + * |
|
| 83 | + * @param integer $x |
|
| 84 | + * @throws InvalidArgumentException |
|
| 85 | + * @return $this Chainable |
|
| 86 | + */ |
|
| 87 | 87 | public function setX($x) |
| 88 | 88 | { |
| 89 | 89 | if (!is_int($x) || ($x < 0)) { |
@@ -96,20 +96,20 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | /** |
| 99 | - * @return float |
|
| 100 | - */ |
|
| 99 | + * @return float |
|
| 100 | + */ |
|
| 101 | 101 | public function x() |
| 102 | 102 | { |
| 103 | 103 | return $this->x; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /** |
| 107 | - * The Y coordinate of the cropped region's top left corner |
|
| 108 | - * |
|
| 109 | - * @param integer $y |
|
| 110 | - * @throws InvalidArgumentException |
|
| 111 | - * @return $this Chainable |
|
| 112 | - */ |
|
| 107 | + * The Y coordinate of the cropped region's top left corner |
|
| 108 | + * |
|
| 109 | + * @param integer $y |
|
| 110 | + * @throws InvalidArgumentException |
|
| 111 | + * @return $this Chainable |
|
| 112 | + */ |
|
| 113 | 113 | public function setY($y) |
| 114 | 114 | { |
| 115 | 115 | if (!is_int($y) || ($y < 0)) { |
@@ -122,18 +122,18 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | - * @return float |
|
| 126 | - */ |
|
| 125 | + * @return float |
|
| 126 | + */ |
|
| 127 | 127 | public function x() |
| 128 | 128 | { |
| 129 | 129 | return $this->x; |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | /** |
| 133 | - * @param array $data |
|
| 134 | - * @throws Exception |
|
| 135 | - * @return AbstractResizeEffect Chainable |
|
| 136 | - */ |
|
| 133 | + * @param array $data |
|
| 134 | + * @throws Exception |
|
| 135 | + * @return AbstractResizeEffect Chainable |
|
| 136 | + */ |
|
| 137 | 137 | public function process(array $data = null) |
| 138 | 138 | { |
| 139 | 139 | if ($data !== null) { |
@@ -151,10 +151,10 @@ discard block |
||
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | /** |
| 154 | - * @param integer $width |
|
| 155 | - * @param integer $height |
|
| 156 | - * @param boolean $best_fit |
|
| 157 | - * @return void |
|
| 158 | - */ |
|
| 154 | + * @param integer $width |
|
| 155 | + * @param integer $height |
|
| 156 | + * @param boolean $best_fit |
|
| 157 | + * @return void |
|
| 158 | + */ |
|
| 159 | 159 | abstract protected function doCrop($x, $y, $width, $height); |
| 160 | 160 | } |
@@ -12,12 +12,12 @@ |
||
| 12 | 12 | class ImagickCropEffect extends AbstractResizeEffect |
| 13 | 13 | { |
| 14 | 14 | /** |
| 15 | - * @param integer $x |
|
| 16 | - * @param integer $y |
|
| 17 | - * @param integer $width |
|
| 18 | - * @param integer $height |
|
| 19 | - * @return void |
|
| 20 | - */ |
|
| 15 | + * @param integer $x |
|
| 16 | + * @param integer $y |
|
| 17 | + * @param integer $width |
|
| 18 | + * @param integer $height |
|
| 19 | + * @return void |
|
| 20 | + */ |
|
| 21 | 21 | protected function doCrop($x, $y, $width, $height) |
| 22 | 22 | { |
| 23 | 23 | $this->image()->imagick()->cropImage($x, $y, $width, $height); |