Add captcha image generation functionality.
This commit is contained in:
45
app/Captcha/Dto/Sector.php
Normal file
45
app/Captcha/Dto/Sector.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Captcha\Dto;
|
||||
|
||||
final readonly class Sector
|
||||
{
|
||||
public function __construct(
|
||||
private int $x,
|
||||
private int $y,
|
||||
private int $width,
|
||||
private int $height,
|
||||
) { }
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getX(): int
|
||||
{
|
||||
return $this->x;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getY(): int
|
||||
{
|
||||
return $this->y;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getWidth(): int
|
||||
{
|
||||
return $this->width;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getHeight(): int
|
||||
{
|
||||
return $this->height;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user