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.

InvalidConfigException::forEmptyConfig()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

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