Completed
Push — master ( 48a801...d2a888 )
by Changwan
03:14
created

NullReferenceException::getClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Wandu\DI\Exception;
3
4
use Interop\Container\Exception\NotFoundException;
5
use Psr\Container\NotFoundExceptionInterface;
6
use RuntimeException;
7
8
class NullReferenceException extends RuntimeException implements NotFoundExceptionInterface, NotFoundException
9
{
10
    /** @var string */
11
    protected $class;
12
    
13
    /**
14
     * @param string $class
15
     */
16 11
    public function __construct($class)
17
    {
18 11
        $this->class = $class;
19 11
        $this->message = "it was not found; \"{$class}\".";
20 11
    }
21
22
    /**
23
     * @return string
24
     */
25 1
    public function getClass()
26
    {
27 1
        return $this->class;
28
    }
29
}
30