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 (#678)
by Henrique
02:53
created

Templates::getDefault()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 10
ccs 0
cts 9
cp 0
rs 9.4285
cc 1
eloc 7
nc 1
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\Message;
13
14
use Doctrine\Common\Annotations\Annotation\Required;
15
16
/**
17
 * @Annotation
18
 * @Target("CLASS")
19
 */
20
final class Templates
21
{
22
    /**
23
     * @Required
24
     *
25
     * @var array<Respect\Validation\Annotations\Template>
26
     */
27
    public $regular;
28
29
    /**
30
     * @Required
31
     *
32
     * @var array<Respect\Validation\Annotations\Template>
33
     */
34
    public $inverted;
35
36
    public static function getDefault(): self
37
    {
38
        $templates = new self();
39
        $templates->regular[0] = new Template();
40
        $templates->regular[0]->message = '{{placeholder}} must be valid';
41
        $templates->inverted[0] = new Template();
42
        $templates->inverted[0]->message = '{{placeholder}} must not be valid';
43
44
        return $templates;
45
    }
46
}
47