src/Image.php
public function crop($xoffset, $yoffset, $width, $height)
    {
        if ($xoffset === null) {
            throw new \LogicException('"xoffset" must not be null for "crop"');
        }

        if ($yoffset === null) {
            throw new \LogicException('"yoffset" must not be null for "crop"');
        }

        if ($width === null) {
            throw new \LogicException('"width" must not be null for "crop"');
        }

        if ($height === null) {
            throw new \LogicException('"height" must not be null for "crop"');
        }

        $this->image->crop($width, $height, $xoffset, $yoffset);
    }
public function crop($xoffset, $yoffset, $width, $height)
    {
        if ($xoffset === null) {
            throw new \LogicException('"xoffset" must not be null for "crop"');
        }

        if ($yoffset === null) {
            throw new \LogicException('"yoffset" must not be null for "crop"');
        }

        if ($width === null) {
            throw new \LogicException('"width" must not be null for "crop"');
        }

        if ($height === null) {
            throw new \LogicException('"height" must not be null for "crop"');
        }

        $this->image->crop($width, $height, $xoffset, $yoffset);
    }
public function crop ( $ xoffset , $ yoffset , $ width , $ height ) { if ( $ xoffset === null ) { throw new \ LogicException ( '"xoffset" must not be null for "crop"' ) ; } if ( $ yoffset === null ) { throw new \ LogicException ( '"yoffset" must not be null for "crop"' ) ; } if ( $ width === null ) { throw new \ LogicException ( '"width" must not be null for "crop"' ) ; } if ( $ height === null ) { throw new \ LogicException ( '"height" must not be null for "crop"' ) ; } $ this -> image -> crop ( $ width , $ height , $ xoffset , $ yoffset ) ; }
Crop an image to the rectangle specified by the given rectangle.

@param int $xoffset
The top left coordinate, in pixels, of the crop area (x axis value).
@param int $yoffset
The top left coordinate, in pixels, of the crop area (y axis value).
@param int $width
The target width, in pixels.
@param int $height
The target height, in pixels.

@throws \LogicException if the parameters are wrong
Crop an image to the rectangle specified by the given rectangle .