@@ 131-132 (lines=2) @@ | ||
128 | private function validateRelativeFormat($interval, \Exception $e = NULL) |
|
129 | { |
|
130 | $parse = date_parse($interval); |
|
131 | if ($parse['error_count']) |
|
132 | throw new DateInterval\InvalidArgumentException(($e) ? $e->getMessage() : NULL, ($e) ? $e->getCode() : NULL, ($e) ? $e : NULL); |
|
133 | if (!isset($parse['relative'])) |
|
134 | throw new DateInterval\InvalidArgumentException(sprintf("First argument '%s' is not in supported relative date format.", $interval), ($e) ? $e->getCode() : NULL, ($e) ? $e : NULL); |
|
135 | } |
|
@@ 133-134 (lines=2) @@ | ||
130 | $parse = date_parse($interval); |
|
131 | if ($parse['error_count']) |
|
132 | throw new DateInterval\InvalidArgumentException(($e) ? $e->getMessage() : NULL, ($e) ? $e->getCode() : NULL, ($e) ? $e : NULL); |
|
133 | if (!isset($parse['relative'])) |
|
134 | throw new DateInterval\InvalidArgumentException(sprintf("First argument '%s' is not in supported relative date format.", $interval), ($e) ? $e->getCode() : NULL, ($e) ? $e : NULL); |
|
135 | } |
|
136 | } |
|
137 |