Completed
Push — master ( 296743...12eab9 )
by Kirill
36:17
created

CompilerException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 11
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A wrap() 0 4 1
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\Exceptions;
11
12
/**
13
 * An error occurred during the initialization of the compiler.
14
 */
15
class CompilerException extends \LogicException
16
{
17
    /**
18
     * @param \Throwable $e
19
     * @return CompilerException
20
     */
21
    public static function wrap(\Throwable $e): self
22
    {
23
        return new static($e->getMessage(), $e->getCode(), $e);
24
    }
25
}
26