Skip to content

Commit 6f52584

Browse files
committed
used native PHP 8 functions
1 parent df7e45b commit 6f52584

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Routing/Route.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ private function detectMaskType(): string
411411
[, $this->scheme, $path] = $m;
412412
return $path;
413413

414-
} elseif (substr($this->mask, 0, 1) === '/') {
414+
} elseif (str_starts_with($this->mask, '/')) {
415415
$this->type = self::Path;
416416

417417
} else {
@@ -571,7 +571,7 @@ private function parseMask(string $path): void
571571
private function parseQuery(array $parts): bool
572572
{
573573
$query = $parts[count($parts) - 2] ?? '';
574-
if (substr(ltrim($query), 0, 1) !== '?') {
574+
if (!str_starts_with(ltrim($query), '?')) {
575575
return false;
576576
}
577577

0 commit comments

Comments
 (0)