Completed
Push — master ( a72876...48a801 )
by Changwan
04:53
created

CannotChangeException::getClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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