Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aeyoll/kaizen-agency-php-cs-rule-set
https://github.com/aeyoll/kaizen-agency-php-cs-rule-set
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aeyoll/kaizen-agency-php-cs-rule-set
- Owner: aeyoll
- Created: 2024-08-16T13:31:43.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-16T08:33:28.000Z (2 months ago)
- Last Synced: 2024-10-18T01:17:34.462Z (2 months ago)
- Language: PHP
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kaizen Agency PHP CS Rule Sets
Installation:
---```bash
composer require --dev friendsofphp/php-cs-fixer kaizen-agency/php-cs-rule-set
```Configuration:
---In `.php-cs-fixer.dist.php`:
```php
in(__DIR__)
->exclude([
'vendor',
'tests',
// Add more directories here if needed
]);return (new PhpCsFixer\Config())
->setRules((new KaizenAgency\PhpCsRuleSet\Config\PhpRuleSet())->getRules())
// ->setRules((new KaizenAgency\PhpCsRuleSet\Config\Php80RuleSet())->getRules()) // Uncomment to use PHP 8.0 rules
->setFinder($finder)
// ->setIndent(" ") // Uncomment to use two spaces instead of four
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect());
```Usage:
---```bash
vendor/bin/php-cs-fixer check # Run the linter
vendor/bin/php-cs-fixer fix # Fix the code
```Available rules:
---- PhpRuleSet
- Php70RuleSet
- Php71RuleSet
- Php72RuleSet
- Php73RuleSet
- Php74RuleSet
- Php80RuleSet
- Php81RuleSet
- Php82RuleSet
- Php83RuleSet
- Php84RuleSet