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\ControlStructures
class: 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::$alternativeControlStructureSyntaxTokens
property. #70 - New
Collections::$alternativeControlStructureSyntaxCloserTokens
property. #68, #69 - New
Collections::$controlStructureTokens
property. #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$first
parameter. #73
Tokens
- The
Collections::$returnTypeTokens
property now includesT_ARRAY
to allow for supporting arrow functions in PHPCS < 3.5.3. #77
Utils
⚠️ Conditions::getCondition()
: sync with PHPCS 3.5.4 - renamed the existing$reverse
parameter to$first
and reversing the meaning of the boolean values, to stay in line with PHPCS itself. #73⚠️ Numbers
: the$unsupportedPHPCSVersions
property has been replaced with anUNSUPPORTED_PHPCS_VERSION
constant.
Other
- Various housekeeping.