original_string: public function cleanDate($date)
      {
          $response = $this->query($this->prepareUri('clean/birthdate'), [$date]);
          $result = $this->populate(new Date, $response);
          if (!$result instanceof Date) {
              throw new RuntimeException('Unexpected populate result: ' . get_class($result). '. Expected: ' . Date::class);
          }
  
          return $result;
      }
code: public function cleanDate($date)
      {
          $response = $this->query($this->prepareUri('clean/birthdate'), [$date]);
          $result = $this->populate(new Date, $response);
          if (!$result instanceof Date) {
              throw new RuntimeException('Unexpected populate result: ' . get_class($result). '. Expected: ' . Date::class);
          }
  
          return $result;
      }
code_tokens: public function cleanDate ( $ date ) { $ response = $ this -> query ( $ this -> prepareUri ( 'clean/birthdate' ) , [ $ date ] ) ; $ result = $ this -> populate ( new Date , $ response ) ; if ( ! $ result instanceof Date ) { throw new RuntimeException ( 'Unexpected populate result: ' . get_class ( $ result ) . '. Expected: ' . Date :: class ) ; } return $ result ; }
docstring: Cleans date.
  
  @param string $date
  
  @return Date
  @throws RuntimeException
  @throws InvalidArgumentException
docstring_tokens: Cleans date .