Completed
Pull Request — develop (#745)
by Alejandro
05:29
created

VisitsStats   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
dl 0
loc 13
ccs 4
cts 4
cp 1
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A jsonSerialize() 0 4 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Shlinkio\Shlink\Core\Visit\Model;
6
7
use JsonSerializable;
8
9
final class VisitsStats implements JsonSerializable
10
{
11
    private int $visitsCount;
12
13 12
    public function __construct(int $visitsCount)
14
    {
15 12
        $this->visitsCount = $visitsCount;
16
    }
17
18 1
    public function jsonSerialize(): array
19
    {
20
        return [
21 1
            'visitsCount' => $this->visitsCount,
22
        ];
23
    }
24
}
25