Use EntityManagerInterface.

This commit is contained in:
Pol Dellaiera 2021-05-06 12:34:16 +02:00
parent 7f602ffa47
commit c5940c1263
2 changed files with 18 additions and 14 deletions

View File

@ -27,6 +27,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Doctrine\Persistence\ObjectManager;
use Chill\MainBundle\Form\Type\Select2ChoiceType;
use Doctrine\ORM\EntityManagerInterface;
/**
* A type to select the marital status
@ -38,10 +39,12 @@ class Select2MaritalStatusType extends AbstractType
/** @var RequestStack */
private $requestStack;
/** @var ObjectManager */
/**
* @var EntityManagerInterface
*/
private $em;
public function __construct(RequestStack $requestStack,ObjectManager $em)
public function __construct(RequestStack $requestStack, EntityManagerInterface $em)
{
$this->requestStack = $requestStack;
$this->em = $em;

View File

@ -21,6 +21,7 @@ namespace Chill\PersonBundle\Timeline;
use Chill\MainBundle\Timeline\TimelineProviderInterface;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
/**
* Provide method to build timeline for accompanying periods
@ -34,11 +35,11 @@ abstract class AbstractTimelineAccompanyingPeriod implements TimelineProviderInt
{
/**
*
* @var EntityManager
* @var EntityManagerInterface
*/
protected $em;
public function __construct(EntityManager $em)
public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
}