GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( dd213f...9082b5 )
by James
05:12
created

InvalidConfigException::forEmptyConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
crap 1
1
<?php
2
3
4
/**
5
 * This file is part of WebHelper Parser.
6
 *
7
 * (c) James <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace WebHelper\Parser\Exception;
14
15
use DomainException;
16
17
/**
18
 * Invalid configuration file content.
19
 *
20
 * @author James <[email protected]>
21
 */
22
class InvalidConfigException extends DomainException implements ParserExceptionInterface
23
{
24
    /**
25
     * the exception to throw if the configuration file results as an empty active config.
26
     *
27
     * @param string $file file pathname
28
     *
29
     * @return InvalidConfigException the exception to throw
30
     */
31 2
    public static function forEmptyConfig($file)
32
    {
33 2
        return new self(sprintf(
34 2
            'File "%s" returns an empty configuration',
35
            $file
36 2
        ), self::EMPTY_CONFIG);
37
    }
38
39
    /**
40
     * the exception to throw if a directive has no ending key.
41
     *
42
     * @param string $key a directive name
43
     *
44
     * @return InvalidConfigException the exception to throw
45
     */
46 1
    public static function forEndingKeyNotFound($key)
47
    {
48 1
        return new self(sprintf(
49 1
            'No ending directive for %s',
50
            $key
51 1
        ), self::BLOCK_DIRECTIVE_ERROR);
52
    }
53
54
    /**
55
     * the exception to throw if a simple directive does not match against the accepted syntax.
56
     *
57
     * @param string $line the line of the simple directive
58
     *
59
     * @return InvalidConfigException the exception to throw
60
     */
61 1
    public static function forSimpleDirectiveSyntaxError($line)
62
    {
63 1
        return new self(sprintf(
64 1
            'Syntax error for the line "%s"',
65
            $line
66 1
        ), self::SIMPLE_DIRECTIVE_ERROR);
67
    }
68
}
69