| Conditions | 4 |
| Paths | 5 |
| Total Lines | 29 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function handle($args = []) |
||
| 15 | { |
||
| 16 | |||
| 17 | $strict = $this->argGet($args, 'strict', true); |
||
| 18 | |||
| 19 | $dateRange = [ |
||
| 20 | [ |
||
| 21 | 'date' => $this->argGet($args, 'start'), |
||
| 22 | 'operator' => '<' |
||
| 23 | ], |
||
| 24 | [ |
||
| 25 | 'date' => $this->argGet($args, 'end'), |
||
| 26 | 'operator' => '>' |
||
| 27 | ] |
||
| 28 | ]; |
||
| 29 | |||
| 30 | foreach ($dateRange as $range) { |
||
| 31 | |||
| 32 | if ( ! $strict) { |
||
| 33 | $range['operator'] .= '='; |
||
| 34 | } |
||
| 35 | |||
| 36 | if ($this->runDateTimeStrategy($range['date'], $range['operator']) === false) { |
||
| 37 | return false; |
||
| 38 | } |
||
| 39 | } |
||
| 40 | |||
| 41 | return true; |
||
| 42 | } |
||
| 43 | |||
| 69 |