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

DoctrineAbandonedJobMessageStore::remove()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 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