Passed
Push — master ( b679aa...39d8dd )
by Karthik
02:26
created

OptionNotFoundException::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 2
eloc 3
nc 2
nop 3
dl 0
loc 5
ccs 0
cts 4
cp 0
crap 6
rs 10
c 1
b 0
f 1
1
<?php
2
3
4
namespace cyberinferno\Cabal\Helpers\Exceptions;
5
6
/**
7
 * Class OptionNotFoundException
8
 *
9
 * Exception thrown when an option is not present in an item
10
 *
11
 * @package cyberinferno\Cabal\Helpers\Exceptions
12
 * @author Karthik P
13
 */
14
class OptionNotFoundException extends \Exception
15
{
16
    public function __construct($message = '', $code = 0, \Exception $previous = null) {
17
        if (empty($message)) {
18
            $message = 'Option not found';
19
        }
20
        parent::__construct($message, $code, $previous);
21
    }
22
}