Completed
Push — master ( eb17ea...a61a7d )
by Alejandro
26s queued 11s
created

UrlShortenerOptions::setValidateUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Shlinkio\Shlink\Core\Options;
6
7
use Zend\Stdlib\AbstractOptions;
8
9
class UrlShortenerOptions extends AbstractOptions
10
{
11
    // phpcs:disable
12
    protected $__strictMode__ = false;
13
    // phpcs:enable
14
15
    private $validateUrl = true;
16
17 5
    public function isUrlValidationEnabled(): bool
18
    {
19 5
        return $this->validateUrl;
20
    }
21
22 15
    protected function setValidateUrl($validateUrl): self
23
    {
24 15
        $this->validateUrl = (bool) $validateUrl;
25 15
        return $this;
26
    }
27
}
28