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 (#963)
by Emmerson
04:06 queued 11s
created

KeyNestedException::chooseTemplate()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 2
eloc 1
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
declare(strict_types=1);
13
14
namespace Respect\Validation\Exceptions;
15
16
/**
17
 * Exceptions to be thrown by the Attribute Rule.
18
 *
19
 * @author Emmerson Siqueira <[email protected]>
20
 * @author Henrique Moody <[email protected]>
21
 */
22
final class KeyNestedException extends NestedValidationException implements NonOmissibleException
23
{
24
    public const NOT_PRESENT = 'not_present';
25
    public const INVALID = 'invalid';
26
27
    public static $defaultTemplates = [
28
        self::MODE_DEFAULT => [
29
            self::NOT_PRESENT => 'No items were found for key chain {{name}}',
30
            self::INVALID => 'Key chain {{name}} is not valid',
31
        ],
32
        self::MODE_NEGATIVE => [
33
            self::NOT_PRESENT => 'Items for key chain {{name}} must not be present',
34
            self::INVALID => 'Key chain {{name}} must not be valid',
35
        ],
36
    ];
37
38
    /**
39
     * {@inheritdoc}
40
     */
41 4
    protected function chooseTemplate(): string
42
    {
43 4
        return $this->getParam('hasReference') ? static::INVALID : static::NOT_PRESENT;
44
    }
45
}
46