Skip to content

Commit

Permalink
Create example_ruleset.md
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed Jul 9, 2024
1 parent 8a97ca7 commit 923da39
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/example_ruleset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
```php
<?php

use Realodix\Relax\RuleSet\AbstractRuleSet;

class MyRuleSet extends AbstractRuleSet
{
// This method is optional. If not implemented, Relax will use
// the class name itself as the ruleset name.
public function name(): string
{
// ...
}

/**
* PHP-CS-Fixer rules
*/
public function rules(): array
{
return [
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
// ...
];
}
}
```

0 comments on commit 923da39

Please sign in to comment.