mirror of
https://github.com/danog/psalm.git
synced 2024-12-13 01:37:23 +01:00
Use flag instead of DirectoryIterator::isDot()
This commit is contained in:
parent
832fc35d8d
commit
2c70a1a72a
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace Psalm\Config;
|
||||
|
||||
use FilesystemIterator;
|
||||
use Psalm\Exception\ConfigException;
|
||||
use RecursiveDirectoryIterator;
|
||||
use RecursiveIteratorIterator;
|
||||
@ -186,11 +187,13 @@ class FileFilter
|
||||
}
|
||||
|
||||
/** @var RecursiveDirectoryIterator */
|
||||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory_path));
|
||||
$iterator = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($directory_path, FilesystemIterator::SKIP_DOTS)
|
||||
);
|
||||
$iterator->rewind();
|
||||
|
||||
while ($iterator->valid()) {
|
||||
if (!$iterator->isDot() && $iterator->isLink()) {
|
||||
if ($iterator->isLink()) {
|
||||
$linked_path = readlink($iterator->getPathname());
|
||||
|
||||
if (stripos($linked_path, $directory_path) !== 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user