Completed
Push — master ( 3deaa5...4c5cb4 )
by Changwan
06:31
created

ClassNotFoundException::getClassName()   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\Database\Exception;
3
4
use RuntimeException;
5
6
class ClassNotFoundException extends RuntimeException
7
{
8
    /** @var string */
9
    protected $className;
10
    
11 1
    public function __construct($className)
12
    {
13 1
        $this->className = $className;
14 1
        $this->message = "Class '{$className}' not found in {$this->getFile()} code on line {$this->getLine()}";
15 1
    }
16
17
    /**
18
     * @return string
19
     */
20 1
    public function getClassName()
21
    {
22 1
        return $this->className;
23
    }
24
}
25