Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Push — 1.1 ( fca464...0e73bc )
by Henrique
09:36 queued 06:14
created

Between::__construct()   A

Complexity

Conditions 6
Paths 5

Size

Total Lines 16

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 12
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 16
ccs 12
cts 12
cp 1
rs 9.1111
c 0
b 0
f 0
cc 6
nc 5
nop 3
crap 6
1
<?php
2
3
/*
4
 * This file is part of Respect/Validation.
5
 *
6
 * (c) Alexandre Gomes Gaigalas <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the "LICENSE.md"
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Respect\Validation\Rules;
13
14
use Respect\Validation\Exceptions\ComponentException;
15
16
class Between extends AllOf
17
{
18
    public $minValue;
19
    public $maxValue;
20
21 20
    public function __construct($min = null, $max = null, $inclusive = true)
22
    {
23 20
        $this->minValue = $min;
24 20
        $this->maxValue = $max;
25 20
        if (!is_null($min) && !is_null($max) && $min > $max) {
26 1
            throw new ComponentException(sprintf('%s cannot be less than  %s for validation', $min, $max));
27
        }
28
29 19
        if (!is_null($min)) {
30 19
            $this->addRule(new Min($min, $inclusive));
31 19
        }
32
33 19
        if (!is_null($max)) {
34 19
            $this->addRule(new Max($max, $inclusive));
35 19
        }
36 19
    }
37
}
38