26 lines
555 B
PHP
26 lines
555 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Actions\Shops;
|
|
|
|
use App\Contracts\Action;
|
|
use App\Contracts\ActionInput;
|
|
use Webmozart\Assert\Assert;
|
|
|
|
/**
|
|
* @implements \App\Contracts\Action<\App\Actions\Shops\DeleteShopInput, bool>
|
|
*/
|
|
final class DeleteShop implements Action
|
|
{
|
|
/**
|
|
* @param \App\Actions\Shops\DeleteShopInput $input
|
|
*/
|
|
#[\Override]
|
|
public function __invoke(ActionInput $input): bool
|
|
{
|
|
Assert::isInstanceOf($input, DeleteShopInput::class);
|
|
|
|
return (bool) $input->shop->deleteOrFail();
|
|
}
|
|
}
|