Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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