Completed
Push — master ( 1e8320...6a42b9 )
by Kirill
03:17
created

CompilerException::getFullTraceAsString()   B

Complexity

Conditions 6
Paths 7

Size

Total Lines 20

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 42

Importance

Changes 0
Metric Value
cc 6
nc 7
nop 0
dl 0
loc 20
ccs 0
cts 16
cp 0
crap 42
rs 8.9777
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of Railt package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
declare(strict_types=1);
9
10
namespace Railt\SDL\Exception;
11
12
use Railt\Io\Exception\ExternalFileException;
13
use Railt\Reflection\Contracts\Definition;
14
15
/**
16
 * Class CompilerException
17
 */
18
class CompilerException extends ExternalFileException
19
{
20
    /**
21
     * @param string $message
22
     * @param array $args
23
     * @return CompilerException
24
     */
25
    public function rename(string $message, ...$args): self
26
    {
27
        $this->message = \sprintf($message, ...$args);
28
29
        return $this;
30
    }
31
32
    /**
33
     * @param Definition $def
34
     * @return CompilerException
35
     */
36
    public function in(Definition $def): self
37
    {
38
        $this->throwsIn($def->getFile(), $def->getLine(), $def->getColumn());
39
40
        return $this;
41
    }
42
}
43