Passed
Push — master ( c6b44f...9adfc9 )
by Nico
52:13 queued 29:13
created

DatabaseTopListWithPoints::getTime()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Module\Database\Lib;
6
7
use Stu\Orm\Repository\UserRepositoryInterface;
8
9
class DatabaseTopListWithPoints extends DatabaseTopList
10
{
11
    private string $points;
12
13
    private ?int $time;
14
15 1
    public function __construct(
16
        UserRepositoryInterface $userRepository,
17
        int $userId,
18
        string $points,
19
        ?int $time
20
    ) {
21 1
        parent::__construct(
22 1
            $userRepository,
23 1
            $userId
24 1
        );
25 1
        $this->points = $points;
26 1
        $this->time = $time;
27
    }
28
29
    public function getPoints(): string
30
    {
31
        return $this->points;
32
    }
33
34
    public function getTime(): ?int
35
    {
36
        return $this->time;
37
    }
38
}
39