Skip to content

Commit

Permalink
replace references EntityManager by EntityManagerInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
mmadariaga committed Dec 29, 2022
1 parent 1bc73e3 commit 9aee110
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
12 changes: 3 additions & 9 deletions Application/Service/DataGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Ivoz\Core\Application\Service;

use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Ivoz\Core\Application\DataTransferObjectInterface;
use Ivoz\Core\Application\Event\CommandWasExecuted;
use Ivoz\Core\Application\RequestId;
Expand All @@ -18,7 +18,7 @@
class DataGateway
{
/**
* @var EntityManager
* @var EntityManagerInterface
*/
private $em;

Expand Down Expand Up @@ -54,15 +54,9 @@ class DataGateway

/**
* DataGateway constructor.
* @param EntityManager $entityManager
* @param QueryBuilderFactory $queryBuilderFactory
* @param DoctrineEntityPersister $entityPersister
* @param DtoAssembler $dtoAssembler
* @param DomainEventPublisher $eventPublisher
* @param RequestId $requestId
*/
public function __construct(
EntityManager $entityManager,
EntityManagerInterface $entityManager,
QueryBuilderFactory $queryBuilderFactory,
DoctrineEntityPersister $entityPersister,
DtoAssembler $dtoAssembler,
Expand Down
4 changes: 2 additions & 2 deletions Application/Service/EntityTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Ivoz\Core\Application\Service;

use Doctrine\DBAL\LockMode;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\OptimisticLockException;
use Doctrine\ORM\PessimisticLockException;
use Ivoz\Core\Application\DataTransferObjectInterface;
Expand All @@ -25,7 +25,7 @@ class EntityTools
private $entityUpdater;

public function __construct(
EntityManager $entityManager,
EntityManagerInterface $entityManager,
EntityPersisterInterface $entityPersister,
DtoAssembler $dtoAssembler,
CreateEntityFromDto $createEntityFromDto,
Expand Down
6 changes: 3 additions & 3 deletions Application/Service/QueryBuilderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

namespace Ivoz\Core\Application\Service;

use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\QueryBuilder;

class QueryBuilderFactory
{
/**
* @var EntityManager
* @var EntityManagerInterface
*/
private $em;

public function __construct(EntityManager $entityManager)
public function __construct(EntityManagerInterface $entityManager)
{
$this->em = $entityManager;
}
Expand Down
6 changes: 3 additions & 3 deletions Infrastructure/Application/DoctrineForeignKeyTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Ivoz\Core\Infrastructure\Application;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Ivoz\Core\Application\DataTransferObjectInterface;
use Ivoz\Core\Application\ForeignKeyTransformerInterface;
use Ivoz\Core\Application\Helper\EntityClassHelper;
Expand All @@ -12,11 +12,11 @@
class DoctrineForeignKeyTransformer implements ForeignKeyTransformerInterface
{
/**
* @var EntityManager
* @var EntityManagerInterface
*/
private $em;

public function __construct(EntityManager $em)
public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
}
Expand Down

0 comments on commit 9aee110

Please sign in to comment.