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.

ParseException   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 38
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A createMessage() 0 12 3
1
<?php
2
3
/**
4
 * This file is part of the m1\env library
5
 *
6
 * (c) m1 <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * @package     m1/env
12
 * @version     2.0.0
13
 * @author      Miles Croxford <[email protected]>
14
 * @copyright   Copyright (c) Miles Croxford <[email protected]>
15
 * @license     http://github.com/m1/env/blob/master/LICENSE.md
16
 * @link        http://github.com/m1/env/blob/master/README.md Documentation
17
 */
18
19
namespace M1\Env\Exception;
20
21
/**
22
 * Env ParseException
23
 *
24
 * @since 0.1.0
25
 */
26
class ParseException extends \ErrorException
27
{
28
    /**
29
     * Constructs a ParseException
30
     *
31
     * @param string $message          The value to parse
32
     * @param string $line             The line of the value
33
     * @param int    $line_num         The line num of the value
34
     */
35 21
    public function __construct($message, $line = null, $line_num = null)
36
    {
37 21
        $message = $this->createMessage($message, $line, $line_num);
38
39 21
        parent::__construct($message);
40 21
    }
41
42
    /**
43
     * Constructs a ParseException message
44
     *
45
     * @param string $message          The value to parse
46
     * @param string $line             The line of the value
47
     * @param int    $line_num         The line num of the value
48
     *
49
     * @return string The exception message
50
     */
51 21
    private function createMessage($message, $line, $line_num)
52
    {
53 21
        if (!is_null($line)) {
54 21
            $message .= sprintf(" near %s", $line);
55 21
        }
56
57 21
        if (!is_null($line_num)) {
58 21
            $message .= sprintf(" at line %d", $line_num);
59 21
        }
60
61 21
        return $message;
62
    }
63
}
64