Yet another PHP coding standard
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
composer.json
phpcs.xml

README.md

PHP Coding Standard

Yet another PHP coding standard.

Packagist Version License

Installation

composer require redaxmedia/php-coding-standard

Usage

Refer the coding standard inside your phpcs.xml file:

<ruleset>
	<rule ref="vendor/redaxmedia/php-coding-standard/phpcs.xml" />
</ruleset>

Exclude controversial TypeHintDeclaration rules:

<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification">
	<exclude-pattern>*</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification">
	<exclude-pattern>*</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversablePropertyTypeHintSpecification">
	<exclude-pattern>*</exclude-pattern>
</rule>