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

Memberships   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 27
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getModelClass() 0 3 1
A all() 0 4 1
A create() 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 create(AbstractModel $model): ?AbstractModel
38
    {
39
        throw new MethodNotImplementedException(
40
            "Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT
41
        );
42
    }
43
}
44