original_string: public static function getStringValue($dateTime): string
      {
          // do not return anything if no value was specified
          if (!$dateTime) {
              return '';
          }
  
          // until a mixed type is supported for type-hints, check the value here
          if (!$dateTime instanceof \DateTime) {
              return (new \DateTime($dateTime))->format(static::DATE_FORMAT);
          }
  
          return $dateTime->format(static::DATE_FORMAT);
      }
code: public static function getStringValue($dateTime): string
      {
          // do not return anything if no value was specified
          if (!$dateTime) {
              return '';
          }
  
          // until a mixed type is supported for type-hints, check the value here
          if (!$dateTime instanceof \DateTime) {
              return (new \DateTime($dateTime))->format(static::DATE_FORMAT);
          }
  
          return $dateTime->format(static::DATE_FORMAT);
      }
code_tokens: public static function getStringValue ( $ dateTime ) : string { // do not return anything if no value was specified if ( ! $ dateTime ) { return '' ; } // until a mixed type is supported for type-hints, check the value here if ( ! $ dateTime instanceof \ DateTime ) { return ( new \ DateTime ( $ dateTime ) ) -> format ( static :: DATE_FORMAT ) ; } return $ dateTime -> format ( static :: DATE_FORMAT ) ; }
docstring: Take a \DateTime value and convert it to the string date format that the API expects.
  
  @param \DateTime|mixed $dateTime
  @return string
docstring_tokens: Take a \ DateTime value and convert it to the string date format that the API expects .