original_string: public static function formatDate(\DateTimeInterface $dateTime, $format)
      {
          $phpFormats = array(
              self::DATE => "Y-m-d",
              self::DATE_AND_TIME => 'Y-m-d\TH:i:s\Z',
          );
          $phpFormat = $phpFormats[$format];
  
          return $dateTime->format($phpFormat);
      }
code: public static function formatDate(\DateTimeInterface $dateTime, $format)
      {
          $phpFormats = array(
              self::DATE => "Y-m-d",
              self::DATE_AND_TIME => 'Y-m-d\TH:i:s\Z',
          );
          $phpFormat = $phpFormats[$format];
  
          return $dateTime->format($phpFormat);
      }
code_tokens: public static function formatDate ( \ DateTimeInterface $ dateTime , $ format ) { $ phpFormats = array ( self :: DATE => "Y-m-d" , self :: DATE_AND_TIME => 'Y-m-d\TH:i:s\Z' , ) ; $ phpFormat = $ phpFormats [ $ format ] ; return $ dateTime -> format ( $ phpFormat ) ; }
docstring: Format DateTime string based on granularity
  
  @param \DateTimeInterface $dateTime
  @param string $format       Either self::DATE or self::DATE_AND_TIME
  
  @return string
docstring_tokens: Format DateTime string based on granularity