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

DatabaseTopListWithPoints   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 63.64%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 28
ccs 7
cts 11
cp 0.6364
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 12 1
A getPoints() 0 3 1
A getTime() 0 3 1
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