RangeException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 4
rs 10
1
<?php
2
3
namespace BillingBoss\Exception;
4
5
/**
6
 * The parent exception from which other range-related exceptions extend
7
 *
8
 * @package   BillingBoss
9
 * @link      https://github.com/ranskills/billing-boss-php
10
 * @copyright Copyright (c) 2018 Ransford Ako Okpoti
11
 * @license   Refer to the LICENSE distributed with this library
12
 * @since     1.0.0
13
 */
14
class RangeException extends Exception
15
{
16
    const NO_RANGE_FOUND = 0;
17
    const LOWER_LIMIT_GREATER_THAN_UPPER_LIMIT = 1;
18
    const MULTIPLE_OPEN_ENDED_UPPER_LIMIT = 2;
19
20
    protected $ranges = [];
21
22
    public function __construct($message, $code = 0, $ranges = [])
23
    {
24
        parent::__construct($message, $code);
25
        $this->ranges = $ranges;
26
    }
27
}
28