1.0.0-alpha2 - 2020-02-16
Pre-release
Pre-release
Note: While still in alpha, some BC-breaks may be introduced. These are clearly indicated in the changelog with the
Added
- New
PHPCSUtils\Utils\ControlStructuresclass: Utility functions for use when examining control structures. #70 - New
PHPCSUtils\Utils\FunctionDeclarations::isArrowFunction()method. #77, #79 - New
PHPCSUtils\Utils\FunctionDeclarations::getArrowFunctionOpenClose()method. #77, #79
PHPCS Backcompat
BCFile::isReference(): support for arrow functions returning by reference. #77BCFile::getMethodParameters(): support for arrow functions. #77, #79BCFile::getMethodProperties(): support for arrow functions. #77, #79, #89BCFile::getDeclarationName(): allow functions to be called "fn". #77BCFile::findEndOfStatement(): support for arrow functions. #77, #79BCFile::findStartOfStatement(): support for arrow functions. #77
Tokens
- New
Collections::$alternativeControlStructureSyntaxTokensproperty. #70 - New
Collections::$alternativeControlStructureSyntaxCloserTokensproperty. #68, #69 - New
Collections::$controlStructureTokensproperty. #70 - New
Collections::arrowFunctionTokensBC()method. #79
Utils
Arrays::getDoubleArrowPtr(): support for arrow functions. #77, #79, #84FunctionDeclarations::getParameters(): support for arrow functions. #77, #79FunctionDeclarations::getProperties(): support for arrow functions. #77, #79Operators::isReference(): support for arrow functions returning by reference. #77Parentheses::getOwner(): support for arrow functions. #77Parentheses::isOwnerIn(): support for arrow functions. #77, #79
Other
- Documentation website at https://phpcsutils.com/
Changed
PHPCS Backcompat
BCFile::getCondition(): sync with PHPCS 3.5.4 - added support for new$firstparameter. #73
Tokens
- The
Collections::$returnTypeTokensproperty now includesT_ARRAYto allow for supporting arrow functions in PHPCS < 3.5.3. #77
Utils
⚠️ Conditions::getCondition(): sync with PHPCS 3.5.4 - renamed the existing$reverseparameter to$firstand reversing the meaning of the boolean values, to stay in line with PHPCS itself. #73⚠️ Numbers: the$unsupportedPHPCSVersionsproperty has been replaced with anUNSUPPORTED_PHPCS_VERSIONconstant.
Other
- Various housekeeping.