Queries   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 56
rs 10
wmc 6

6 Methods

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