DeleteShortUrlsOptions   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 25
rs 10
c 0
b 0
f 0
ccs 10
cts 10
cp 1
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getVisitsThreshold() 0 3 1
A setCheckVisitsThreshold() 0 4 1
A setVisitsThreshold() 0 4 1
A doCheckVisitsThreshold() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Shlinkio\Shlink\Core\Options;
6
7
use Laminas\Stdlib\AbstractOptions;
8
9
use const Shlinkio\Shlink\Core\DEFAULT_DELETE_SHORT_URL_THRESHOLD;
0 ignored issues
show
Bug introduced by
The constant Shlinkio\Shlink\Core\DEF...ETE_SHORT_URL_THRESHOLD was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
10
11
class DeleteShortUrlsOptions extends AbstractOptions
12
{
13
    private int $visitsThreshold = DEFAULT_DELETE_SHORT_URL_THRESHOLD;
14
    private bool $checkVisitsThreshold = true;
15
16 3
    public function getVisitsThreshold(): int
17
    {
18 3
        return $this->visitsThreshold;
19
    }
20
21 5
    protected function setVisitsThreshold(int $visitsThreshold): self
22
    {
23 5
        $this->visitsThreshold = $visitsThreshold;
24 5
        return $this;
25
    }
26
27 4
    public function doCheckVisitsThreshold(): bool
28
    {
29 4
        return $this->checkVisitsThreshold;
30
    }
31
32 5
    protected function setCheckVisitsThreshold(bool $checkVisitsThreshold): self
33
    {
34 5
        $this->checkVisitsThreshold = $checkVisitsThreshold;
35 5
        return $this;
36
    }
37
}
38