feat: suite des rêgles de phparkitect + début d'un domain Shared avec les interfaces CQRS

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2025-03-22 17:48:19 +01:00
parent e444d79101
commit fe92e53be7
6 changed files with 81 additions and 24 deletions

View File

@@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
namespace App\Domain\Shared\Contract;
interface CommandHandlerInterface
{
/**
* @template T of CommandInterface
* @param T $command
* @return void
*/
public function handle(CommandInterface $command): void;
}

View File

@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
namespace App\Domain\Shared\Contract;
interface CommandInterface
{
}

View File

@@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
namespace App\Domain\Shared\Contract;
interface QueryHandlerInterface
{
/**
* @template T of QueryInterface
* @template R of ResponseInterface
* @param T $query
* @return R
*/
public function handle(QueryInterface $query): ResponseInterface;
}

View File

@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
namespace App\Domain\Shared\Contract;
interface QueryInterface
{
}

View File

@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
namespace App\Domain\Shared\Contract;
interface ResponseInterface
{
}