29 lines
655 B
PHP
29 lines
655 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\UpdateShopPickupExceptionsInput, bool>
|
||
|
|
*/
|
||
|
|
final class UpdateShopPickupExceptions implements Action
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* @param \App\Actions\Shops\UpdateShopPickupExceptionsInput $input
|
||
|
|
*/
|
||
|
|
#[\Override]
|
||
|
|
public function __invoke(ActionInput $input): bool
|
||
|
|
{
|
||
|
|
Assert::isInstanceOf($input, UpdateShopPickupExceptionsInput::class);
|
||
|
|
|
||
|
|
$input->shop->pickupExceptions()->sync($input->syncData);
|
||
|
|
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
}
|