epository.php$0   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 38
rs 10
wmc 8
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * Copyright (C) 2020-2025 Iain Cambridge
7
 *
8
 * This program is free software: you can redistribute it and/or modify
9
 * it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by
10
 * the Free Software Foundation, either version 2.1 of the License, or
11
 * (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU Lesser General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
 */
21
22
namespace Parthenon\User\Repository;
23
24
use Parthenon\Athena\ResultSet;
25
use Parthenon\User\Entity\MemberInterface;
26
use Parthenon\User\Entity\TeamInterface;
27
28
class DummyTeamRepository implements TeamRepositoryInterface
29
{
30
    public function findById($id)
31
    {
32
        // TODO: Implement findById() method.
33
    }
34
35
    public function save($entity)
36
    {
37
        // TODO: Implement save() method.
38
    }
39
40
    public function getByMember(MemberInterface $member): TeamInterface
41
    {
42
        return new class implements TeamInterface {
43
            public function getId()
44
            {
45
                return null;
46
            }
47
48
            public function addMember(MemberInterface $member): TeamInterface
49
            {
50
                return $this;
51
            }
52
53
            public function hasMember(MemberInterface $member): bool
54
            {
55
                return false;
56
            }
57
58
            public function getMembers(): array
59
            {
60
                return [];
61
            }
62
63
            public function getTeamSize(): int
64
            {
65
                return 0;
66
            }
67
68
            public function setCreatedAt(\DateTime $createdAt): TeamInterface
69
            {
70
                return $this;
71
            }
72
73
            public function setName(?string $name)
74
            {
75
                // TODO: Implement setName() method.
76
            }
77
78
            public function getName(): ?string
79
            {
80
                // TODO: Implement getName() method.
81
            }
82
        };
83
    }
84
85
    public function getList(array $filters = [], string $sortKey = 'id', string $sortType = 'ASC', int $limit = self::LIMIT, $lastId = null): ResultSet
86
    {
87
        return new ResultSet([], $sortKey, $sortType, $limit);
88
    }
89
90
    public function getById($id, $includeDeleted = false)
91
    {
92
        // TODO: Implement getById() method.
93
    }
94
95
    public function delete($entity)
96
    {
97
        // TODO: Implement delete() method.
98
    }
99
100
    public function undelete($entity)
101
    {
102
        // TODO: Implement undelete() method.
103
    }
104
}
105