Completed
Pull Request — master (#199)
by Alejandro
02:49
created

DeleteShortUrlsOptions::setCheckVisitsThreshold()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
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
    public function getVisitsThreshold(): int
14
    {
15
        return $this->visitsThreshold;
16
    }
17
18
    protected function setVisitsThreshold(int $visitsThreshold): self
19
    {
20
        $this->visitsThreshold = $visitsThreshold;
21
        return $this;
22
    }
23
24
    public function doCheckVisitsThreshold(): bool
25
    {
26
        return $this->checkVisitsThreshold;
27
    }
28
29
    protected function setCheckVisitsThreshold(bool $checkVisitsThreshold): self
30
    {
31
        $this->checkVisitsThreshold = $checkVisitsThreshold;
32
        return $this;
33
    }
34
}
35