Passed
Pull Request — master (#1657)
by Nico
09:45
created

DatabaseTopListWithPoints   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 19
ccs 6
cts 8
cp 0.75
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A getPoints() 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 1
    public function __construct(
14
        UserRepositoryInterface $userRepository,
15
        int $userId,
16
        string $points
17
    ) {
18 1
        parent::__construct(
19 1
            $userRepository,
20 1
            $userId
21 1
        );
22 1
        $this->points = $points;
23
    }
24
25
    public function getPoints(): string
26
    {
27
        return $this->points;
28
    }
29
}
30