| Total Complexity | 3 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | trait DateSetter |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Set a search value for $start or $end property |
||
| 13 | * |
||
| 14 | * @param Request $request |
||
| 15 | * @param string $key |
||
| 16 | * @param string $time |
||
| 17 | * @return false|string |
||
| 18 | */ |
||
| 19 | private function setDay(Request $request, string $key, string $time = '00:00:00') { |
||
| 20 | if (!is_null($day = $request->input($key))) { |
||
| 21 | return self::getDatetime($day, $time); |
||
| 22 | } |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Retrieve the datetime for a date at midnight |
||
| 27 | * |
||
| 28 | * @param string $date |
||
| 29 | * @param string $time |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | private static function getDatetime(string $date, string $time = '00:00:00') { |
||
| 34 | } |
||
| 35 | } |
||
| 36 |