Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed Jun 21, 2024
1 parent 3e95902 commit 5aec29b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ In your PHP CS Fixer configuration file, use the following contents:
<?php

use Realodix\Relax\Config;
use Realodix\Relax\RuleSet\Sets\Realodix;
use Realodix\Relax\RuleSet\Sets\Laravel;

return Config::create(new Realodix);
return Config::create(new Laravel);
```

#### Rule Sets
#### Presets

Rule set defines a set of rules that can be used to fix code style issues in your code.
Presets defines a set of rules that can be used to fix code style issues in your code. To use presets in your PHP code, you need to use the `Realodix\Relax\RuleSet\Sets\` namespace.

| Preset | Description |
| -------------------------- |-------------|
Expand Down Expand Up @@ -78,6 +78,7 @@ In case you only need some tweaks for specific projects, which won't deserve an

use Realodix\Relax\Config;
use Realodix\Relax\Finder;
use Realodix\Relax\RuleSet\Sets\Laravel;

// You can add or override rule set
$localRules = [
Expand All @@ -101,7 +102,7 @@ $finder = Finder::laravel(__DIR__.'Foo')
->notName('*.foo.php')
->append(['.php-cs-fixer.dist.php']);

return Config::create('@PSR2', $localRules)
return Config::create(new Laravel, $localRules)
->setFinder($finder)
->setRiskyAllowed(false)
->registerCustomFixers(new \PhpCsFixerCustomFixers\CustomFixer());
Expand Down

0 comments on commit 5aec29b

Please sign in to comment.