public static function createPeriodKey($period): string
    {
        if ($period->hasFixedDateTimes()) {
            return "{$period->getStartDateTimeString()}|{$period->getEndDateTimeString()}";
        }

        list($subType, $subValueType) = explode('_', strtolower($period->getSubType()));

        return "{$subType}{$period->getSubValue()}{$subValueType}|";
    }
public static function createPeriodKey($period): string
    {
        if ($period->hasFixedDateTimes()) {
            return "{$period->getStartDateTimeString()}|{$period->getEndDateTimeString()}";
        }

        list($subType, $subValueType) = explode('_', strtolower($period->getSubType()));

        return "{$subType}{$period->getSubValue()}{$subValueType}|";
    }
public static function createPeriodKey ( $ period ) : string { if ( $ period -> hasFixedDateTimes ( ) ) { return "{$period->getStartDateTimeString()}|{$period->getEndDateTimeString()}" ; } list ( $ subType , $ subValueType ) = explode ( '_' , strtolower ( $ period -> getSubType ( ) ) ) ; return "{$subType}{$period->getSubValue()}{$subValueType}|" ; }
Format a period class into a key.

@param  \CyrildeWit\EloquentViewable\Support\Period
@return string
Format a period class into a key .