19 declare(strict_types=1);
    41         $current_date = $this->getCurrentDate();
    42         if (is_null($until_date) || $until_date > $current_date) {
    43             $until_date = $current_date;
    46         $token_parts = [$offset, $until_date->format(
'Y-m-d')];
    47         if (!is_null($from_date)) {
    48             $token_parts[] = $from_date->format(
'Y-m-d');
    58         if (count($token_parts) < 2 || count($token_parts) > 3) {
    63             !isset($token_parts[0]) ||
    64             !is_int($token_parts[0]) ||
    71             !isset($token_parts[1]) ||
    72             !is_string($token_parts[1]) ||
    73             !$this->isStringValidAsDate($token_parts[1])
    80             isset($token_parts[2]) &&
    81             (!is_string($token_parts[2]) || !$this->isStringValidAsDate($token_parts[2]))
    95         if (isset($token_parts[1])) {
   102         if (isset($token_parts[2])) {
   119         $decoded = json_decode(base64_decode($string));
   120         if (is_array($decoded)) {
   128         return base64_encode(json_encode($array));