Passed
Push — master ( 6e6431...f544cb )
by Nico
41:19 queued 16:38
created

ColonySandboxRepository::save()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Orm\Repository;
6
7
use Doctrine\ORM\EntityRepository;
8
use Stu\Orm\Entity\ColonySandbox;
9
use Stu\Orm\Entity\ColonySandboxInterface;
10
11
/**
12
 * @extends EntityRepository<ColonySandbox>
13
 */
14
final class ColonySandboxRepository extends EntityRepository implements ColonySandboxRepositoryInterface
15
{
16
    public function prototype(): ColonySandboxInterface
17
    {
18
        return new ColonySandbox();
19
    }
20
21
    public function save(ColonySandboxInterface $colonySandbox): void
22
    {
23
        $em = $this->getEntityManager();
24
25
        $em->persist($colonySandbox);
26
    }
27
28
    public function delete(ColonySandboxInterface $colonySandbox): void
29
    {
30
        $em = $this->getEntityManager();
31
32
        $em->remove($colonySandbox);
33
    }
34
}
35