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

ORMPersistentCommandRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 4 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