🔧
This commit is contained in:
@@ -36,7 +36,7 @@ class DateComparator extends Comparator
|
||||
throw new \InvalidArgumentException(sprintf('"%s" is not a valid date.', $matches[2]));
|
||||
}
|
||||
|
||||
$operator = $matches[1] ?? '==';
|
||||
$operator = $matches[1] ?: '==';
|
||||
if ('since' === $operator || 'after' === $operator) {
|
||||
$operator = '>';
|
||||
}
|
||||
|
||||
@@ -63,8 +63,9 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
|
||||
$subPathname .= $this->directorySeparator;
|
||||
}
|
||||
$subPathname .= $this->getFilename();
|
||||
$basePath = $this->rootPath;
|
||||
|
||||
if ('/' !== $basePath = $this->rootPath) {
|
||||
if ('/' !== $basePath && !str_ends_with($basePath, $this->directorySeparator) && !str_ends_with($basePath, '/')) {
|
||||
$basePath .= $this->directorySeparator;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,9 +37,9 @@ final class VcsIgnoredFilterIterator extends \FilterIterator
|
||||
{
|
||||
$this->baseDir = $this->normalizePath($baseDir);
|
||||
|
||||
foreach ($this->parentDirectoriesUpwards($this->baseDir) as $parentDirectory) {
|
||||
if (@is_dir("{$parentDirectory}/.git")) {
|
||||
$this->baseDir = $parentDirectory;
|
||||
foreach ([$this->baseDir, ...$this->parentDirectoriesUpwards($this->baseDir)] as $directory) {
|
||||
if (@is_dir("{$directory}/.git")) {
|
||||
$this->baseDir = $directory;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user