enterio/coding-standard

The Enterio Coding Standard as PHPCS ruleset.

Installs: 14

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:phpcodesniffer-standard

dev-master 2018-12-13 13:07 UTC

This package is auto-updated.

Last update: 2024-04-14 02:19:06 UTC


README

Enterio Coding Standard as PHPCS ruleset.

Installation

Install the coding standard with the following command:

composer require "enterio/coding-standard"

To use this coding standard in your project add the following phpcs.xml in the root directory:

<?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"/>

    <!-- Ignore warnings, show progress of the run and show sniff names -->
    <arg value="nps"/>

    <!-- Directories to be checked -->
    <file>src</file>
    <file>tests</file>

    <!-- Include full Doctrine Coding Standard -->
    <rule ref="Enterio"/>
</ruleset>

Usage

You can check for violations with phpcs:

vendor/bin/phpcs --standard=Enterio /path/to/file/to/validate

You can also do automatic fixes of violations with phpcbf:

vendor/bin/phpcbf --standard=Enterio /path/to/file/to/validate