changed some wording in comments

This commit is contained in:
tracer 2022-10-27 12:13:37 +02:00
parent 65a87acc48
commit 14f9f247bc
1 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ class Router
/* /*
* This method takes a route like /admin/users/{user} and creates a regex to match on call * This method takes a route like /admin/users/{user} and creates a regex to match on call
* More complex routes as /posts/{thread}/show/{page} are supported as well. * More complex routes like /posts/{thread}/show/{page} are supported as well.
*/ */
function addRoute(string $name, string $route, Closure $callback): void function addRoute(string $name, string $route, Closure $callback): void
{ {
@ -84,7 +84,7 @@ class Router
foreach ($this->dynamicRoutes as $route) { foreach ($this->dynamicRoutes as $route) {
// PHPStorm doesn't know that $parameters are always available, // PHPStorm doesn't know that $parameters are always available,
// (as it this are dynamic routes) so I init the array just to make PHPStorm happy. // (as these are dynamic routes) so I init the array just to make PHPStorm happy.
$parameters = []; $parameters = [];
if (preg_match(pattern: $route->getRegex(), subject: $requestUri, matches: $matches)) { if (preg_match(pattern: $route->getRegex(), subject: $requestUri, matches: $matches)) {
foreach ($route->getParameters() as $id => $parameter) { foreach ($route->getParameters() as $id => $parameter) {