Skip to content

Commit

Permalink
move ProductSearch to application layer
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebase committed Apr 19, 2024
1 parent d8a3f01 commit 7e20aaa
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Healtho\Catalogue\Management\Application\Command;

use Healtho\Catalogue\Management\Application\Query\ProductSearch;
use Healtho\Catalogue\Management\Domain\NotFound;
use Healtho\Catalogue\Management\Domain\Product\Product;
use Healtho\Catalogue\Management\Domain\Product\ProductSearch;

trait CatalogueManagementTrait
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Healtho\Catalogue\Management\Application\Command;

use Healtho\Catalogue\Management\Application\Query\ProductSearch;
use Healtho\Catalogue\Management\Domain\Product\DuplicatedProduct;
use Healtho\Catalogue\Management\Domain\Product\Product;
use Healtho\Catalogue\Management\Domain\Product\ProductSearch;

trait ProductManagementTrait
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Healtho\Catalogue\Management\Application\Command;

use Healtho\Catalogue\Management\Application\Query\VariantSearch;
use Healtho\Catalogue\Management\Domain\NotFound;
use Healtho\Catalogue\Management\Domain\Variant\Variant;
use Healtho\Catalogue\Management\Domain\Variant\VariantRepository;
use Healtho\Catalogue\Management\Domain\Variant\VariantSearch;

class UpdateVariantHandler
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Healtho\Catalogue\Management\Domain\Product;
namespace Healtho\Catalogue\Management\Application\Query;

final readonly class ProductSearch
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Healtho\Catalogue\Management\Domain\Variant;
namespace Healtho\Catalogue\Management\Application\Query;

final readonly class VariantSearch
{
Expand Down
2 changes: 2 additions & 0 deletions src/Catalogue/Management/Domain/Product/ProductRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Healtho\Catalogue\Management\Domain\Product;

use Healtho\Catalogue\Management\Application\Query\ProductSearch;

interface ProductRepository
{
public function findOneWith(ProductSearch $parameters): ?Product;
Expand Down
2 changes: 2 additions & 0 deletions src/Catalogue/Management/Domain/Variant/VariantRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Healtho\Catalogue\Management\Domain\Variant;

use Healtho\Catalogue\Management\Application\Query\VariantSearch;

interface VariantRepository
{
public function findOneWith(VariantSearch $parameters): ?Variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use Doctrine\ORM\NonUniqueResultException;
use Doctrine\ORM\QueryBuilder;
use Doctrine\Persistence\ManagerRegistry;
use Healtho\Catalogue\Management\Application\Query\ProductSearch;
use Healtho\Catalogue\Management\Domain\Product\Product;
use Healtho\Catalogue\Management\Domain\Product\ProductRepository;
use Healtho\Catalogue\Management\Domain\Product\ProductSearch;

class DoctrineProductRepository extends ServiceEntityRepository implements ProductRepository
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use Doctrine\ORM\NonUniqueResultException;
use Doctrine\ORM\QueryBuilder;
use Doctrine\Persistence\ManagerRegistry;
use Healtho\Catalogue\Management\Application\Query\VariantSearch;
use Healtho\Catalogue\Management\Domain\Variant\Variant;
use Healtho\Catalogue\Management\Domain\Variant\VariantRepository;
use Healtho\Catalogue\Management\Domain\Variant\VariantSearch;

class DoctrineVariantRepository extends ServiceEntityRepository implements VariantRepository
{
Expand Down

0 comments on commit 7e20aaa

Please sign in to comment.