Test Failed
Push — master ( 0bbeee...5fd70b )
by Hirofumi
02:10
created

DoctrineAbandonedJobMessageStore   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 26
c 0
b 0
f 0
wmc 3
lcom 0
cbo 2
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A all() 0 4 1
A add() 0 4 1
A remove() 0 4 1
1
<?php
2
3
namespace Shippinno\Job\Infrastructure\Domain\Model;
4
5
use Doctrine\ORM\EntityRepository;
6
use Shippinno\Job\Domain\Model\AbandonedJobMessage;
7
use Shippinno\Job\Domain\Model\AbandonedJobMessageStore;
8
9
class DoctrineAbandonedJobMessageStore extends EntityRepository implements AbandonedJobMessageStore
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14
    public function all(): array
15
    {
16
        return $this->findAll();
17
    }
18
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function add(AbandonedJobMessage $abandonedJobMessage): void
23
    {
24
        $this->getEntityManager()->persist($abandonedJobMessage);
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function remove(AbandonedJobMessage $abandonedJobMessage): void
31
    {
32
        $this->getEntityManager()->remove($abandonedJobMessage);
33
    }
34
}
35