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

New Universal.PHP.OneStatementInShortEchoTag sniff #89

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 21, 2021

Sniff to disallow short open echo tags <?= containing more than one PHP statement.

When using short open echo tags, PHP will echo out the result of the first statement. Subsequent statements will not be echo-ed out, but will be treated as "normal" PHP.
As a best practice, short open echo tags should contain only one statement.

Includes fixer.
Includes unit tests.
Includes documentation.

Sniff to disallow short open echo tags `<?=` containing more than one PHP statement.

When using short open echo tags, PHP will echo out the result of the first statement. Subsequent statements will not be echo-ed out, but will be treated as "normal" PHP.
As a best practice, short open echo tags should contain only one statement.

Includes fixer.
Includes unit tests.
Includes documentation.
@jrfnl jrfnl added this to the 1.0.0-alpha4 milestone Apr 21, 2021
@jrfnl jrfnl merged commit 3ac226b into develop Apr 21, 2021
@jrfnl jrfnl deleted the universal/new-onestatementinshortechotag-sniff branch April 21, 2021 18:42
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.

None yet

1 participant