Completed
Push — 6.0 ( 973f63...cba287 )
by liu
05:40
created

ClassNotFoundException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 71.43%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 20
ccs 5
cts 7
cp 0.7143
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getClass() 0 3 1
1
<?php
2
// +----------------------------------------------------------------------
3
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
4
// +----------------------------------------------------------------------
5
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
6
// +----------------------------------------------------------------------
7
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
8
// +----------------------------------------------------------------------
9
// | Author: yunwuxin <[email protected]>
10
// +----------------------------------------------------------------------
11
12
namespace think\exception;
13
14
use Psr\Container\NotFoundExceptionInterface;
15
use RuntimeException;
16
use Throwable;
17
18
class ClassNotFoundException extends RuntimeException implements NotFoundExceptionInterface
19
{
20
    protected $class;
21
22 3
    public function __construct(string $message, string $class = '', Throwable $previous = null)
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function __construct()
Loading history...
23
    {
24 3
        $this->message = $message;
25 3
        $this->class   = $class;
26
27 3
        parent::__construct($message, 0, $previous);
28 3
    }
29
30
    /**
31
     * 获取类名
32
     * @access public
33
     * @return string
34
     */
35
    public function getClass()
36
    {
37
        return $this->class;
38
    }
39
}
40