Skip to content

Commit

Permalink
Update rules (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawerlos authored Jan 21, 2022
1 parent c852cb1 commit 623df12
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/Builder/Modifier/NonDefaultConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace PhpCsFixerConfig\Builder\Modifier;

use PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer;
use PhpCsFixerCustomFixers\Fixer\NoSuperfluousConcatenationFixer;

/**
* @internal
Expand Down Expand Up @@ -41,7 +40,6 @@ public function __invoke(array $rules): array
$rules['phpdoc_line_span'] = ['property' => 'single'];
$rules['trailing_comma_in_multiline'] = ['after_heredoc' => true, 'elements' => ['arguments', 'arrays', 'parameters']];
$rules['yoda_style'] = ['equal' => false, 'identical' => false, 'less_and_greater' => false];
$rules[NoSuperfluousConcatenationFixer::name()] = ['allow_preventing_trailing_spaces' => true];

return $rules;
}
Expand Down
2 changes: 2 additions & 0 deletions src/Builder/Modifier/UnwantedRulesFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
final class UnwantedRulesFilter
{
private const UNWANTED_RULES = [
'blank_line_after_opening_tag',
'combine_consecutive_issets',
'combine_consecutive_unsets',
'general_phpdoc_annotation_remove',
'global_namespace_import',
'group_import',
'linebreak_after_opening_tag',
'no_blank_lines_before_namespace',
'not_operator_with_space',
'not_operator_with_successor_space',
Expand Down
8 changes: 3 additions & 5 deletions src/Rules/LibraryRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function getRules(): array
'backtick_to_shell_exec' => true,
'binary_operator_spaces' => true,
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'blank_line_after_opening_tag' => false,
'blank_line_before_statement' => [
'statements' => [
'return',
Expand Down Expand Up @@ -132,7 +132,7 @@ public function getRules(): array
'is_null' => true,
'lambda_not_used_import' => true,
'line_ending' => true,
'linebreak_after_opening_tag' => true,
'linebreak_after_opening_tag' => false,
'list_syntax' => true,
'logical_operators' => true,
'lowercase_cast' => true,
Expand Down Expand Up @@ -367,9 +367,7 @@ public function getRules(): array
Fixer\NoNullableBooleanTypeFixer::name() => false,
Fixer\NoPhpStormGeneratedCommentFixer::name() => true,
Fixer\NoReferenceInFunctionDefinitionFixer::name() => true,
Fixer\NoSuperfluousConcatenationFixer::name() => [
'allow_preventing_trailing_spaces' => true,
],
Fixer\NoSuperfluousConcatenationFixer::name() => true,
Fixer\NoTrailingCommaInSinglelineFixer::name() => true,
Fixer\NoUselessCommentFixer::name() => true,
Fixer\NoUselessDirnameCallFixer::name() => true,
Expand Down
8 changes: 3 additions & 5 deletions src/Rules/ProjectRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function getRules(): array
'backtick_to_shell_exec' => true,
'binary_operator_spaces' => true,
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'blank_line_after_opening_tag' => false,
'blank_line_before_statement' => [
'statements' => [
'return',
Expand Down Expand Up @@ -110,7 +110,7 @@ public function getRules(): array
'is_null' => true,
'lambda_not_used_import' => true,
'line_ending' => true,
'linebreak_after_opening_tag' => true,
'linebreak_after_opening_tag' => false,
'list_syntax' => true,
'logical_operators' => true,
'lowercase_cast' => true,
Expand Down Expand Up @@ -345,9 +345,7 @@ public function getRules(): array
Fixer\NoNullableBooleanTypeFixer::name() => true,
Fixer\NoPhpStormGeneratedCommentFixer::name() => true,
Fixer\NoReferenceInFunctionDefinitionFixer::name() => true,
Fixer\NoSuperfluousConcatenationFixer::name() => [
'allow_preventing_trailing_spaces' => true,
],
Fixer\NoSuperfluousConcatenationFixer::name() => true,
Fixer\NoTrailingCommaInSinglelineFixer::name() => true,
Fixer\NoUselessCommentFixer::name() => true,
Fixer\NoUselessDirnameCallFixer::name() => true,
Expand Down

0 comments on commit 623df12

Please sign in to comment.