Unverified Commit 2596c3f3 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3233023 by daffie: [Symfony 6] Add "RouteCollection" type hint to...

Issue #3233023 by daffie: [Symfony 6] Add "RouteCollection" type hint to methods overridding Symfony\Component\Routing\RouterInterface::getRouteCollection()
parent 18191004
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\RequestContext as SymfonyRequestContext;
use Symfony\Component\Routing\RequestContextAwareInterface;
use Symfony\Component\Routing\RouterInterface;
@@ -125,7 +126,7 @@ protected function checkAccess(Request $request) {
  /**
   * {@inheritdoc}
   */
  public function getRouteCollection() {
  public function getRouteCollection(): RouteCollection {
    if ($this->router instanceof RouterInterface) {
      return $this->router->getRouteCollection();
    }
+1 −1
Original line number Diff line number Diff line
@@ -324,7 +324,7 @@ protected function applyFitOrder(RouteCollection $collection) {
  /**
   * {@inheritdoc}
   */
  public function getRouteCollection() {
  public function getRouteCollection(): RouteCollection {
    return new LazyRouteCollection($this->routeProvider);
  }