2026-09-30 11:20:39 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2026-11-10 14:28:00 +01:00
|
|
|
namespace App\Cqs\Actions\Shops;
|
2026-09-30 11:20:39 +02:00
|
|
|
|
|
|
|
|
use App\Contracts\Action;
|
|
|
|
|
use App\Contracts\ActionInput;
|
|
|
|
|
use Webmozart\Assert\Assert;
|
|
|
|
|
|
|
|
|
|
/**
|
2026-11-10 14:28:00 +01:00
|
|
|
* @implements \App\Contracts\Action<\App\Cqs\Actions\Shops\UpdateShopPickupExceptionsInput, bool>
|
2026-09-30 11:20:39 +02:00
|
|
|
*/
|
|
|
|
|
final class UpdateShopPickupExceptions implements Action
|
|
|
|
|
{
|
|
|
|
|
/**
|
2026-11-10 14:28:00 +01:00
|
|
|
* @param \App\Cqs\Actions\Shops\UpdateShopPickupExceptionsInput $input
|
2026-09-30 11:20:39 +02:00
|
|
|
*/
|
|
|
|
|
#[\Override]
|
|
|
|
|
public function __invoke(ActionInput $input): bool
|
|
|
|
|
{
|
|
|
|
|
Assert::isInstanceOf($input, UpdateShopPickupExceptionsInput::class);
|
|
|
|
|
|
|
|
|
|
$input->shop->pickupExceptions()->sync($input->syncData);
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|