Passed
Pull Request — master (#1)
by
unknown
02:19
created

MissingOperatorException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Smoren\FormulaTools\V2\Exceptions;
6
7
class MissingOperatorException extends SyntaxException
8
{
9
    /**
10
     * @readonly
11
     * @var mixed
12
     */
13
    public $found;
14
15
    /**
16
     * @param mixed $token
17
     * @param int $position
18
     */
19
    public function __construct($token, int $position)
20
    {
21
        parent::__construct("Expected an operator, found {$this->stringify($token)}", $position);
22
        $this->found = $token;
23
    }
24
}
25