1
0
mirror of synced 2025-02-02 21:41:45 +03:00

Add type hint for entity manager

This commit is contained in:
Bocharsky Victor 2015-07-29 21:49:49 +03:00 committed by victor
parent 71b1dde096
commit dbd3fa4501

View File

@ -19,6 +19,7 @@
namespace Doctrine\ORM; namespace Doctrine\ORM;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Query\ResultSetMappingBuilder; use Doctrine\ORM\Query\ResultSetMappingBuilder;
use Doctrine\Common\Persistence\ObjectRepository; use Doctrine\Common\Persistence\ObjectRepository;
use Doctrine\Common\Collections\Selectable; use Doctrine\Common\Collections\Selectable;
@ -61,7 +62,7 @@ class EntityRepository implements ObjectRepository, Selectable
* @param EntityManager $em The EntityManager to use. * @param EntityManager $em The EntityManager to use.
* @param Mapping\ClassMetadata $class The class descriptor. * @param Mapping\ClassMetadata $class The class descriptor.
*/ */
public function __construct($em, Mapping\ClassMetadata $class) public function __construct(EntityManagerInterface $em, Mapping\ClassMetadata $class)
{ {
$this->_entityName = $class->name; $this->_entityName = $class->name;
$this->_em = $em; $this->_em = $em;