Relations   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
c 0
b 0
f 0
dl 0
loc 46
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getModelClass() 0 3 1
A all() 0 4 1
A update() 0 4 1
A search() 0 4 1
A create() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Blackmine\Repository\Issues;
6
7
use Blackmine\Exception\MethodNotImplementedException;
8
use Blackmine\Model\AbstractModel;
9
use Blackmine\Model\Issue\Relation;
10
use Blackmine\Repository\AbstractRepository;
11
use Doctrine\Common\Collections\ArrayCollection;
12
use Error;
13
14
class Relations extends AbstractRepository
15
{
16
    public const API_ROOT = "relations";
17
18
    public function getModelClass(): string
19
    {
20
        return Relation::class;
21
    }
22
23
    /**
24
     * @throws MethodNotImplementedException
25
     */
26
    public function create(AbstractModel $model): ?AbstractModel
27
    {
28
        throw new MethodNotImplementedException(
29
            "Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT
30
        );
31
    }
32
33
    /**
34
     * @throws MethodNotImplementedException
35
     */
36
    public function search(array $params = []): ArrayCollection
37
    {
38
        throw new MethodNotImplementedException(
39
            "Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT
40
        );
41
    }
42
43
    /**
44
     * @throws MethodNotImplementedException
45
     */
46
    public function update(AbstractModel $model): ?AbstractModel
47
    {
48
        throw new MethodNotImplementedException(
49
            "Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT
50
        );
51
    }
52
53
    /**
54
     * @throws MethodNotImplementedException
55
     */
56
    public function all(?string $endpoint = null): ArrayCollection
57
    {
58
        throw new MethodNotImplementedException(
59
            "Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT
60
        );
61
    }
62
}
63