Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public static function getRange(string $range): RangeInterface |
||
15 | { |
||
16 | if (!in_array($range, RangeInterface::RANGES)) { |
||
17 | throw new InvalidExtractRangeException($range); |
||
18 | } |
||
19 | |||
20 | $className = 'Spiral\\Statistics\\Extract\\Range\\' . ucfirst($range) . 'Range'; |
||
21 | |||
22 | return new $className; |
||
23 | } |
||
24 | } |