Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | | | ## Description de la PR ## Modification du .env ## Check list - [x] Pas de régression - [ ] TU/TI/TF rédigée - [x] TU/TI/TF OK - [x] CHANGELOG modifié Reviewed-on: #55 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
30 lines
698 B
PHP
30 lines
698 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\State\Bovin;
|
|
|
|
use ApiPlatform\Metadata\Operation;
|
|
use ApiPlatform\State\ProcessorInterface;
|
|
use App\ApiResource\BovineSyncInventoryResult;
|
|
use App\Service\BovineInventorySyncer;
|
|
|
|
/**
|
|
* @implements ProcessorInterface<mixed, BovineSyncInventoryResult>
|
|
*/
|
|
final readonly class BovineSyncInventoryProcessor implements ProcessorInterface
|
|
{
|
|
public function __construct(
|
|
private BovineInventorySyncer $syncer,
|
|
) {}
|
|
|
|
public function process(
|
|
mixed $data,
|
|
Operation $operation,
|
|
array $uriVariables = [],
|
|
array $context = [],
|
|
): BovineSyncInventoryResult {
|
|
return $this->syncer->sync();
|
|
}
|
|
}
|