1.0.0-alpha2 - 2020-02-18
Pre-release
Pre-release
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.
- This sniff contains a
- 📊
Universal.UseStatements.DisallowUseClass/Function/Const
: new, additional metrics about the import source will be shown in theinfo
report. #25
Other
- Readme: installation instructions and sniff list. #26
Changed
Universal
Universal.Arrays.DuplicateArrayKey
: wording of the error message. #18Universal.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
foruse
statements importing from the same namespace;FoundGlobalNamespace
,FoundGlobalNamespaceWithAlias
foruse
statements importing from the global namespace, like import statements for PHP native classes, functions and constants.
FoundWithAlias
andFoundWithoutAlias
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. #34Universal.ControlStructures.IfElseDeclaration
: the fixer will now respect tab indentation. #19Universal.UseStatements.DisallowUseClass/Function/Const
: the determination of whether a import is aliased in now done in a case-insensitive manner. #25Universal.UseStatements.DisallowUseClass/Function/Const
: an import from the global namespace would previously always be seen as non-aliased, even when it was aliased. #25Universal.UseStatements.DisallowUseClass/Function/Const
: improved tolerance foruse
import statements with leading backslashes. #25