|
11 | 11 |
|
12 | 12 | namespace PHP_CodeSniffer\Files;
|
13 | 13 |
|
| 14 | +use Countable; |
| 15 | +use FilesystemIterator; |
| 16 | +use Iterator; |
14 | 17 | use PHP_CodeSniffer\Autoload;
|
15 | 18 | use PHP_CodeSniffer\Config;
|
16 | 19 | use PHP_CodeSniffer\Exceptions\DeepExitException;
|
17 | 20 | use PHP_CodeSniffer\Ruleset;
|
18 | 21 | use PHP_CodeSniffer\Util;
|
| 22 | +use RecursiveArrayIterator; |
| 23 | +use RecursiveDirectoryIterator; |
| 24 | +use RecursiveIteratorIterator; |
19 | 25 | use ReturnTypeWillChange;
|
20 | 26 |
|
21 |
| -class FileList implements \Iterator, \Countable |
| 27 | +class FileList implements Iterator, Countable |
22 | 28 | {
|
23 | 29 |
|
24 | 30 | /**
|
@@ -80,9 +86,9 @@ public function __construct(Config $config, Ruleset $ruleset)
|
80 | 86 |
|
81 | 87 | $filterClass = $this->getFilterClass();
|
82 | 88 |
|
83 |
| - $di = new \RecursiveDirectoryIterator($path, (\RecursiveDirectoryIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS)); |
| 89 | + $di = new RecursiveDirectoryIterator($path, (RecursiveDirectoryIterator::SKIP_DOTS | FilesystemIterator::FOLLOW_SYMLINKS)); |
84 | 90 | $filter = new $filterClass($di, $path, $config, $ruleset);
|
85 |
| - $iterator = new \RecursiveIteratorIterator($filter); |
| 91 | + $iterator = new RecursiveIteratorIterator($filter); |
86 | 92 |
|
87 | 93 | foreach ($iterator as $file) {
|
88 | 94 | $this->files[$file->getPathname()] = null;
|
@@ -121,9 +127,9 @@ public function addFile($path, $file=null)
|
121 | 127 |
|
122 | 128 | $filterClass = $this->getFilterClass();
|
123 | 129 |
|
124 |
| - $di = new \RecursiveArrayIterator([$path]); |
| 130 | + $di = new RecursiveArrayIterator([$path]); |
125 | 131 | $filter = new $filterClass($di, $path, $this->config, $this->ruleset);
|
126 |
| - $iterator = new \RecursiveIteratorIterator($filter); |
| 132 | + $iterator = new RecursiveIteratorIterator($filter); |
127 | 133 |
|
128 | 134 | foreach ($iterator as $path) {
|
129 | 135 | $this->files[$path] = $file;
|
|
0 commit comments