Skip to content

Commit

Permalink
Remove disabled rules from rulesets docs
Browse files Browse the repository at this point in the history
  • Loading branch information
julienfalque committed Nov 8, 2022
1 parent bb94db0 commit 5a78926
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion doc/ruleSets/PhpCsFixer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ Rules
- `phpdoc_var_annotation_correct_order <./../rules/phpdoc/phpdoc_var_annotation_correct_order.rst>`_
- `return_assignment <./../rules/return_notation/return_assignment.rst>`_
- `single_line_comment_style <./../rules/comment/single_line_comment_style.rst>`_
- `single_line_throw <./../rules/function_notation/single_line_throw.rst>`_
- `whitespace_after_comma_in_array <./../rules/array_notation/whitespace_after_comma_in_array.rst>`_
config:
``['ensure_single_space' => true]``
1 change: 0 additions & 1 deletion doc/ruleSets/SymfonyRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Rules
- `no_homoglyph_names <./../rules/naming/no_homoglyph_names.rst>`_
- `no_php4_constructor <./../rules/class_notation/no_php4_constructor.rst>`_
- `no_unneeded_final_method <./../rules/class_notation/no_unneeded_final_method.rst>`_
- `no_unreachable_default_argument_value <./../rules/function_notation/no_unreachable_default_argument_value.rst>`_
- `no_useless_sprintf <./../rules/function_notation/no_useless_sprintf.rst>`_
- `non_printable_character <./../rules/basic/non_printable_character.rst>`_
- `ordered_traits <./../rules/class_notation/ordered_traits.rst>`_
Expand Down
5 changes: 4 additions & 1 deletion src/Documentation/RuleSetDocumentationGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ public function generateRuleSetsDocumentation(RuleSetDescriptionInterface $defin

$doc .= "\n\n";

$rules = $definition->getRules();
$rules = array_filter(
$definition->getRules(),
static fn ($config) => false !== $config,
);

if (\count($rules) < 1) {
$doc .= 'This is an empty set.';
Expand Down

0 comments on commit 5a78926

Please sign in to comment.