Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect variable names #247

Closed
1 task done
Sidsector9 opened this issue Apr 25, 2022 · 3 comments · Fixed by #277
Closed
1 task done

Fix incorrect variable names #247

Sidsector9 opened this issue Apr 25, 2022 · 3 comments · Fixed by #277
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@Sidsector9
Copy link
Contributor

Sidsector9 commented Apr 25, 2022

Is your enhancement related to a problem? Please describe.

In few places, the return value of wp_remote_get is assigned to a variable called $request instead of $response.

For example:

https://github.com/globeandmail/sophi-for-wordpress/blob/23a26be24eec064a68e5fa5b526726372d41a3fd/includes/classes/SiteAutomation/Request.php#L213

This can be confusing and can be improved.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jeffpaul jeffpaul added this to the 1.0.15 milestone Apr 25, 2022
@jeffpaul jeffpaul added good first issue Good for newcomers help wanted Extra attention is needed labels Apr 25, 2022
@cadic
Copy link
Contributor

cadic commented Apr 29, 2022

In both Request::request() and Auth::request_access_token() functions, the actual $response is being assigned later after conditional checks.

In this case, $result looks like a better variable name for the result of wp_remote_get

@jeffpaul jeffpaul modified the milestones: 1.2.0, 1.1.1 May 11, 2022
@jeffpaul
Copy link
Contributor

Leaving a note here that when we resolve this in a PR that we'll want to be precise in the changelog entry about this change in case someone's already relying on the "wrong" names?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants