diff --git a/src/ConfigBuilder.php b/src/ConfigBuilder.php index b81da6af..54ab11ec 100644 --- a/src/ConfigBuilder.php +++ b/src/ConfigBuilder.php @@ -71,6 +71,16 @@ public function addFiles(array $files): self return $this; } + /** + * @param list $files + */ + public function exclude(array $files): self + { + $this->getFinder()->exclude($files); + + return $this; + } + public function getConfig(): ConfigInterface { return $this->config->setRules($this->ruleSet->rules()); diff --git a/src/RuleSets/DefaultSet.php b/src/RuleSets/DefaultSet.php index 475c2142..1c2ff468 100644 --- a/src/RuleSets/DefaultSet.php +++ b/src/RuleSets/DefaultSet.php @@ -148,6 +148,9 @@ public function rules(): array 'self_static_accessor' => true, 'no_useless_else' => true, 'no_useless_return' => true, + 'class_definition' => [ + 'space_before_parenthesis' => false, + ], /* * @PhpCsFixer:risky diff --git a/src/RuleSets/ExtendedPERSet.php b/src/RuleSets/ExtendedPERSet.php index ff546d02..75aac8ad 100644 --- a/src/RuleSets/ExtendedPERSet.php +++ b/src/RuleSets/ExtendedPERSet.php @@ -44,11 +44,15 @@ public function rules(): array '@PER-CS2.0' => true, /* - * @Symfony + * @PER-CS2.0 Overrides */ - 'phpdoc_align' => [ - 'align' => 'left', + 'class_definition' => [ + 'space_before_parenthesis' => false, ], + + /* + * @Symfony + */ 'yoda_style' => [ 'equal' => false, 'identical' => false, @@ -166,9 +170,9 @@ public function rules(): array 'use_parentheses' => false, ], 'phpdoc_line_span' => [ - 'const' => 'multi', + 'const' => null, 'method' => 'multi', - 'property' => 'multi', + 'property' => null, ], ], $this->rules); }