https://github.com/dflydev/dflydev-php-coding-standards
dflydev's PHP coding standards
https://github.com/dflydev/dflydev-php-coding-standards
Last synced: 11 months ago
JSON representation
dflydev's PHP coding standards
- Host: GitHub
- URL: https://github.com/dflydev/dflydev-php-coding-standards
- Owner: dflydev
- License: mit
- Created: 2023-03-21T17:05:53.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-23T23:38:31.000Z (almost 2 years ago)
- Last Synced: 2025-03-15T04:14:00.881Z (over 1 year ago)
- Language: PHP
- Size: 20.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dragonfly PHP Coding Standards
### Usage
```bash
composer require dflydev/php-coding-standards
```
Create a new `.php-cs-fixer.dist.php` file and within it add the following:
```php
use Ergebnis\PhpCsFixer\Config;
$config = Config\Factory::fromRuleSet(new Dflydev\PhpCsFixer\Config\RuleSet\Dflydev());
$config->getFinder()->in(__DIR__);
$config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache');
return $config;
```
### Configuration with override rules
💡 Optionally override rules from a rule set by passing in an array of rules to be merged in:
```php
use Ergebnis\PhpCsFixer\Config;
$config = Config\Factory::fromRuleSet(new Dflydev\PhpCsFixer\Config\RuleSet\Dflydev(), [
'mb_str_functions' => false,
'strict_comparison' => false,
]);
$config->getFinder()->in(__DIR__);
$config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache');
return $config;
```