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 — develop ( 33e0d8...37d09b )
by Baptiste
02:56 queued 50s
created

Exception/RegexException.php (1 issue)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Innmind\Immutable\Exception;
4
5
class RegexException extends \Exception implements ExceptionInterface
6
{
7
    const INTERNAL_ERROR = 1;
8
    const BACKTRACK_LIMIT_ERROR = 2;
9
    const RECURSION_LIMIT_ERROR = 3;
10
    const BAD_UTF8_ERROR = 4;
11
    const BAD_UTF8_OFFSET_ERROR = 5;
12
    const JIT_STACKLIMIT_ERROR = 6;
13
14
    public function __construct($message = '', $code = 0)
15
    {
16
        if ($message === '') {
17
            switch $code {
0 ignored issues
show
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_VARIABLE, expecting '('
Loading history...
18
                case self::INTERNAL_ERROR:
19
                    $message = 'Internal error';
20
                    break;
21
                case self::BACKTRACK_LIMIT_ERROR:
22
                    $message = 'Backtrack limit error';
23
                    break;
24
                case self::RECURSION_LIMIT_ERROR:
25
                    $message = 'Recursion limit error';
26
                    break;
27
                case self::BAD_UTF8_ERROR:
28
                    $message = 'Bad UTF-8 error';
29
                    break;
30
                case self::BAD_UTF8_OFFSET_ERROR:
31
                    $message = 'Bad UTF-8 offset error';
32
                    break;
33
                case self::JIT_STACKLIMIT_ERROR:
34
                    $message = 'JIT stack limit error';
35
                    break;
36
                default:
37
                    $message = 'Regular expression error';
38
            }
39
        }
40
41
        parent::__construct($message, $code);
42
    }
43
}
44