original_string: public static function getPHPFormat(EntityInterface $field)
      {
          $settings = $field->metadata->settings;
          $format = empty($settings['format']) ? 'yy-mm-dd' : $settings['format'];
          if ($settings['timepicker']) {
              $format .= ' ';
              if (empty($settings['time_format'])) {
                  $format .= 'H:mm';
                  $format .= empty($settings['time_seconds']) ?: ':ss';
              } else {
                  $format .= $settings['time_format'];
              }
          }
  
          return static::normalizeFormat($format);
      }
code: public static function getPHPFormat(EntityInterface $field)
      {
          $settings = $field->metadata->settings;
          $format = empty($settings['format']) ? 'yy-mm-dd' : $settings['format'];
          if ($settings['timepicker']) {
              $format .= ' ';
              if (empty($settings['time_format'])) {
                  $format .= 'H:mm';
                  $format .= empty($settings['time_seconds']) ?: ':ss';
              } else {
                  $format .= $settings['time_format'];
              }
          }
  
          return static::normalizeFormat($format);
      }
code_tokens: public static function getPHPFormat ( EntityInterface $ field ) { $ settings = $ field -> metadata -> settings ; $ format = empty ( $ settings [ 'format' ] ) ? 'yy-mm-dd' : $ settings [ 'format' ] ; if ( $ settings [ 'timepicker' ] ) { $ format .= ' ' ; if ( empty ( $ settings [ 'time_format' ] ) ) { $ format .= 'H:mm' ; $ format .= empty ( $ settings [ 'time_seconds' ] ) ? : ':ss' ; } else { $ format .= $ settings [ 'time_format' ] ; } } return static :: normalizeFormat ( $ format ) ; }
docstring: Given a DateField instance, gets its PHP's date-format.
  
  @param \Cake\Datasource\EntityInterface $field DateField instance
  @return string PHP date-format for later use with date() function
docstring_tokens: Given a DateField instance gets its PHP s date - format .