Loading core/lib/Drupal/Core/ProxyClass/Routing/MatcherDumper.php +2 −2 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ public function addRoutes(\Symfony\Component\Routing\RouteCollection $routes) * {@inheritdoc} */ public function dump(array $options = array ( )) )): string { return $this->lazyLoadItself()->dump($options); } Loading @@ -87,7 +87,7 @@ public function dump(array $options = array ( /** * {@inheritdoc} */ public function getRoutes() public function getRoutes(): \Symfony\Component\Routing\RouteCollection { return $this->lazyLoadItself()->getRoutes(); } Loading core/lib/Drupal/Core/Render/HtmlResponse.php +1 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ public function __construct($content = '', int $status = 200, array $headers = [ * * @return $this */ public function setContent($content) { public function setContent($content): static { // A render array can automatically be converted to a string and set the // necessary metadata. if (is_array($content) && (isset($content['#markup']))) { Loading core/lib/Drupal/Core/Routing/LazyRouteCollection.php +5 −5 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Drupal\Core\Routing; use Symfony\Component\Routing\Exception\RouteNotFoundException; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; class LazyRouteCollection extends RouteCollection { Loading Loading @@ -33,8 +34,7 @@ public function getIterator(): \ArrayIterator { * @return int * The number of routes */ #[\ReturnTypeWillChange] public function count() { public function count(): int { return count($this->all()); } Loading @@ -44,7 +44,7 @@ public function count() { * @return \Symfony\Component\Routing\Route[] * An array of routes */ public function all() { public function all(): array { return $this->provider->getRoutesByNames(NULL); } Loading @@ -57,12 +57,12 @@ public function all() { * @return \Symfony\Component\Routing\Route|null * A Route instance or null when not found */ public function get($name) { public function get($name): ?Route { try { return $this->provider->getRouteByName($name); } catch (RouteNotFoundException $e) { return; return NULL; } } Loading core/lib/Drupal/Core/Routing/MatcherDumper.php +4 −2 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ public function addRoutes(RouteCollection $routes) { * Thrown if the table could not be created or the database connection * failed. */ public function dump(array $options = []) { public function dump(array $options = []): string { // Convert all of the routes into database records. // Accumulate the menu masks on top of any we found before. $masks = array_flip($this->state->get('routing.menu_masks.' . $this->tableName, [])); Loading Loading @@ -159,6 +159,8 @@ public function dump(array $options = []) { $this->state->set('routing.menu_masks.' . $this->tableName, $masks); $this->routes = NULL; return ''; } /** Loading @@ -168,7 +170,7 @@ public function dump(array $options = []) { * A RouteCollection instance representing all routes currently in the * dumper. */ public function getRoutes() { public function getRoutes(): RouteCollection { return $this->routes; } Loading core/lib/Drupal/Core/Routing/NullMatcherDumper.php +3 −2 Original line number Diff line number Diff line Loading @@ -39,9 +39,10 @@ public function addRoutes(RouteCollection $routes) { * @param array $options * An array of options. */ public function dump(array $options = []) { public function dump(array $options = []): string { // The dumper is reused for multiple providers, so reset the queued routes. $this->routes = NULL; return ''; } /** Loading @@ -51,7 +52,7 @@ public function dump(array $options = []) { * A RouteCollection instance representing all routes currently in the * dumper. */ public function getRoutes() { public function getRoutes(): RouteCollection { return $this->routes; } Loading Loading
core/lib/Drupal/Core/ProxyClass/Routing/MatcherDumper.php +2 −2 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ public function addRoutes(\Symfony\Component\Routing\RouteCollection $routes) * {@inheritdoc} */ public function dump(array $options = array ( )) )): string { return $this->lazyLoadItself()->dump($options); } Loading @@ -87,7 +87,7 @@ public function dump(array $options = array ( /** * {@inheritdoc} */ public function getRoutes() public function getRoutes(): \Symfony\Component\Routing\RouteCollection { return $this->lazyLoadItself()->getRoutes(); } Loading
core/lib/Drupal/Core/Render/HtmlResponse.php +1 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ public function __construct($content = '', int $status = 200, array $headers = [ * * @return $this */ public function setContent($content) { public function setContent($content): static { // A render array can automatically be converted to a string and set the // necessary metadata. if (is_array($content) && (isset($content['#markup']))) { Loading
core/lib/Drupal/Core/Routing/LazyRouteCollection.php +5 −5 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Drupal\Core\Routing; use Symfony\Component\Routing\Exception\RouteNotFoundException; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; class LazyRouteCollection extends RouteCollection { Loading Loading @@ -33,8 +34,7 @@ public function getIterator(): \ArrayIterator { * @return int * The number of routes */ #[\ReturnTypeWillChange] public function count() { public function count(): int { return count($this->all()); } Loading @@ -44,7 +44,7 @@ public function count() { * @return \Symfony\Component\Routing\Route[] * An array of routes */ public function all() { public function all(): array { return $this->provider->getRoutesByNames(NULL); } Loading @@ -57,12 +57,12 @@ public function all() { * @return \Symfony\Component\Routing\Route|null * A Route instance or null when not found */ public function get($name) { public function get($name): ?Route { try { return $this->provider->getRouteByName($name); } catch (RouteNotFoundException $e) { return; return NULL; } } Loading
core/lib/Drupal/Core/Routing/MatcherDumper.php +4 −2 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ public function addRoutes(RouteCollection $routes) { * Thrown if the table could not be created or the database connection * failed. */ public function dump(array $options = []) { public function dump(array $options = []): string { // Convert all of the routes into database records. // Accumulate the menu masks on top of any we found before. $masks = array_flip($this->state->get('routing.menu_masks.' . $this->tableName, [])); Loading Loading @@ -159,6 +159,8 @@ public function dump(array $options = []) { $this->state->set('routing.menu_masks.' . $this->tableName, $masks); $this->routes = NULL; return ''; } /** Loading @@ -168,7 +170,7 @@ public function dump(array $options = []) { * A RouteCollection instance representing all routes currently in the * dumper. */ public function getRoutes() { public function getRoutes(): RouteCollection { return $this->routes; } Loading
core/lib/Drupal/Core/Routing/NullMatcherDumper.php +3 −2 Original line number Diff line number Diff line Loading @@ -39,9 +39,10 @@ public function addRoutes(RouteCollection $routes) { * @param array $options * An array of options. */ public function dump(array $options = []) { public function dump(array $options = []): string { // The dumper is reused for multiple providers, so reset the queued routes. $this->routes = NULL; return ''; } /** Loading @@ -51,7 +52,7 @@ public function dump(array $options = []) { * A RouteCollection instance representing all routes currently in the * dumper. */ public function getRoutes() { public function getRoutes(): RouteCollection { return $this->routes; } Loading