Download the PHP package zebra-north/phpcs-short-types without Composer
On this page you can find all versions of the php package zebra-north/phpcs-short-types. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download zebra-north/phpcs-short-types
More information about zebra-north/phpcs-short-types
Files in zebra-north/phpcs-short-types
Download zebra-north/phpcs-short-types
More information about zebra-north/phpcs-short-types
Files in zebra-north/phpcs-short-types
Vendor zebra-north
Package phpcs-short-types
Short Description Require the use of short scalar type names (bool, int) in comments, instead of long names (boolean, integer).
License MIT
Package phpcs-short-types
Short Description Require the use of short scalar type names (bool, int) in comments, instead of long names (boolean, integer).
License MIT
Please rate this library. Is it a good library?
Informations about the package phpcs-short-types
Short Type Names for PHP Codesniffer
PHP Codesniffer requires that scalar types be written in their long form, eg. boolean
or integer
.
As of PHP 7+, scalars are required to be written in their short form, eg. bool
or int
.
This patch allows you to use the short form in doc-block comments.
Before:
After:
Errors Fixed
- Squiz.Commenting.FunctionComment.IncorrectParamVarName
- Expected "boolean" but found "bool" for parameter type
- Expected "integer" but found "int" for parameter type
- Squiz.Commenting.VariableComment.IncorrectVarType
- Expected "boolean" but found "bool" for @var tag in member variable comment
- Expected "integer" but found "int" for @var tag in member variable comment
- Squiz.Commenting.FunctionComment.InvalidReturn
- Expected "boolean" but found "bool" for function return type
- Expected "integer" but found "int" for function return type
Installation
- Install into composer with:
composer require --dev zebra-north/phpcs-short-types
- Edit your project's
phpcs.xml
to add a bootstrap file:
Known Issues
This will not suggest bool
/int
if you have used boolean
/integer
- that would require patching PHP Codesniffer. A patch has been created, but not yet merged:
All versions of phpcs-short-types with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.0
The package zebra-north/phpcs-short-types contains the following files
Loading the files please wait ....