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.
Passed
Push — master ( f46a23...825633 )
by Baptiste
04:48
created

RegexException   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 31.82%

Importance

Changes 0
Metric Value
eloc 30
dl 0
loc 37
ccs 7
cts 22
cp 0.3182
rs 10
c 0
b 0
f 0
wmc 8

1 Method

Rating   Name   Duplication   Size   Complexity  
B __construct() 0 28 8
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Immutable\Exception;
5
6
class RegexException extends \Exception implements ExceptionInterface
7
{
8
    const INTERNAL_ERROR = 1;
9
    const BACKTRACK_LIMIT_ERROR = 2;
10
    const RECURSION_LIMIT_ERROR = 3;
11
    const BAD_UTF8_ERROR = 4;
12
    const BAD_UTF8_OFFSET_ERROR = 5;
13
    const JIT_STACKLIMIT_ERROR = 6;
14
15 4
    public function __construct($message = '', $code = 0)
16
    {
17 4
        if ($message === '') {
18
            switch ($code) {
19 4
                case self::INTERNAL_ERROR:
20
                    $message = 'Internal error';
21
                    break;
22 4
                case self::BACKTRACK_LIMIT_ERROR:
23 4
                    $message = 'Backtrack limit error';
24 4
                    break;
25
                case self::RECURSION_LIMIT_ERROR:
26
                    $message = 'Recursion limit error';
27
                    break;
28
                case self::BAD_UTF8_ERROR:
29
                    $message = 'Bad UTF-8 error';
30
                    break;
31
                case self::BAD_UTF8_OFFSET_ERROR:
32
                    $message = 'Bad UTF-8 offset error';
33
                    break;
34
                case self::JIT_STACKLIMIT_ERROR:
35
                    $message = 'JIT stack limit error';
36
                    break;
37
                default:
38
                    $message = 'Regular expression error';
39
            }
40
        }
41
42 4
        parent::__construct($message, $code);
43 4
    }
44
}
45