Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed May 22, 2024
1 parent 8fcf542 commit 2ce9b74
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doc/rules/alias/random_api_migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Configuration

Mapping between replaced functions with the new ones.

Allowed types: ``list<string>``
Allowed types: ``array``

Default value: ``['getrandmax' => 'mt_getrandmax', 'rand' => 'mt_rand', 'srand' => 'mt_srand']``

Expand Down
2 changes: 1 addition & 1 deletion doc/rules/class_notation/class_attributes_separation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Configuration
Dictionary of ``const|method|property|trait_import|case`` =>
``none|one|only_if_meta`` values.

Allowed types: ``list<string>``
Allowed types: ``array``

Default value: ``['const' => 'one', 'method' => 'one', 'property' => 'one', 'trait_import' => 'none', 'case' => 'none']``

Expand Down
7 changes: 7 additions & 0 deletions doc/rules/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,13 @@ Import

Each namespace use MUST go on its own line and there MUST be one blank line after the use statements block.

Internal
--------

- `configurable_fixer_template <./internal/configurable_fixer_template.rst>`_ *(risky)*

Configurable Fixers must declare Template type.

Language Construct
------------------

Expand Down
22 changes: 22 additions & 0 deletions doc/rules/internal/configurable_fixer_template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
====================================
Rule ``configurable_fixer_template``
====================================

Configurable Fixers must declare Template type.

Examples
--------

Example #1
~~~~~~~~~~

.. code-block:: diff
References
----------

- Fixer class: `PhpCsFixer\\Fixer\\Internal\\ConfigurableFixerTemplateFixer <./../../../src/Fixer/Internal/ConfigurableFixerTemplateFixer.php>`_
- Test class: `PhpCsFixer\\Tests\\Fixer\\Internal\\ConfigurableFixerTemplateFixerTest <./../../../tests/Fixer/Internal/ConfigurableFixerTemplateFixerTest.php>`_

The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.
2 changes: 1 addition & 1 deletion doc/rules/phpdoc/general_phpdoc_tag_rename.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Default value: ``true``

A map of tags to replace.

Allowed types: ``list<string>``
Allowed types: ``array``

Default value: ``[]``

Expand Down
2 changes: 1 addition & 1 deletion doc/rules/phpdoc/phpdoc_align.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spacingForB]``. If you want to define default spacing to more than 1 space use
``_default`` key in config array, e.g.: ``['tagA' => spacingForA, 'tagB' =>
spacingForB, '_default' => spacingForAllOthers]``.

Allowed types: ``int`` and ``list<int>``
Allowed types: ``int`` and ``array``

Default value: ``1``

Expand Down
2 changes: 1 addition & 1 deletion doc/rules/phpdoc/phpdoc_return_self_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Configuration

Mapping between replaced return types with new ones.

Allowed types: ``list<string>``
Allowed types: ``array``

Default value: ``['this' => '$this', '@this' => '$this', '$self' => 'self', '@self' => 'self', '$static' => 'static', '@static' => 'static']``

Expand Down
2 changes: 1 addition & 1 deletion doc/rules/phpdoc/phpdoc_separation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Configuration
Sets of annotation types to be grouped together. Use ``*`` to match any tag
character.

Allowed types: ``list<string[]>``
Allowed types: ``list<list<string>>``

Default value: ``[['author', 'copyright', 'license'], ['category', 'package', 'subpackage'], ['property', 'property-read', 'property-write'], ['deprecated', 'link', 'see', 'since']]``

Expand Down
2 changes: 1 addition & 1 deletion doc/rules/phpdoc/phpdoc_tag_type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Configuration

The list of tags to fix.

Allowed types: ``list<string>``
Allowed types: ``array``

Default value: ``['api' => 'annotation', 'author' => 'annotation', 'copyright' => 'annotation', 'deprecated' => 'annotation', 'example' => 'annotation', 'global' => 'annotation', 'inheritDoc' => 'annotation', 'internal' => 'annotation', 'license' => 'annotation', 'method' => 'annotation', 'package' => 'annotation', 'param' => 'annotation', 'property' => 'annotation', 'return' => 'annotation', 'see' => 'annotation', 'since' => 'annotation', 'throws' => 'annotation', 'todo' => 'annotation', 'uses' => 'annotation', 'var' => 'annotation', 'version' => 'annotation']``

Expand Down

0 comments on commit 2ce9b74

Please sign in to comment.