tpay-com / coding-standards
Tpay.com coding standards library
Installs: 1 556
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: ^7.4 || ^8.0
- kubawerlos/php-cs-fixer-custom-fixers: ^3.16.2
- php-cs-fixer/shim: ^3.22
Requires (Dev)
- phpunit/phpunit: ^9.6.11
- vimeo/psalm: ^5.15.0
README
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.