Completed
Push — master ( caad92...bf4c7a )
by Peter
05:39
created

OutOfWeekIntervalException::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
1
<?php 
2
/**
3
 * GpsLab component.
4
 *
5
 * @author    Peter Gribanov <[email protected]>
6
 * @copyright Copyright (c) 2016, Peter Gribanov
7
 * @license   http://opensource.org/licenses/MIT
8
 */
9
10
namespace GpsLab\Component\Interval\Week;
11
12
use GpsLab\Component\Interval\Exception\OutOfIntervalException;
13
14
class OutOfWeekIntervalException extends OutOfIntervalException
15
{
16
    /**
17
     * @param WeekIntervalPoint $point
18
     * @param WeekInterval $interval
19
     *
20
     * @return self
21
     */
22
    public static function create(WeekIntervalPoint $point, WeekInterval $interval)
23
    {
24
        return new static(sprintf('Week "%s" must be included in interval "%s".', $point, $interval));
25
    }
26
}
27