diff --git a/core/lib/Drupal/Core/Routing/CompiledRoute.php b/core/lib/Drupal/Core/Routing/CompiledRoute.php index 1f7057e..6f3d84d 100644 --- a/core/lib/Drupal/Core/Routing/CompiledRoute.php +++ b/core/lib/Drupal/Core/Routing/CompiledRoute.php @@ -158,7 +158,7 @@ public function getRequirements() { * correspond to a matching path part containing that variable. * * @return array - * The path variable names keyed by numeric path part. + * The path variable names keyed by numeric path part. */ public function getPathVariables() { return $this->mappedPathVariables; diff --git a/core/lib/Drupal/Core/Routing/RouteBuilder.php b/core/lib/Drupal/Core/Routing/RouteBuilder.php index 6791b61..5d51a85 100644 --- a/core/lib/Drupal/Core/Routing/RouteBuilder.php +++ b/core/lib/Drupal/Core/Routing/RouteBuilder.php @@ -230,7 +230,7 @@ public function destruct() { } /** - * Lower case the path for each route in the collection. + * Lower cases the path for each route in the collection. * * @param \Symfony\Component\Routing\RouteCollection $collection * A route collection. diff --git a/core/lib/Drupal/Core/Routing/RouteCompiler.php b/core/lib/Drupal/Core/Routing/RouteCompiler.php index bd09de5..86e7ffb 100644 --- a/core/lib/Drupal/Core/Routing/RouteCompiler.php +++ b/core/lib/Drupal/Core/Routing/RouteCompiler.php @@ -66,7 +66,7 @@ public static function compile(Route $route) { /** * Returns the mapping of route variables to numeric path part. * - * Drupal only support path wildcard (variables) that consist of a complete + * Drupal only supports path wildcard (variables) that consist of a complete * part of the path separated by slashes. * * @param string $path diff --git a/core/lib/Drupal/Core/Routing/UrlMatcher.php b/core/lib/Drupal/Core/Routing/UrlMatcher.php index c4c05a5..74c46a5 100644 --- a/core/lib/Drupal/Core/Routing/UrlMatcher.php +++ b/core/lib/Drupal/Core/Routing/UrlMatcher.php @@ -58,11 +58,11 @@ public function finalMatch(RouteCollection $collection, Request $request) { * * @param string $pathinfo * The path to be parsed. - * @param RouteCollection $routes + * @param \Symfony\Component\Routing\RouteCollection $routes * The set of routes. * * @return array - * An array of route parameters + * An array of route parameters. * * @throws \Symfony\Component\Routing\Exception\ResourceNotFoundException * If the resource could not be found. @@ -70,7 +70,6 @@ public function finalMatch(RouteCollection $collection, Request $request) { * If the resource was found but the request method is not allowed. */ protected function matchCollection($pathinfo, RouteCollection $routes) { - foreach ($routes as $name => $route) { /** @var \Symfony\Component\Routing\Route $route */ $compiledRoute = $route->compile(); @@ -97,9 +96,9 @@ protected function matchCollection($pathinfo, RouteCollection $routes) { continue; } - // check HTTP method requirement + // Check the HTTP method requirement. if ($requiredMethods = $route->getMethods()) { - // HEAD and GET are equivalent as per RFC + // HEAD and GET are equivalent as per RFC. $method = $this->context->getMethod(); if ('HEAD' === $method) { $method = 'GET'; diff --git a/core/modules/path/path.module b/core/modules/path/path.module index b891c1e..65fbf69 100644 --- a/core/modules/path/path.module +++ b/core/modules/path/path.module @@ -21,7 +21,7 @@ function path_help($route_name, RouteMatchInterface $route_match) { $output = ''; $output .= '

' . t('About') . '

'; $output .= '

' . t('The Path module allows you to specify an alias, or custom URL, for any existing internal system path. Aliases should not be confused with URL redirects, which allow you to forward a changed or inactive URL to a new URL. In addition to making URLs more readable, aliases also help search engines index content more effectively. Multiple aliases may be used for a single internal system path. To automate the aliasing of paths, you can install the contributed module Pathauto. For more information, see the online documentation for the Path module.', array(':path' => 'https://www.drupal.org/documentation/modules/path', ':pathauto' => 'https://www.drupal.org/project/pathauto')) . '

'; - $output .= '

' . t('Aliases must be unique, are converted to lower case, and are matched in a case insensitive fashion'); + $output .= '

' . t('Aliases must be unique, are converted to lower case, and are matched in a case insensitive fashion.'); $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating aliases') . '
'; diff --git a/core/modules/system/src/Tests/Routing/RouterTest.php b/core/modules/system/src/Tests/Routing/RouterTest.php index bb1a37f..bbe1ec4 100644 --- a/core/modules/system/src/Tests/Routing/RouterTest.php +++ b/core/modules/system/src/Tests/Routing/RouterTest.php @@ -255,7 +255,6 @@ public function testRoutePathMixedCase() { $this->drupalGet('router_test/mixedcase3/MIXEDCASESTRING'); $this->assertResponse(200); $this->assertRaw('MIXEDCASESTRING', 'The correct string was returned because the route was successful.'); - } /**