VisitsStats   A
last analyzed

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 5
cts 5
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 13
    public function __construct(int $visitsCount)
14
    {
15 13
        $this->visitsCount = $visitsCount;
16 13
    }
17
18 2
    public function jsonSerialize(): array
19
    {
20
        return [
21 2
            'visitsCount' => $this->visitsCount,
22
        ];
23
    }
24
}
25