Skip to content

1.0.0-alpha2 - 2020-02-18

Pre-release
Pre-release
Compare
Choose a tag to compare
@jrfnl jrfnl released this 18 Feb 15:42
65e057f

Added

Universal

  • 🔧 📊 📚 New Universal.ControlStructures.DisallowAlternativeSyntax sniff to disallow using the alternative syntax for control structures. #23
    • This sniff contains a allowWithInlineHTML property to allow alternative syntax when inline HTML is used within the control structure. In all other cases, the use of the alternative syntax will still be disallowed.
    • The sniff has modular error codes to allow for making exceptions based on specific control structures and/or specific control structures in combination with inline HTML.
  • 📊 Universal.UseStatements.DisallowUseClass/Function/Const: new, additional metrics about the import source will be shown in the info report. #25

Other

  • Readme: installation instructions and sniff list. #26

Changed

Universal

  • Universal.Arrays.DuplicateArrayKey: wording of the error message. #18
  • Universal.UseStatements.DisallowUseClass/Function/Const: the error codes have been made more modular. #25
    Each of these sniffs now has four additional error codes:
    • FoundSameNamespace, FoundSameNamespaceWithAlias for use statements importing from the same namespace;
    • FoundGlobalNamespace, FoundGlobalNamespaceWithAlias for use statements importing from the global namespace, like import statements for PHP native classes, functions and constants.
    In all other circumstances, the existing error codes FoundWithAlias and FoundWithoutAlias will continue to be used.

Other

  • Improved formatting of the CLI documentation which can be viewed using --generator=text. #17
  • Various housekeeping.

Fixed

Universal

  • Universal.Arrays.DuplicateArrayKey: improved handling of parse errors. #34
  • Universal.ControlStructures.IfElseDeclaration: the fixer will now respect tab indentation. #19
  • Universal.UseStatements.DisallowUseClass/Function/Const: the determination of whether a import is aliased in now done in a case-insensitive manner. #25
  • Universal.UseStatements.DisallowUseClass/Function/Const: an import from the global namespace would previously always be seen as non-aliased, even when it was aliased. #25
  • Universal.UseStatements.DisallowUseClass/Function/Const: improved tolerance for use import statements with leading backslashes. #25