Completed
Push — master ( fa80df...2a61b3 )
by Changwan
03:32
created

CannotResolveException::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 RuntimeException;
5
6
class CannotResolveException extends RuntimeException
7
{
8
    /** @var string */
9
    protected $class;
10
11
    /** @var string */
12
    protected $parameter;
13
14
    /**
15
     * @param string $class
16
     * @param string $parameter
17
     */
18 8
    public function __construct($class, $parameter)
19
    {
20 8
        $this->message = "cannot resolve the \"{$parameter}\" parameter in the \"{$class}\" class.";
21 8
        $this->class = $class;
22 8
        $this->parameter = $parameter;
23 8
    }
24
25
    /**
26
     * @return string
27
     */
28 7
    public function getClass()
29
    {
30 7
        return $this->class;
31
    }
32
33
    /**
34
     * @return string
35
     */
36 7
    public function getParameter()
37
    {
38 7
        return $this->parameter;
39
    }
40
}
41