Completed
Push — master ( 5b9784...ff8441 )
by Alejandro
12s
created

DeleteShortUrlsOptions::setCheckVisitsThreshold()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Shlinkio\Shlink\Core\Options;
5
6
use Zend\Stdlib\AbstractOptions;
7
8
class DeleteShortUrlsOptions extends AbstractOptions
9
{
10
    private $visitsThreshold = 15;
11
    private $checkVisitsThreshold = true;
12
13 2
    public function getVisitsThreshold(): int
14
    {
15 2
        return $this->visitsThreshold;
16
    }
17
18 4
    protected function setVisitsThreshold(int $visitsThreshold): self
19
    {
20 4
        $this->visitsThreshold = $visitsThreshold;
21 4
        return $this;
22
    }
23
24 3
    public function doCheckVisitsThreshold(): bool
25
    {
26 3
        return $this->checkVisitsThreshold;
27
    }
28
29 4
    protected function setCheckVisitsThreshold(bool $checkVisitsThreshold): self
30
    {
31 4
        $this->checkVisitsThreshold = $checkVisitsThreshold;
32 4
        return $this;
33
    }
34
}
35