1
0
mirror of https://github.com/dannyvankooten/AltoRouter.git synced 2025-08-25 17:30:44 +02:00

fix phpcs issues

This commit is contained in:
Danny van Kooten
2023-10-09 20:49:37 +02:00
parent f327fbb5bf
commit 77a2e14681
3 changed files with 46 additions and 47 deletions

View File

@@ -233,7 +233,7 @@ class AltoRouter
$match = strcmp($requestUrl, $route) === 0;
} else {
// Compare longest non-param string with url before moving on to regex
// Check if last character before param is a slash, because it could be optional if param is optional too (see https://github.com/dannyvankooten/AltoRouter/issues/241)
// Check if last character before param is a slash, because it could be optional if param is optional too (see https://github.com/dannyvankooten/AltoRouter/issues/241)
if (strncmp($requestUrl, $route, $position) !== 0 && ($lastRequestUrlChar === '/' || $route[$position-1] !== '/')) {
continue;
}