Skip to content

Commit

Permalink
feat: change default ruleset to @PER-CS (only behind PHP_CS_FIXER_F…
Browse files Browse the repository at this point in the history
…UTURE_MODE=1) (#7650)
  • Loading branch information
keradus committed Jan 1, 2024
1 parent 600e630 commit 29d5159
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,20 @@ class Config implements ConfigInterface
*
* @var array<string, array<string, mixed>|bool>
*/
private array $rules = ['@PSR12' => true];
private array $rules;

private bool $usingCache = true;

public function __construct(string $name = 'default')
{
$this->name = $name;
// @TODO 4.0 cleanup
if (Utils::isFutureModeEnabled()) {
$this->name = $name.' (future mode)';
$this->rules = ['@PER-CS' => true];
} else {
$this->name = $name;
$this->rules = ['@PSR12' => true];
}
}

public function getCacheFile(): string
Expand Down

0 comments on commit 29d5159

Please sign in to comment.