Problem/Motivation

It seems the $response variable here is never used: https://git.drupalcode.org/project/metatag/-/blob/adc0cf9f23ce4c2e2f0152...
It could probably be removed.

Steps to reproduce

Proposed resolution

Remove the variable (but keep the drupalGet() call).

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork metatag-3590487

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.

enomo103 made their first commit to this issue’s fork.

enomo103’s picture

pre-existing phpstan warnings, unrelated to this change

avinash.jha’s picture

Status: Active » Reviewed & tested by the community

I have reviewed and tested the changes in this issue fork (`3590487-unused-variable-in`).

The unused `$response` variable assignment before the `$this->drupalGet($url)` call in `tests/src/Functional/NodeJsonOutputTest.php` was successfully removed while correctly preserving the core function call. I also verified that the remaining `$response` variable used further down in the file is actively utilized in subsequent assertions and `json_decode`.

Additionally, I ran PHPCS (`phpcs --standard=Drupal,DrupalPractice`), and the file passes Drupal coding standards without any errors.

Looks good to me Moving this to RTBC.

damienmckenna’s picture

Short & sweet, thank you.

Adding this to the next stable release.

damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thank you!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.