Unverified Commit dfa9d9de authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3232895 by daffie: [Symfony 6] Add "string" type hint to methods...

Issue #3232895 by daffie: [Symfony 6] Add "string" type hint to methods overridding Symfony\Component\Routing\Generator\UrlGeneratorInterface::generate()
parent 9d36d028
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ protected function bubble(GeneratedUrl $generated_url, array $options = []) {
  /**
   * {@inheritdoc}
   */
  public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH) {
  public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH): string {
    $options['absolute'] = is_bool($referenceType) ? $referenceType : $referenceType === self::ABSOLUTE_URL;
    $generated_url = $this->generateFromRoute($name, $parameters, $options, TRUE);
    $this->bubble($generated_url);
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ public function getRouteCollection(): RouteCollection {
  /**
   * {@inheritdoc}
   */
  public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH) {
  public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH): string {
    if ($this->router instanceof UrlGeneratorInterface) {
      return $this->router->generate($name, $parameters, $referenceType);
    }
+1 −1
Original line number Diff line number Diff line
@@ -331,7 +331,7 @@ public function getRouteCollection(): RouteCollection {
  /**
   * {@inheritdoc}
   */
  public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH) {
  public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH): string {
    @trigger_error(__METHOD__ . '() is deprecated in drupal:8.3.0 and will throw an exception from drupal:10.0.0. Use the \Drupal\Core\Url object instead. See https://www.drupal.org/node/2820197', E_USER_DEPRECATED);
    return $this->urlGenerator->generate($name, $parameters, $referenceType);
  }
+1 −1
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ protected function getInternalPathFromRoute($name, SymfonyRoute $route, $paramet
  /**
   * {@inheritdoc}
   */
  public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH) {
  public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH): string {
    $options['absolute'] = is_bool($referenceType) ? $referenceType : $referenceType === self::ABSOLUTE_URL;
    return $this->generateFromRoute($name, $parameters, $options);
  }