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 (#671)
by Michael
04:31
created

MethodException::chooseTemplate()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 2
eloc 2
nc 2
nop 0
crap 2
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 MethodException extends NestedValidationException
15
{
16
    const NOT_PRESENT = 0;
17
    const INVALID = 1;
18
    public static $defaultTemplates = [
19
        self::MODE_DEFAULT => [
20
            self::NOT_PRESENT => 'Method {{name}} must be present',
21
            self::INVALID => 'Method {{name}} must be valid',
22
        ],
23
        self::MODE_NEGATIVE => [
24
            self::NOT_PRESENT => 'Method {{name}} must not be present',
25
            self::INVALID => 'Method {{name}} must not validate',
26
        ],
27
    ];
28
29 4
    public function chooseTemplate()
30
    {
31 4
        return $this->getParam('hasReference') ? static::INVALID : static::NOT_PRESENT;
32
    }
33
}
34