RuntimeException::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

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 10
c 0
b 0
f 0
cc 2
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 2
    public function __construct($e)
16
    {
17 2
        if ($e instanceof \Exception) {
18
            parent::__construct('Bad behavior of inside of woketo. Error: (' . get_class($e) . ') ' . $e->getMessage());
19
        } else {
20 2
            parent::__construct($e);
21
        }
22 2
    }
23
}
24