ParserException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 3
c 2
b 1
f 0
dl 0
loc 10
ccs 2
cts 4
cp 0.5
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A missingLookaheadType() 0 3 1
A withThrowable() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Exception;
6
7
class ParserException extends \RuntimeException
8
{
9
    public static function missingLookaheadType(): self
10
    {
11
        return new self("The parser's 'lookahead' property is not populated with a type");
12
    }
13
14 28
    public static function withThrowable(\Throwable $throwable): self
15
    {
16 28
        return new self($throwable->getMessage(), $throwable->getCode(), $throwable);
17
    }
18
}
19