src/Controller/Endpoint/AbstractEndpointController.php 1 location
|
@@ 138-141 (lines=4) @@
|
135 |
|
*/ |
136 |
|
public function addDateRangeWhereClause($dates, AbstractQuery $query, $raw = false) |
137 |
|
{ |
138 |
|
if (! is_array($dates)) { |
139 |
|
$dates = str_replace('\'', '', $dates); // Remove escaping quotes |
140 |
|
$dates = explode(',', $dates); |
141 |
|
} |
142 |
|
|
143 |
|
// If somehow we don't have a full date range, add today's date |
144 |
|
if (empty($dates[1])) { |
src/Utility/DateValidationUtility.php 1 location
|
@@ 32-35 (lines=4) @@
|
29 |
|
*/ |
30 |
|
public function validateTimeDifference($dates, int $maxDiff) |
31 |
|
{ |
32 |
|
if (! is_array($dates)) { |
33 |
|
$dates = str_replace('\'', '', $dates); // Remove escaping quotes |
34 |
|
$dates = explode(',', $dates); |
35 |
|
} |
36 |
|
|
37 |
|
if (! is_array) { |
38 |
|
throw new InvalidArgumentException('Somehow validateTimeDifference couldn\'t make a date array.'); |