-
Notifications
You must be signed in to change notification settings - Fork 384
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 various PHPCS issues #1002
Fix various PHPCS issues #1002
Conversation
@paulschreiber if you re-base you recent pull requests against Also, feel free to combine your commits into a single PR that fixes multiple phpcs issues in one go. No need for separate PRs for each commit. |
|
Normally that's good, but these PRs are almost all PHPCS fixes which can be easily reviewed together. Having a separate PR for each just creates too much noise.
A fix just landed in So just |
Please then feel free to |
a5eeba0
to
65fcf5a
Compare
I've rebased and cherry-picked the commits (except for #1000, as it's not clear what do there). |
…ts_pixel_url(); sanitize HTTP_HOST
@westonruter What's causing Travis CI to fail here? |
This commit (be6a78a) doesn't touch |
@paulschreiber there are multiple errors: https://travis-ci.org/Automattic/amp-wp/jobs/351608818#L315-L337 PHPCS via wp-dev-lib is looking at changes made to the entire diff in the PR, not individual commits in the PR. Because you added |
Adding the doc comments would be great. |
… into fix/admin-bar
I've added many doc comments. PHPCS is still finding a few errors:
Should we leave those for now? |
includes/class-amp-theme-support.php
Outdated
@@ -229,7 +229,7 @@ public static function add_hooks() { | |||
* Disable admin bar because admin-bar.css (28K) and Dashicons (48K) alone | |||
* combine to surpass the 50K limit imposed for the amp-custom style. | |||
*/ | |||
add_filter( 'show_admin_bar', '__return_false', 100 ); | |||
add_filter( 'show_admin_bar', '__return_false', 100 ); // phpcs:ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually isn't necessary. The PHPCS ruleset does not include the AdminBarRemoval WordPress.com VIP sniff. You should make sure to use the project's own ruleset when developing.
This reverts commit a5eeba0.
…OneClassPerFile.MultipleFound
array( | ||
'url' => $url, | ||
'video_id' => $video_id, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside: things like this are more elegant as compact( 'url', 'video_id' )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that compact is better. phpcbf
reformatted it as above (expanded).
No description provided.