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 (#817)
by Henrique
06:24
created

NameException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 30
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A chooseTemplate() 0 8 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 NameException extends ValidationException
15
{
16
    const WITH_LOCALE = 2;
17
18
    /**
19
     * @var array
20
     */
21
    public static $defaultTemplates = [
22
        self::MODE_DEFAULT => [
23
            self::STANDARD => '{{name}} must be a valid name',
24
            self::WITH_LOCALE => '{{name}} must be a valid {{locale}} name',
25
        ],
26
        self::MODE_NEGATIVE => [
27
            self::STANDARD => '{{name}} must not be a valid name',
28
            self::WITH_LOCALE => '{{name}} must not be a valid {{locale}} name',
29
        ],
30
    ];
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function chooseTemplate()
36
    {
37
        if ($this->getParam('locale')) {
38
            return static::WITH_LOCALE;
39
        }
40
41
        return parent::chooseTemplate();
42
    }
43
}
44