Commit 24a916ec authored by Avris's avatar Avris

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/Entity/EntryList.php
#	src/Service/Esse.php
parents 52881099 5ea9c439
......@@ -33,6 +33,14 @@ final class EntryList implements \IteratorAggregate, \Countable, \JsonSerializab
return $newList;
}
public function limit(int $offset, int $length): self
{
$newList = new self();
$newList->entries = array_slice($this->entries, $offset, $length);
return $newList;
}
public function getIterator(): \Traversable
{
return new \ArrayIterator($this->entries);
......@@ -52,4 +60,4 @@ final class EntryList implements \IteratorAggregate, \Countable, \JsonSerializab
{
return $this->entries;
}
}
\ No newline at end of file
}
......@@ -118,7 +118,7 @@ final class Esse
continue;
}
$key = u($file->getRealPath())->after($this->entriesDir->append('/'))->beforeLast('.suml');
$key = mb_substr($file->getRealPath(), mb_strlen($this->entriesDir) + 1, -5);
$entry = $this->get($key);
if ($entry && (!$type || $entry->type()->equalsTo($type))) {
......@@ -267,7 +267,7 @@ final class Esse
continue;
}
$key = u($file->getRealPath())->after($this->entriesDir->append('/'))->beforeLast('.suml');
$key = u($file->getRealPath())->after($this->entriesDir->append('/'))->replace('\\', '/')->beforeLast('.suml');
yield $key->toString() => $this->suml->parseFile($file->getRealPath());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment