Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 3
DatetimeIndexField
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 3
 getMapping
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 3
<?php
namespace CirrusSearch\Search;
use SearchEngine;
/**
 * Index field representing datetime field.
 * @package CirrusSearch
 */
class DatetimeIndexField extends CirrusIndexField {
    protected $typeName = 'date';
    public function getMapping( SearchEngine $engine ) {
        $config = parent::getMapping( $engine );
        $config['format'] = 'dateOptionalTime';
        return $config;
    }
}