ReaderException::unableToReadClass()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 2
crap 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Leaditin\Annotations\Exception;
6
7
/**
8
 * Class ReaderException
9
 *
10
 * @package Leaditin\Annotations\Exception
11
 * @author Igor Vuckovic <[email protected]>
12
 */
13
class ReaderException extends \LogicException
14
{
15
    /**
16
     * @param string $class
17
     * @param \Exception $previous
18
     * @return ReaderException
19
     */
20 1
    public static function unableToReadClass(string $class, \Exception $previous) : ReaderException
21
    {
22 1
        return new self(
23 1
            sprintf('Unable to read class "%s"', $class),
24 1
            0,
25 1
            $previous
26
        );
27
    }
28
}
29