Completed
Push — master ( 94a773...ff8a0b )
by Charlotte
9s
created

RuntimeException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 80%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 11
ccs 4
cts 5
cp 0.8
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php
2
/**
3
 * This file is a part of Woketo package.
4
 *
5
 * (c) Nekland <[email protected]>
6
 *
7
 * For the full license, take a look to the LICENSE file
8
 * on the root directory of this project
9
 */
10
11
namespace Nekland\Woketo\Exception;
12
13
class RuntimeException extends \Exception
14
{
15 1
    public function __construct($e)
16
    {
17 1
        if ($e instanceof \Exception) {
18
            parent::__construct('Bad behavior of inside of woketo. Error: (' . get_class($e) . ') ' . $e->getMessage());
19
        } else {
20 1
            parent::__construct($e);
21
        }
22 1
    }
23
}
24