![]() ℹ️ The PHPCSUtils package includes the Composer PHPCS plugin. You can start using all the utility functions, abstract sniff classes and other features of PHPCSUtils straight away. Run the following from the root of your external PHPCS standard's project:Ĭomposer config alerdirect/phpcodesniffer-composer-installer trueĬomposer require phpcsstandards/phpcsutils: "^1.0 " If your external PHP_CodeSniffer standard only supports Composer-based installs, integrating PHPCSUtils is pretty straight forward. Integrating PHPCSUtils in your external PHPCS standard Composer-based PCRE with Unicode support (normally enabled by default).Recommended PHP extensions for optimal functionality:.To see detailed information about all the available abstract sniffs, utility functions and PHPCS helper functions, have a read through the extensive documentation. This package allows you to use the latest version of those utility functions in all PHP_CodeSniffer versions from PHPCS 3.7.1 and up. Normally to use the latest version of PHP_CodeSniffer native utility functions, you would have to raise the minimum requirements of your external PHPCS standard. ![]() Use the latest version of PHP_CodeSniffer native utility functions ![]() Test utilitiesĪn abstract UtilityMethodTestCase class to support testing of your utility methods written for PHP_CodeSniffer. These classes take most of the heavy lifting away for some frequently occurring sniff types. Several abstract sniff classes which your sniffs can extend These are additional "token groups" to compliment the ones available through the PHPCS native PHP_CodeSniffer\Util\Tokens class. A collection of static properties and methods for often-used token groupsĬollections of related tokens often-used and needed for sniffs. These functions are compatible with PHPCS 3.7.1 up to PHPCS master. Includes improved versions of the PHPCS native utility functions and plenty of new utility functions. Whether you need to split an array into the individual items, are trying to determine which variables are being assigned to in a list() or are figuring out whether a function has a DocBlock, PHPCSUtils has got you covered! An ever-growing number of utility functions for use with PHP_CodeSniffer
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |