fox91 / coding-standard
fox91 Coding Standard
Installs: 4 339
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:phpcodesniffer-standard
Requires
- php: ^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0
- dealerdirect/phpcodesniffer-composer-installer: ^1.0.0
- phpcompatibility/php-compatibility: ^9.3
- sirbrillig/phpcs-import-detection: ^1.3
- sirbrillig/phpcs-variable-analysis: ^2.11
- slevomat/coding-standard: ^8.1.0
- squizlabs/php_codesniffer: ^3.6
Suggests
- pheromone/phpcs-security-audit: [--dev] A set of PHP_CodeSniffer rules that finds vulnerabilities and weaknesses related to security in PHP code
README
Compatible with PHP 7.4
, 8.0
, 8.1
, 8.2
and 8.3
.
Included tools
- PHP_CodeSniffer
dealerdirect/phpcodesniffer-composer-installer
: PHP_CodeSniffer Standards Composer Installerpheromone/phpcs-security-audit
: finds vulnerabilities and weaknesses related to securitysirbrillig/phpcs-import-detection
: look for unused or unimported symbolssirbrillig/phpcs-variable-analysis
: detect problems with variablesslevomat/coding-standard
: complements Consistence Coding Standard by providing sniffs with additional checksphpcompatibility/php-compatibility
: checks for PHP cross-version compatibility
Optional tools
pheromone/phpcs-security-audit
: finds vulnerabilities and weaknesses related to security in PHP code
Installation
composer require --dev fox91/coding-standard
Create a file named .phpcs.xml.dist
in the root of your project:
<?xml version="1.0" encoding="UTF-8"?> <ruleset> <!-- https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset --> <!-- https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage --> <arg name="extensions" value="php"/> <arg name="tab-width" value="4"/> <arg name="basepath" value="."/> <arg name="parallel" value="80"/> <arg name="report" value="full"/> <arg name="cache" value=".phpcs.cache"/> <arg value="s"/> <file>src</file> <file>tests</file> <config name="ignore_warnings_on_exit" value="1"/> <config name="ParanoiaMode" value="1"/> <!-- PHPCompatibility config --> <!-- <config name="testVersion" value="7.4"/> --> <rule ref="Fox91CodingStandard"/> <!-- <rule ref="Fox91CodingStandardStrict"/> --> </ruleset>