TimeEntries   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getModelClass() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Blackmine\Repository\Projects;
6
7
use Blackmine\Model\Project\TimeEntry;
8
use Blackmine\Repository\AbstractRepository;
9
use Blackmine\Repository\RepositoryInterface;
10
11
class TimeEntries extends AbstractRepository
12
{
13
    public const API_ROOT = "time_entries";
14
15
    public const TIME_ENTRY_FILTER_PROJECT_ID = "project_id";
16
    public const TIME_ENTRY_FILTER_USER_ID = "user_id";
17
    public const TIME_ENTRY_FILTER_SPENT_ON = "spent_on";
18
19
    protected static array $allowed_filters = [
20
        self::TIME_ENTRY_FILTER_SPENT_ON => RepositoryInterface::SEARCH_PARAM_TYPE_DATES_ARRAY,
21
        self::TIME_ENTRY_FILTER_USER_ID => RepositoryInterface::SEARCH_PARAM_TYPE_INT,
22
        self::TIME_ENTRY_FILTER_PROJECT_ID => RepositoryInterface::SEARCH_PARAM_TYPE_INT
23
    ];
24
25
    public function getModelClass(): string
26
    {
27
        return TimeEntry::class;
28
    }
29
}
30