ExpenseClaimRepositoryTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 13
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A providerGetAccessibleSubQuery() 0 11 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ApplicationTest\Repository;
6
7
use Application\Model\ExpenseClaim;
8
use Application\Repository\ExpenseClaimRepository;
9
use ApplicationTest\Traits\LimitedAccessSubQuery;
10
11
class ExpenseClaimRepositoryTest extends AbstractRepositoryTest
12
{
13
    use LimitedAccessSubQuery;
14
15
    private ExpenseClaimRepository $repository;
16
17
    protected function setUp(): void
18
    {
19
        parent::setUp();
20
        $this->repository = $this->getEntityManager()->getRepository(ExpenseClaim::class);
21
    }
22
23
    public function providerGetAccessibleSubQuery(): iterable
24
    {
25
        $all = [7000, 7001, 7002, 7003, 7004, 7005];
26
27
        $family = [7000, 7001, 7002, 7003, 7005];
28
        yield ['anonymous', []];
29
        yield ['bookingonly', []];
30
        yield ['individual', $family];
31
        yield ['member', $family];
32
        yield ['responsible', $all];
33
        yield ['administrator', $all];
34
    }
35
}
36