Calculator/SalesSummaryCalculator.php
protected function filterCurrentItems(Collection $collection)
    {
        $endDate    = new DateTime();
        $format     = $this->configuration->getGroupByDateFormat();
        $identifier = $endDate->format($format);

        return $collection->filter(function (ReportRow $row) use ($identifier) {
            return $row->getIdentifier() === $identifier;
        });
    }
protected function filterCurrentItems(Collection $collection)
    {
        $endDate    = new DateTime();
        $format     = $this->configuration->getGroupByDateFormat();
        $identifier = $endDate->format($format);

        return $collection->filter(function (ReportRow $row) use ($identifier) {
            return $row->getIdentifier() === $identifier;
        });
    }
protected function filterCurrentItems ( Collection $ collection ) { $ endDate = new DateTime ( ) ; $ format = $ this -> configuration -> getGroupByDateFormat ( ) ; $ identifier = $ endDate -> format ( $ format ) ; return $ collection -> filter ( function ( ReportRow $ row ) use ( $ identifier ) { return $ row -> getIdentifier ( ) === $ identifier ; } ) ; }
Filters a collection to get only current items

@param Collection $collection

@return Collection
Filters a collection to get only current items