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 ( 50cef7...02ca20 )
by Rolf
03:52
created

ExceptionCommand::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 3
crap 1
1
<?php
2
namespace izzum\command;
3
use izzum\command\Command;
4
5
/**
6
 * throws an exception
7
 *
8
 * @author Rolf Vreijdenberger
9
 *        
10
 */
11
class ExceptionCommand extends Command {
12
    private $exception;
13
    const NULL_MESSAGE = 'null exception';
14
    const NULL_CODE = '1234567890';
15
16 4
    public function __construct($message = self::NULL_MESSAGE, $code = self::NULL_CODE, $previous = null)
17
    {
18 4
        $this->exception = new \Exception($message, $code, $previous);
19 4
    }
20
21 4
    protected function _execute()
22
    {
23 4
        throw $this->exception;
24
    }
25
}