Memberships   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

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

4 Methods

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