Passed
Push — dev ( 12e9d6...f3475b )
by Nico
35:27
created

LocationMiningRepository::save()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 3
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 6
ccs 0
cts 4
cp 0
crap 2
rs 10
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\LocationMining;
9
use Stu\Orm\Entity\LocationMiningInterface;
10
11
/**
12
 * @extends EntityRepository<LocationMining>
13
 */
14
final class LocationMiningRepository extends EntityRepository implements LocationMiningRepositoryInterface
15
{
16
    public function prototype(): LocationMiningInterface
17
    {
18
        return new LocationMining();
19
    }
20
21
    public function save(LocationMiningInterface $locationMining): void
22
    {
23
        $em = $this->getEntityManager();
24
25
        $em->persist($locationMining);
26
        $em->flush();
27
    }
28
}
29