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

Passed
Pull Request — master (#952)
by Henrique
03:27
created

TimeException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 25
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 8 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
declare(strict_types=1);
13
14
namespace Respect\Validation\Exceptions;
15
16
/**
17
 * @author Henrique Moody <[email protected]>
18
 */
19
final class TimeException extends ValidationException
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public static $defaultTemplates = [
25
        self::MODE_DEFAULT => [
26
            self::STANDARD => '{{name}} must be a valid time in the format {{sample}}',
27
        ],
28
        self::MODE_NEGATIVE => [
29
            self::STANDARD => '{{name}} must not be a valid time in the format {{sample}}',
30
        ],
31
    ];
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function configure($name, array $params = [])
37
    {
38
        $params['sample'] = date(
39
            $params['format'],
40
            strtotime('23:59:59')
41
        );
42
43
        return parent::configure($name, $params);
44
    }
45
}
46