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
Pull Request — master (#825)
by Wouter
03:35
created

BetweenException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 83.33%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 30
ccs 5
cts 6
cp 0.8333
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A chooseTemplate() 0 10 3
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\Exceptions;
13
14
class BetweenException extends NestedValidationException
15
{
16
    const BOTH = 0;
17
    const LOWER = 1;
18
    const GREATER = 2;
19
20
    public static $defaultTemplates = [
21
        self::MODE_DEFAULT => [
22
            self::BOTH => '{{name}} must be between {{minValue}} and {{maxValue}}',
23
            self::LOWER => '{{name}}  must be greater than {{minValue}}',
24
            self::GREATER => '{{name}} must be lower than {{maxValue}}',
25
        ],
26
        self::MODE_NEGATIVE => [
27
            self::BOTH => '{{name}} must not be between {{minValue}} and {{maxValue}}',
28
            self::LOWER => '{{name}}  must not be greater than {{minValue}}',
29
            self::GREATER => '{{name}} must not be lower than {{maxValue}}',
30
        ],
31
    ];
32
33 11
    public function chooseTemplate()
34
    {
35 11
        if (!$this->getParam('minValue')) {
36 4
            return static::GREATER;
37 7
        } elseif (!$this->getParam('maxValue')) {
38
            return static::LOWER;
39
        }
40
41 7
        return static::BOTH;
42
    }
43
}
44