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

Expected 1 space before closing PHP tag; 0 found . #1065

Closed
CheoWalker opened this issue Jul 25, 2017 · 3 comments
Closed

Expected 1 space before closing PHP tag; 0 found . #1065

CheoWalker opened this issue Jul 25, 2017 · 3 comments

Comments

@CheoWalker
Copy link

Expected 1 space before closing PHP tag; 0 found show as a fixable issue, but when running the code sniffer fix the issue is not fix and I have to manual make the fix.

@jrfnl
Copy link
Member

jrfnl commented Jul 25, 2017

What version of WPCS and PHPCS are you using ? And can you please show a code sample ?

This sounds like a duplicate of an upstream bug which has been solved, but is not yet in an official release. See: #1017

@CheoWalker
Copy link
Author

CheoWalker commented Jul 26, 2017

I am using version 0.12.0 of WPCS and version 2.9.1 of PHPCS.

Code Sample:

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>

I have manually changed the code to:

`<?php
// Are there comments to navigate through?

if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :

?>`

@jrfnl
Copy link
Member

jrfnl commented Jul 26, 2017

@CheoWalker Thanks for getting back to me. Your code sample confirms that this is a duplicate of #1017.

This is fixed upstream in PHPCS itself. The fix is contained within the PHPCS 3.0.2 release and will also be in the PHPCS 2.9.2 release.

@jrfnl jrfnl marked this as a duplicate of #1017 Jul 26, 2017
@jrfnl jrfnl closed this as completed Jul 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants