airmedia/coding-standard

Coding standard for Airmedia's projects

Installs: 7 986

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:phpcodesniffer-standard

3.2.1 2023-12-14 11:43 UTC

README

Ruleset for PHP_CodeSniffer.

Installation

  1. Install the package via composer:
$ composer require --dev airmedia/coding-standard
  1. Add composer scripts into your composer.json:
"scripts": {
  "cs-check": "phpcs",
  "cs-fix": "phpcbf"
}
  1. Create file phpcs.xml:
<?xml version="1.0"?>
<ruleset>
    <arg name="basepath" value="." />
    <arg name="extensions" value="php" />
    <arg name="parallel" value="80" />
    <arg name="cache" value=".phpcs-cache" />
    <arg name="colors" />
    
    <file>src</file>
    <file>tests</file>
    
    <rule ref="Airmedia" />
</ruleset>