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   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 27
ccs 0
cts 9
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDefault() 0 10 1
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