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:59 queued 22s
created

MethodException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 20
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A chooseTemplate() 0 4 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