Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed Jul 1, 2024
1 parent 6c888b4 commit 4f16327
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ public function setRules(array $rules = []): ConfigInterface
}

/**
* Create a new config
* Create a new config.
*
* @param null|RuleSetInterface|string $ruleSet The ruleset to use.
* @return self
*
* @throws RulesetNotFoundException If the rule set does not exist.
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Sets/RealodixPlus.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* Inherits Realodix preset
*
* @see Realodix\Relax\RuleSet\Realodix
* @see Realodix\Relax\RuleSet\Sets\Realodix
*/
final class RealodixPlus extends AbstractRuleSet
{
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/ValidRulesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use PhpCsFixer\FixerFactory;
use PhpCsFixer\RuleSet\RuleSet as PhpCsFixerRuleSet;
use PHPUnit\Framework\TestCase;
use Realodix\Relax\Config;
use Realodix\Relax\RuleSet\RuleSetInterface;

class ValidRulesTest extends TestCase
{
Expand Down Expand Up @@ -38,9 +38,9 @@ public function testRealodixPlusReturnsAValidPhpCsFIxerRules(): void
/**
* Remove PHP-CS-Fixer rule sets (@...) and custom fixer.
*/
protected function resolveRules($ruleSet): array
protected function resolveRules(RuleSetInterface $ruleSet): array
{
$rules = Config::create($ruleSet)->getRules();
$rules = $ruleSet->rules();

foreach ($rules as $key => $value) {
if (preg_match('/^(@|[a-zA-Z0-9]+\/)/', $key)) {
Expand Down

0 comments on commit 4f16327

Please sign in to comment.