clntdev/coding-standards

There is no license information available for the latest version (1.1.0) of this package.

Personal PHP Coding Standards

1.1.0 2024-01-22 19:22 UTC

This package is auto-updated.

Last update: 2024-12-22 21:23:48 UTC


README

A standard set of linting rules for PHP projects.

Installation

You can then install the package via composer:

composer require clntdev/coding-standards --dev

Standard composer scripts

Below are the scripts that you should add to your composer.json to simplify working with these tools.

Note doc-check can be removed from the below scripts if not in use

"scripts": {
  "php-lint": "vendor/bin/parallel-lint --exclude vendor --exclude node_modules --exclude sdk/vendor .",
  "phpcs": "vendor/bin/phpcs YOUR_DIRECTORIES --standard=./vendor/clntdev/coding-standards/phpcs.xml",
  "doc-check": "vendor/bin/php-doc-check YOUR_DIRECTORIES",
  "lint": [
    "@composer php-lint",
    "@composer phpcs",
    "@composer doc-check",
  ],
  "cbf": "vendor/bin/phpcbf YOUR_DIRECTORIES --standard=./vendor/clntdev/coding-standards/phpcs.xml",
}