original_string: public static function format(DateTimeInterface $dateTime, string $format = 'c') : string
      {
          if (empty(trim($format))) {
              throw new \InvalidArgumentException('$format is not a non-empty string');
          }
  
          return $dateTime->format($format);
      }
code: public static function format(DateTimeInterface $dateTime, string $format = 'c') : string
      {
          if (empty(trim($format))) {
              throw new \InvalidArgumentException('$format is not a non-empty string');
          }
  
          return $dateTime->format($format);
      }
code_tokens: public static function format ( DateTimeInterface $ dateTime , string $ format = 'c' ) : string { if ( empty ( trim ( $ format ) ) ) { throw new \ InvalidArgumentException ( '$format is not a non-empty string' ) ; } return $ dateTime -> format ( $ format ) ; }
docstring: Filters the give \DateTime object to a formatted string.
  
  @param DateTimeInterface $dateTime The date to be formatted.
  @param string            $format   The format of the outputted date string.
  
  @return string
  
  @throws \InvalidArgumentException Thrown if $format is not a string
docstring_tokens: Filters the give \ DateTime object to a formatted string .