Completed
Push — master ( ddb963...5f6b4c )
by Hugues
07:37
created

ORMPersistentCommandRepository::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace HMLB\DDDBundle\Doctrine\ORM;
4
5
use HMLB\DDD\Entity\Identity;
6
use HMLB\DDD\Message\Command\PersistentCommand;
7
use HMLB\DDDBundle\Repository\PersistentCommandRepository;
8
9
/**
10
 * ORMCommandRepository.
11
 *
12
 * @author Hugues Maignol <[email protected]>
13
 */
14
class ORMPersistentCommandRepository extends AbstractOrmPersistentMessageRepository implements PersistentCommandRepository
15
{
16
    /**
17
     * @param Identity $identity
18
     *
19
     * @return PersistentCommand
20
     */
21
    public function get(Identity $identity): PersistentCommand
22
    {
23
        return $this->em->getRepository(PersistentCommand::class)->find($identity);
24
    }
25
}
26