Skip to content

Flag for allowing short echo tags #2045

Closed
@justintadlock

Description

@justintadlock

This is a request from the WordPress themes codesniffer, which is an extension of this project. See original ticket: WPTT/WPThemeReview#142

Essentially, we want to allow short echo tags (<?=), which are always available since PHP 5.4.

Reference:

I'm not familiar enough with the code on the project to say exactly what needs to be done, so I'm just going to copy/paste the response from one of the devs on the project:

The current sniff we use - Generic.PHP.DisallowShortOpenTag - does not allow for an exception easily, however as it is a good sniff, it would be kind of silly to duplicate it.

As the sniff comes from PHPCS itself, I think the best course of action would be to propose a custom property to be added to the sniff which can toggle whether "short open echo" is allowed or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions