Skip to content

Core: forbid assignments in conditions#1661

Merged
GaryJones merged 1 commit into
developfrom
feature/core-no-assignments-in-condition
Apr 3, 2019
Merged

Core: forbid assignments in conditions#1661
GaryJones merged 1 commit into
developfrom
feature/core-no-assignments-in-condition

Conversation

@jrfnl

@jrfnl jrfnl commented Mar 27, 2019

Copy link
Copy Markdown
Member

Move the WordPress.CodeAnalysis.AssignmentInCondition from the Extra ruleset to the Core ruleset.

As per the proposal in https://make.wordpress.org/core/2019/03/26/coding-standards-updates-for-php-5-6/

Open actions:

  • Adjust Core PHP handbook to mention this rule in the Clever code section

/cc @pento

@pento

pento commented Apr 2, 2019

Copy link
Copy Markdown
Member

Handbook is updated.

As per the proposal in https://make.wordpress.org/core/2019/03/26/coding-standards-updates-for-php-5-6/

Open actions:
* [x] Adjust Core PHP handbook to mention this rule in the `Clever code` section
@jrfnl jrfnl force-pushed the feature/core-no-assignments-in-condition branch from c829b63 to cce11ae Compare April 3, 2019 05:16
@jrfnl

jrfnl commented Apr 3, 2019

Copy link
Copy Markdown
Member Author

Thanks @pento !

I've updated the PR to use the exact text from the handbook in the inline documentation, as well as changed the placement of the rule to match the order of the rules in the handbook.

If there are no objections, this is ready for merge now.

@GaryJones GaryJones merged commit f04207c into develop Apr 3, 2019
@GaryJones GaryJones deleted the feature/core-no-assignments-in-condition branch April 3, 2019 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants