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

DatabaseTopListWithPoints::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 3
dl 0
loc 10
ccs 6
cts 6
cp 1
crap 1
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 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