Skip to content

Commit 06984c9

Browse files
alexislefebvreGromNaN
authored andcommitted
Use str_ends_with() and str_starts_with()
1 parent 8d9fd70 commit 06984c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Loader/AnnotationDirectoryLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function load(mixed $path, string $type = null): RouteCollection
3737
new \RecursiveCallbackFilterIterator(
3838
new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS),
3939
function (\SplFileInfo $current) {
40-
return '.' !== substr($current->getBasename(), 0, 1);
40+
return !str_starts_with($current->getBasename(), '.');
4141
}
4242
),
4343
\RecursiveIteratorIterator::LEAVES_ONLY

0 commit comments

Comments
 (0)