PhpBench\Storage\Driver\Xml\HistoryIterator::getEntryIterator PHP Method

getEntryIterator() private method

We hydrate all of the entries for the "current" day.
    private function getEntryIterator()
    {
        $files = $this->days->current();
        $files = new \DirectoryIterator($this->days->current());
        $historyEntries = [];
        foreach ($files as $file) {
            if (!$file->isFile()) {
                continue;
            }
            if ($file->getExtension() !== 'xml') {
                continue;
            }
            $historyEntries[] = $this->getHistoryEntry($file->getPathname());
        }
        usort($historyEntries, function ($entry1, $entry2) {
            if ($entry1->getDate()->format('U') === $entry2->getDate()->format('U')) {
                return;
            }
            return $entry1->getDate()->format('U') < $entry2->getDate()->format('U');
        });
        return new \ArrayIterator($historyEntries);
    }