Code Duplication    Length = 10-10 lines in 2 locations

src/Charcoal/Image/Effect/AbstractCropEffect.php 1 location

@@ 61-70 (lines=10) @@
58
     * @throws InvalidArgumentException If the height argument is not valid.
59
     * @return $this Chainable
60
     */
61
    public function setHeight($height)
62
    {
63
        if (!is_int($height) || ($height < 0)) {
64
            throw new InvalidArgumentException(
65
                'Height must be a positive integer'
66
            );
67
        }
68
        $this->height = $height;
69
        return $this;
70
    }
71
72
    /**
73
     * @return float

src/Charcoal/Image/Effect/AbstractResizeEffect.php 1 location

@@ 163-172 (lines=10) @@
160
     * @throws InvalidArgumentException If the height argument is not numeric or lower than 0.
161
     * @return Rotate Chainable
162
     */
163
    public function setHeight($height)
164
    {
165
        if (!is_int($height) || ($height < 0)) {
166
            throw new InvalidArgumentException(
167
                'Height must be a positive integer'
168
            );
169
        }
170
        $this->height = (int)$height;
171
        return $this;
172
    }
173
174
    /**
175
     * @return float