original_string: public function formatTime($field, $value, array $options)
      {
          if ($value === null) {
              return $this->Html->label(__d('crud', 'N/A'), ['type' => 'info']);
          }
          $format = isset($options['format']) ? $options['format'] : null;
  
          if (is_int($value) || is_string($value) || $value instanceof DateTime || $value instanceof DateTimeImmutable) {
              return $this->Time->nice($value, $format);
          }
  
          return $this->Html->label(__d('crud', 'N/A'), ['type' => 'info']);
      }
code: public function formatTime($field, $value, array $options)
      {
          if ($value === null) {
              return $this->Html->label(__d('crud', 'N/A'), ['type' => 'info']);
          }
          $format = isset($options['format']) ? $options['format'] : null;
  
          if (is_int($value) || is_string($value) || $value instanceof DateTime || $value instanceof DateTimeImmutable) {
              return $this->Time->nice($value, $format);
          }
  
          return $this->Html->label(__d('crud', 'N/A'), ['type' => 'info']);
      }
code_tokens: public function formatTime ( $ field , $ value , array $ options ) { if ( $ value === null ) { return $ this -> Html -> label ( __d ( 'crud' , 'N/A' ) , [ 'type' => 'info' ] ) ; } $ format = isset ( $ options [ 'format' ] ) ? $ options [ 'format' ] : null ; if ( is_int ( $ value ) || is_string ( $ value ) || $ value instanceof DateTime || $ value instanceof DateTimeImmutable ) { return $ this -> Time -> nice ( $ value , $ format ) ; } return $ this -> Html -> label ( __d ( 'crud' , 'N/A' ) , [ 'type' => 'info' ] ) ; }
docstring: Format a time for display
  
  @param string $field Name of field.
  @param mixed $value Value of field.
  @param array $options Options array.
  @return string
docstring_tokens: Format a time for display