Skip to content

Commit

Permalink
feat: @PhpCsFixer ruleset - enable php_unit_data_provider_static (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jan 20, 2024
1 parent 48a62f0 commit 27c0ba8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions doc/ruleSets/PhpCsFixerRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Rules
- `no_unset_on_property <./../rules/language_construct/no_unset_on_property.rst>`_
- `php_unit_data_provider_name <./../rules/php_unit/php_unit_data_provider_name.rst>`_
- `php_unit_data_provider_return_type <./../rules/php_unit/php_unit_data_provider_return_type.rst>`_
- `php_unit_data_provider_static <./../rules/php_unit/php_unit_data_provider_static.rst>`_ with config:

``['force' => true]``

- `php_unit_strict <./../rules/php_unit/php_unit_strict.rst>`_
- `php_unit_test_case_static_method_calls <./../rules/php_unit/php_unit_test_case_static_method_calls.rst>`_ with config:

Expand Down
6 changes: 5 additions & 1 deletion doc/rules/php_unit/php_unit_data_provider_static.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,16 @@ With configuration: ``['force' => false]``.
Rule sets
---------

The rule is part of the following rule set:
The rule is part of the following rule sets:

- `@PHPUnit100Migration:risky <./../../ruleSets/PHPUnit100MigrationRisky.rst>`_ with config:

``['force' => true]``

- `@PhpCsFixer:risky <./../../ruleSets/PhpCsFixerRisky.rst>`_ with config:

``['force' => true]``


References
----------
Expand Down
1 change: 1 addition & 0 deletions src/RuleSet/Sets/PhpCsFixerRiskySet.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public function getRules(): array
'no_unset_on_property' => true,
'php_unit_data_provider_name' => true,
'php_unit_data_provider_return_type' => true,
'php_unit_data_provider_static' => ['force' => true],
'php_unit_strict' => true,
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
'static_lambda' => true,
Expand Down

0 comments on commit 27c0ba8

Please sign in to comment.