Completed
Pull Request — 6.0 (#2058)
by nhzex
05:48
created

FuncNotFoundException   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
c 1
b 0
f 0
dl 0
loc 20
ccs 5
cts 7
cp 0.7143
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFunc() 0 3 1
A __construct() 0 6 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace think\exception;
4
5
use Psr\Container\NotFoundExceptionInterface;
6
use RuntimeException;
7
use Throwable;
8
9
class FuncNotFoundException extends RuntimeException implements NotFoundExceptionInterface
10
{
11
    protected $func;
12
13 2
    public function __construct(string $message, string $func = '', Throwable $previous = null)
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function __construct()
Loading history...
14
    {
15 2
        $this->message = $message;
16 2
        $this->func   = $func;
17
18 2
        parent::__construct($message, 0, $previous);
19 2
    }
20
21
    /**
22
     * 获取方法名
23
     * @access public
24
     * @return string
25
     */
26
    public function getFunc()
27
    {
28
        return $this->func;
29
    }
30
}
31