Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Conversation

@shawcohn
Copy link
Contributor

@shawcohn shawcohn commented Mar 1, 2015

This is for adding space after NOT operators to conform with the WordPress PHP Coding Standards. See the section on logical comparisons under spacing: https://make.wordpress.org/core/handbook/coding-standards/php/#space-usage

wp-phptidy.php Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a pretty strange echo. Debugging artifact?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch.

@scribu
Copy link
Owner

scribu commented Mar 1, 2015

Can you post a few "before and after" examples of this new behavior?

@scribu
Copy link
Owner

scribu commented Mar 1, 2015

Actually, I think this would be a good time to introduce some phpunit tests that cover all the branches touched by the pull request: T_IF, T_WHILE etc.

@scribu
Copy link
Owner

scribu commented Mar 1, 2015

I know that, compared to implementing a new feature, writing tests seems like a chore, but it's necessary, particularly for such a script, with many many branches.

If you're not familiar with PHPUnit, just give me the test cases, i.e. "this bit of incorrect PHP should look like this after I run it through wp-phptidy", I'll translate them to working PHPUnit tests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants