Completed
Push — master ( b150a8...fa80df )
by Changwan
07:18
created

CannotResolveException::getParameter()   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 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 1
    public function __construct($class, $parameter)
19
    {
20 1
        $this->message = "cannot resolve the \"{$parameter}\" parameter in the \"{$class}\" class.";
21 1
        $this->class = $class;
22 1
        $this->parameter = $parameter;
23 1
    }
24
25
    /**
26
     * @return string
27
     */
28
    public function getClass()
29
    {
30
        return $this->class;
31
    }
32
33
    /**
34
     * @return string
35
     */
36
    public function getParameter()
37
    {
38
        return $this->parameter;
39
    }
40
}
41