Skip to content

Commit 5b3e3d6

Browse files
alexislefebvreGromNaN
authored andcommitted
Use str_ends_with() and str_starts_with()
1 parent 4aecbab commit 5b3e3d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DependencyInjection/AddAnnotatedClassesToCachePass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private function patternsToRegexps(array $patterns): array
117117
$regex = strtr($regex, ['\\*\\*' => '.*?', '\\*' => '[^\\\\]*?']);
118118

119119
// If this class does not end by a slash, anchor the end
120-
if ('\\' !== substr($regex, -1)) {
120+
if (!str_ends_with($regex, '\\')) {
121121
$regex .= '$';
122122
}
123123

0 commit comments

Comments
 (0)