Problem/Motivation

This Url::fromRoute() also creates a $route_name variable: https://git.drupalcode.org/project/admin_toolbar/-/blob/28a6dfd1fb1652be...
But this variable is never used.

Steps to reproduce

Proposed resolution

Stop creating the variable and simply call Url::fromRoute() with the route name.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

prudloff created an issue. See original summary.

garvitasakhrani’s picture

I am working on it.

garvitasakhrani’s picture

Status: Active » Needs review

Removed the unused variable from SearchLinks.php.
Please review the changes. Thankyou.

angel_devoeted’s picture

Tested and reviewed the changes locally.
The diff is clean, the syntax check passes, and it correctly removes the unused inline $route_name assignment while leaving the rest of the file intact.

Looks good!

dydave’s picture

Thanks a lot everyone!

Great catch!

Indeed ... The MR looks good ...

Just need a tiny bit of time to be able to merge all this.

I'll try coming back to this issue as soon as I can find a bit of time.

Thanks again!