for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace AppUtils\ImageHelper;
use AppUtils\ImageHelper_Size;
class RectangleCoordinate
{
private int $x;
private int $y;
private int $width;
private int $height;
public function __construct(int $x, int $y, int $width, int $height)
$this->x = $x;
$this->y = $y;
$this->width = $width;
$this->height = $height;
}
public function getWidth() : int
return $this->width;
public function getHeight() : int
return $this->height;
public function getTopLeft() : PixelCoordinate
return new PixelCoordinate(
$this->x,
$this->y
);
public function getTopRight() : PixelCoordinate
$this->x + $this->width,
public function getBottomLeft() : PixelCoordinate
$this->y + $this->height
public function getBottomRight() : PixelCoordinate
public function getSize() : ImageHelper_Size
return new ImageHelper_Size(array(
));