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

FuncNotFoundException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 1
rs 10
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