Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
9 | 7 | public function handle($request, $match) |
|
10 | { |
||
11 | 7 | if (!$match) { |
|
12 | 1 | throw new RunTimeException('Missing dates for matching'); |
|
13 | } |
||
14 | |||
15 | 6 | $date = explode(',', $match); |
|
16 | |||
17 | 6 | if (count($date) == 1) { |
|
18 | 2 | return $this->matchSingleDate($date[0]); |
|
19 | } |
||
20 | |||
21 | 4 | return $this->matchDateRange($date[0], $date[1]); |
|
22 | } |
||
23 | |||
54 |