tpay-com/coding-standards

Tpay.com coding standards library

1.0.1 2023-08-22 10:49 UTC

This package is auto-updated.

Last update: 2024-12-22 13:51:12 UTC


README

Latest stable version PHP version License CI status Type coverage

Installation

Run command:

composer require --dev tpay-com/coding-standards

Usage

Create .php-cs-fixer.php file and use Tpay\CodingStandards\PhpCsFixerConfigFactory:

<?php

require __DIR__ . '/vendor/tpay-com/coding-standards/bootstrap.php';

return Tpay\CodingStandards\PhpCsFixerConfigFactory::createWithAllRules()
    ->setFinder(
        PhpCsFixer\Finder::create()
            ->ignoreDotFiles(false)
            ->in(__DIR__)
    );

Instead of createWithAllRules you can use method createWithNonRiskyRules to use only non-risky fixers.

Use method createWithLegacyRules to use only set of fixers that is safe down to PHP 5.6.