Skip to content

Looking for a couple sniffs [question not bug] #1935

Closed
@AliceWonderMiscreations

Description

There are two sniffs I would like to add to my xml configuration, if they exist. If they do not I suppose I would have to write them, but...

  1. I want a sniff that throws a warning if the boolean strict_types is not declared at the top of the file (preferably to 1 but I suppose someone may have a reason to declare it to 0)

  2. I am very stubborn and really enjoy my closing ?> tag, but I would love a sniff that checks for extra white space after the last closing ?> and throws an error. Non-white space should not trigger an error, though I think it is bad practice to mix html and php it is legal - so only excessive white space (more than a single newline) should throw the error.

Do the sniffs I seek exist?

PSR2 actually catches the second but as a side effect of a different sniff.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions