Skip to content

CS/QA: various small tweaks #256

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

Merged
merged 7 commits into from
Jun 7, 2022
Merged

CS/QA: various small tweaks #256

merged 7 commits into from
Jun 7, 2022

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Jun 6, 2022

CS/QA: use single quotes for text strings without embedded variables

CS/QA: always have a comma after each item in multi-line arrays

CS/QA: use self to refer to current class

CS/QA: no need for parentheses with require/include

These are language constructs, not functions, so the parentheses are unnecessary.

CS/QA: consistently use short arrays

This fixes up the one instance where there was still a long array used in the code base.

CS/QA: use strict comparisons

The Helper::findContainingOpeningBracket() method can return either an integer or null, so this comparison should be a strict comparison.

CS/QA: use pre-increment

... instead of post-increment as it is less prone to surprising results if code is moved around.

jrfnl added 7 commits June 7, 2022 01:19
These are language constructs, not functions, so the parentheses are unnecessary.
This fixes up the one instance where there was still a long array used in the code base.
The `Helper::findContainingOpeningBracket()` method can return either an integer or `null`, so this comparison should be a strict comparison.
... instead of post-increment as it is less prone to surprising results if code is moved around.
@jrfnl jrfnl requested a review from sirbrillig June 6, 2022 23:21
@sirbrillig sirbrillig merged commit 5058218 into 2.x Jun 7, 2022
@sirbrillig sirbrillig deleted the feature/cs-various-tweaks branch June 7, 2022 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants