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

RuntimeException::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2.032

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 4
cts 5
cp 0.8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 1
crap 2.032
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