AccessKeyRepository::delete()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Uxmp\Core\Orm\Repository;
6
7
use Doctrine\ORM\EntityRepository;
8
use Uxmp\Core\Orm\Model\AccessKey;
9
use Uxmp\Core\Orm\Model\AccessKeyInterface;
10
11
/**
12
 * @extends EntityRepository<AccessKey>
13
 *
14
 * @method null|AccessKeyInterface findOneBy(mixed[] $criteria)
15
 */
16
final class AccessKeyRepository extends EntityRepository implements AccessKeyRepositoryInterface
17
{
18 1
    public function prototype(): AccessKeyInterface
19
    {
20 1
        return new AccessKey();
21
    }
22
23 1
    public function save(AccessKeyInterface $accessKey): void
24
    {
25 1
        $this->getEntityManager()->persist($accessKey);
26 1
        $this->getEntityManager()->flush();
27
    }
28
29 1
    public function delete(AccessKeyInterface $accessKey): void
30
    {
31 1
        $this->getEntityManager()->remove($accessKey);
32 1
        $this->getEntityManager()->flush();
33
    }
34
}
35