@@ -124,7 +124,7 @@ public function files(): static
124
124
public function depth (string |int |array $ levels ): static
125
125
{
126
126
foreach ((array ) $ levels as $ level ) {
127
- $ this ->depths [] = new Comparator \ NumberComparator ($ level );
127
+ $ this ->depths [] = new NumberComparator ($ level );
128
128
}
129
129
130
130
return $ this ;
@@ -152,7 +152,7 @@ public function depth(string|int|array $levels): static
152
152
public function date (string |array $ dates ): static
153
153
{
154
154
foreach ((array ) $ dates as $ date ) {
155
- $ this ->dates [] = new Comparator \ DateComparator ($ date );
155
+ $ this ->dates [] = new DateComparator ($ date );
156
156
}
157
157
158
158
return $ this ;
@@ -307,7 +307,7 @@ public function notPath(string|array $patterns): static
307
307
public function size (string |int |array $ sizes ): static
308
308
{
309
309
foreach ((array ) $ sizes as $ size ) {
310
- $ this ->sizes [] = new Comparator \ NumberComparator ($ size );
310
+ $ this ->sizes [] = new NumberComparator ($ size );
311
311
}
312
312
313
313
return $ this ;
@@ -438,7 +438,7 @@ public function sort(\Closure $closure): static
438
438
*/
439
439
public function sortByExtension (): static
440
440
{
441
- $ this ->sort = Iterator \ SortableIterator::SORT_BY_EXTENSION ;
441
+ $ this ->sort = SortableIterator::SORT_BY_EXTENSION ;
442
442
443
443
return $ this ;
444
444
}
@@ -454,7 +454,7 @@ public function sortByExtension(): static
454
454
*/
455
455
public function sortByName (bool $ useNaturalSort = false ): static
456
456
{
457
- $ this ->sort = $ useNaturalSort ? Iterator \ SortableIterator::SORT_BY_NAME_NATURAL : Iterator \ SortableIterator::SORT_BY_NAME ;
457
+ $ this ->sort = $ useNaturalSort ? SortableIterator::SORT_BY_NAME_NATURAL : SortableIterator::SORT_BY_NAME ;
458
458
459
459
return $ this ;
460
460
}
@@ -470,7 +470,7 @@ public function sortByName(bool $useNaturalSort = false): static
470
470
*/
471
471
public function sortByCaseInsensitiveName (bool $ useNaturalSort = false ): static
472
472
{
473
- $ this ->sort = $ useNaturalSort ? Iterator \ SortableIterator::SORT_BY_NAME_NATURAL_CASE_INSENSITIVE : Iterator \ SortableIterator::SORT_BY_NAME_CASE_INSENSITIVE ;
473
+ $ this ->sort = $ useNaturalSort ? SortableIterator::SORT_BY_NAME_NATURAL_CASE_INSENSITIVE : SortableIterator::SORT_BY_NAME_CASE_INSENSITIVE ;
474
474
475
475
return $ this ;
476
476
}
@@ -486,7 +486,7 @@ public function sortByCaseInsensitiveName(bool $useNaturalSort = false): static
486
486
*/
487
487
public function sortBySize (): static
488
488
{
489
- $ this ->sort = Iterator \ SortableIterator::SORT_BY_SIZE ;
489
+ $ this ->sort = SortableIterator::SORT_BY_SIZE ;
490
490
491
491
return $ this ;
492
492
}
@@ -502,7 +502,7 @@ public function sortBySize(): static
502
502
*/
503
503
public function sortByType (): static
504
504
{
505
- $ this ->sort = Iterator \ SortableIterator::SORT_BY_TYPE ;
505
+ $ this ->sort = SortableIterator::SORT_BY_TYPE ;
506
506
507
507
return $ this ;
508
508
}
@@ -520,7 +520,7 @@ public function sortByType(): static
520
520
*/
521
521
public function sortByAccessedTime (): static
522
522
{
523
- $ this ->sort = Iterator \ SortableIterator::SORT_BY_ACCESSED_TIME ;
523
+ $ this ->sort = SortableIterator::SORT_BY_ACCESSED_TIME ;
524
524
525
525
return $ this ;
526
526
}
@@ -552,7 +552,7 @@ public function reverseSorting(): static
552
552
*/
553
553
public function sortByChangedTime (): static
554
554
{
555
- $ this ->sort = Iterator \ SortableIterator::SORT_BY_CHANGED_TIME ;
555
+ $ this ->sort = SortableIterator::SORT_BY_CHANGED_TIME ;
556
556
557
557
return $ this ;
558
558
}
@@ -570,7 +570,7 @@ public function sortByChangedTime(): static
570
570
*/
571
571
public function sortByModifiedTime (): static
572
572
{
573
- $ this ->sort = Iterator \ SortableIterator::SORT_BY_MODIFIED_TIME ;
573
+ $ this ->sort = SortableIterator::SORT_BY_MODIFIED_TIME ;
574
574
575
575
return $ this ;
576
576
}
@@ -646,7 +646,7 @@ public function in(string|array $dirs): static
646
646
sort ($ glob );
647
647
$ resolvedDirs [] = array_map ($ this ->normalizeDir (...), $ glob );
648
648
} else {
649
- throw new DirectoryNotFoundException (sprintf ('The "%s" directory does not exist. ' , $ dir ));
649
+ throw new DirectoryNotFoundException (\ sprintf ('The "%s" directory does not exist. ' , $ dir ));
650
650
}
651
651
}
652
652
@@ -674,7 +674,7 @@ public function getIterator(): \Iterator
674
674
$ iterator = $ this ->searchInDirectory ($ this ->dirs [0 ]);
675
675
676
676
if ($ this ->sort || $ this ->reverseSorting ) {
677
- $ iterator = (new Iterator \ SortableIterator ($ iterator , $ this ->sort , $ this ->reverseSorting ))->getIterator ();
677
+ $ iterator = (new SortableIterator ($ iterator , $ this ->sort , $ this ->reverseSorting ))->getIterator ();
678
678
}
679
679
680
680
return $ iterator ;
@@ -690,7 +690,7 @@ public function getIterator(): \Iterator
690
690
}
691
691
692
692
if ($ this ->sort || $ this ->reverseSorting ) {
693
- $ iterator = (new Iterator \ SortableIterator ($ iterator , $ this ->sort , $ this ->reverseSorting ))->getIterator ();
693
+ $ iterator = (new SortableIterator ($ iterator , $ this ->sort , $ this ->reverseSorting ))->getIterator ();
694
694
}
695
695
696
696
return $ iterator ;
@@ -793,37 +793,37 @@ private function searchInDirectory(string $dir): \Iterator
793
793
$ iterator = new Iterator \RecursiveDirectoryIterator ($ dir , $ flags , $ this ->ignoreUnreadableDirs );
794
794
795
795
if ($ exclude ) {
796
- $ iterator = new Iterator \ ExcludeDirectoryFilterIterator ($ iterator , $ exclude );
796
+ $ iterator = new ExcludeDirectoryFilterIterator ($ iterator , $ exclude );
797
797
}
798
798
799
799
$ iterator = new \RecursiveIteratorIterator ($ iterator , \RecursiveIteratorIterator::SELF_FIRST );
800
800
801
801
if ($ minDepth > 0 || $ maxDepth < \PHP_INT_MAX ) {
802
- $ iterator = new Iterator \ DepthRangeFilterIterator ($ iterator , $ minDepth , $ maxDepth );
802
+ $ iterator = new DepthRangeFilterIterator ($ iterator , $ minDepth , $ maxDepth );
803
803
}
804
804
805
805
if ($ this ->mode ) {
806
806
$ iterator = new Iterator \FileTypeFilterIterator ($ iterator , $ this ->mode );
807
807
}
808
808
809
809
if ($ this ->names || $ this ->notNames ) {
810
- $ iterator = new Iterator \ FilenameFilterIterator ($ iterator , $ this ->names , $ this ->notNames );
810
+ $ iterator = new FilenameFilterIterator ($ iterator , $ this ->names , $ this ->notNames );
811
811
}
812
812
813
813
if ($ this ->contains || $ this ->notContains ) {
814
- $ iterator = new Iterator \ FilecontentFilterIterator ($ iterator , $ this ->contains , $ this ->notContains );
814
+ $ iterator = new FilecontentFilterIterator ($ iterator , $ this ->contains , $ this ->notContains );
815
815
}
816
816
817
817
if ($ this ->sizes ) {
818
- $ iterator = new Iterator \ SizeRangeFilterIterator ($ iterator , $ this ->sizes );
818
+ $ iterator = new SizeRangeFilterIterator ($ iterator , $ this ->sizes );
819
819
}
820
820
821
821
if ($ this ->dates ) {
822
- $ iterator = new Iterator \ DateRangeFilterIterator ($ iterator , $ this ->dates );
822
+ $ iterator = new DateRangeFilterIterator ($ iterator , $ this ->dates );
823
823
}
824
824
825
825
if ($ this ->filters ) {
826
- $ iterator = new Iterator \ CustomFilterIterator ($ iterator , $ this ->filters );
826
+ $ iterator = new CustomFilterIterator ($ iterator , $ this ->filters );
827
827
}
828
828
829
829
if ($ this ->paths || $ notPaths ) {
0 commit comments