Test Failed
Branch feature/v1_stable_fixes (e805e7)
by Diego
04:22
created

Roles   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
c 0
b 0
f 0
dl 0
loc 36
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getModelClass() 0 3 1
A update() 0 4 1
A create() 0 4 1
A delete() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Blackmine\Repository\Users;
6
7
use Blackmine\Exception\MethodNotImplementedException;
8
use Blackmine\Model\AbstractModel;
9
use Blackmine\Model\User\Role;
10
use Blackmine\Repository\AbstractRepository;
11
12
class Roles extends AbstractRepository
13
{
14
    public const API_ROOT = "roles";
15
16
    public function getModelClass(): string
17
    {
18
        return Role::class;
19
    }
20
21
    /**
22
     * @throws MethodNotImplementedException
23
     */
24
    public function create(AbstractModel $model): ?AbstractModel
25
    {
26
        throw new MethodNotImplementedException(
27
            "Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT
28
        );
29
    }
30
31
    /**
32
     * @throws MethodNotImplementedException
33
     */
34
    public function update(AbstractModel $model): ?AbstractModel
35
    {
36
        throw new MethodNotImplementedException(
37
            "Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT
38
        );
39
    }
40
41
    /**
42
     * @throws MethodNotImplementedException
43
     */
44
    public function delete(AbstractModel $model): void
45
    {
46
        throw new MethodNotImplementedException(
47
            "Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT
48
        );
49
    }
50
}
51