SimpleDIException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 18
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A make() 0 8 3
1
<?php namespace SimpleDI\Exception;
2
3
use Exception;
4
5
/**
6
 * Basic exception
7
 *
8
 * @package    SimpleDI
9
 * @author     Kai Hempel <[email protected]>
10
 * @copyright  2015 Kai Hempel <[email protected]>
11
 * @license    http://www.opensource.org/licenses/BSD-3-Clause  The BSD 3-Clause License
12
 * @link       https://www.kuweh.de/
13
 * @since      Class available since Release 1.0.0
14
 */
15
class SimpleDIException extends Exception
16
{
17
18
    /**
19
     * Returns the exception object.
20
     *
21
     * @param   string $message
22
     * @return  \Dbrouter\Exception\DbrouterException
23
     */
24 5
    public static function make($message = null)
25
    {
26 5
        if (empty($message) || ! is_string($message)) {
27 1
            $message = 'Unknown exception';
28 1
        }
29
30 5
        return new static($message);
31
    }
32
}
33