Version 0.7.0 #1

Merged
kor-elf merged 90 commits from develop into main 2023-12-08 21:18:23 +06:00
2 changed files with 26 additions and 0 deletions
Showing only changes of commit 81635b4efa - Show all commits

View File

@ -0,0 +1,8 @@
<?php declare(strict_types=1);
namespace App\Captcha\Contracts;
interface ImageManager
{
public function createImage(int $width, int $height): Image;
}

View File

@ -0,0 +1,18 @@
<?php declare(strict_types=1);
namespace App\Captcha\Images;
use App\Captcha\Contracts\Image;
use App\Captcha\Contracts\ImageManager as ImageManagerContract;
final class ImageManager implements ImageManagerContract
{
public function __construct(
private readonly string $imageClassName
) { }
public function createImage(int $width, int $height): Image
{
return new $this->imageClassName($width, $height);
}
}