Skip to content

Commit

Permalink
docs: better ConfigurableFixer allowed types (#8024)
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed May 20, 2024
1 parent 6da674a commit cd1922b
Show file tree
Hide file tree
Showing 74 changed files with 175 additions and 125 deletions.
2 changes: 1 addition & 1 deletion doc/rules/attribute_notation/ordered_attributes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Configuration
A list of FQCNs of attributes defining the desired order used when custom
sorting algorithm is configured.

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

Default value: ``[]``

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: ``array``
Allowed types: ``list<string>``

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

Expand Down
8 changes: 4 additions & 4 deletions doc/rules/class_notation/final_internal_class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Configuration
Class level attribute or annotation tags that must be omitted to fix the class,
even if all of the white list ones are used as well (case insensitive).

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

Default value: ``['@final', '@Entity', '@ORM\\Entity', '@ORM\\Mapping\\Entity', '@Mapping\\Entity', '@Document', '@ODM\\Document']``

Expand All @@ -35,7 +35,7 @@ Default value: ``['@final', '@Entity', '@ORM\\Entity', '@ORM\\Mapping\\Entity',
Class level attribute or annotation tags that must be set in order to fix the
class (case insensitive).

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

Default value: ``['@internal']``

Expand All @@ -54,7 +54,7 @@ Default value: ``false``
Class level attribute or annotation tags that must be omitted to fix the class,
even if all of the white list ones are used as well (case insensitive).

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

Default value: ``['final', 'Entity', 'ORM\\Entity', 'ORM\\Mapping\\Entity', 'Mapping\\Entity', 'Document', 'ODM\\Document']``

Expand All @@ -64,7 +64,7 @@ Default value: ``['final', 'Entity', 'ORM\\Entity', 'ORM\\Mapping\\Entity', 'Map
Class level attribute or annotation tags that must be set in order to fix the
class (case insensitive).

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

Default value: ``['internal']``

Expand Down
2 changes: 1 addition & 1 deletion doc/rules/class_notation/ordered_class_elements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Default value: ``false``

List of strings defining order of elements.

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

Default value: ``['use_trait', 'case', 'constant_public', 'constant_protected', 'constant_private', 'property_public', 'property_protected', 'property_private', 'construct', 'destruct', 'magic', 'phpunit', 'method_public', 'method_protected', 'method_private']``

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

List of ignored tags.

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

Default value: ``[]``

Expand Down
4 changes: 2 additions & 2 deletions doc/rules/constant_notation/native_constant_invocation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Configuration

List of constants to ignore.

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

Default value: ``['null', 'false', 'true']``

Expand All @@ -41,7 +41,7 @@ Default value: ``true``

List of additional constants to fix.

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

Default value: ``[]``

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Configuration

List of tags that must not be treated as Doctrine Annotations.

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

Default value: ``['abstract', 'access', 'code', 'deprec', 'encode', 'exception', 'final', 'ingroup', 'inheritdoc', 'inheritDoc', 'magic', 'name', 'toc', 'tutorial', 'private', 'static', 'staticvar', 'staticVar', 'throw', 'api', 'author', 'category', 'copyright', 'deprecated', 'example', 'filesource', 'global', 'ignore', 'internal', 'license', 'link', 'method', 'package', 'param', 'property', 'property-read', 'property-write', 'return', 'see', 'since', 'source', 'subpackage', 'throws', 'todo', 'TODO', 'usedBy', 'uses', 'var', 'version', 'after', 'afterClass', 'backupGlobals', 'backupStaticAttributes', 'before', 'beforeClass', 'codeCoverageIgnore', 'codeCoverageIgnoreStart', 'codeCoverageIgnoreEnd', 'covers', 'coversDefaultClass', 'coversNothing', 'dataProvider', 'depends', 'expectedException', 'expectedExceptionCode', 'expectedExceptionMessage', 'expectedExceptionMessageRegExp', 'group', 'large', 'medium', 'preserveGlobalState', 'requires', 'runTestsInSeparateProcesses', 'runInSeparateProcess', 'small', 'test', 'testdox', 'ticket', 'uses', 'SuppressWarnings', 'noinspection', 'package_version', 'enduml', 'startuml', 'psalm', 'phpstan', 'template', 'fix', 'FIXME', 'fixme', 'override']``

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Configuration

List of tags that must not be treated as Doctrine Annotations.

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

Default value: ``['abstract', 'access', 'code', 'deprec', 'encode', 'exception', 'final', 'ingroup', 'inheritdoc', 'inheritDoc', 'magic', 'name', 'toc', 'tutorial', 'private', 'static', 'staticvar', 'staticVar', 'throw', 'api', 'author', 'category', 'copyright', 'deprecated', 'example', 'filesource', 'global', 'ignore', 'internal', 'license', 'link', 'method', 'package', 'param', 'property', 'property-read', 'property-write', 'return', 'see', 'since', 'source', 'subpackage', 'throws', 'todo', 'TODO', 'usedBy', 'uses', 'var', 'version', 'after', 'afterClass', 'backupGlobals', 'backupStaticAttributes', 'before', 'beforeClass', 'codeCoverageIgnore', 'codeCoverageIgnoreStart', 'codeCoverageIgnoreEnd', 'covers', 'coversDefaultClass', 'coversNothing', 'dataProvider', 'depends', 'expectedException', 'expectedExceptionCode', 'expectedExceptionMessage', 'expectedExceptionMessageRegExp', 'group', 'large', 'medium', 'preserveGlobalState', 'requires', 'runTestsInSeparateProcesses', 'runInSeparateProcess', 'small', 'test', 'testdox', 'ticket', 'uses', 'SuppressWarnings', 'noinspection', 'package_version', 'enduml', 'startuml', 'psalm', 'phpstan', 'template', 'fix', 'FIXME', 'fixme', 'override']``

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Configuration

List of tags that must not be treated as Doctrine Annotations.

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

Default value: ``['abstract', 'access', 'code', 'deprec', 'encode', 'exception', 'final', 'ingroup', 'inheritdoc', 'inheritDoc', 'magic', 'name', 'toc', 'tutorial', 'private', 'static', 'staticvar', 'staticVar', 'throw', 'api', 'author', 'category', 'copyright', 'deprecated', 'example', 'filesource', 'global', 'ignore', 'internal', 'license', 'link', 'method', 'package', 'param', 'property', 'property-read', 'property-write', 'return', 'see', 'since', 'source', 'subpackage', 'throws', 'todo', 'TODO', 'usedBy', 'uses', 'var', 'version', 'after', 'afterClass', 'backupGlobals', 'backupStaticAttributes', 'before', 'beforeClass', 'codeCoverageIgnore', 'codeCoverageIgnoreStart', 'codeCoverageIgnoreEnd', 'covers', 'coversDefaultClass', 'coversNothing', 'dataProvider', 'depends', 'expectedException', 'expectedExceptionCode', 'expectedExceptionMessage', 'expectedExceptionMessageRegExp', 'group', 'large', 'medium', 'preserveGlobalState', 'requires', 'runTestsInSeparateProcesses', 'runInSeparateProcess', 'small', 'test', 'testdox', 'ticket', 'uses', 'SuppressWarnings', 'noinspection', 'package_version', 'enduml', 'startuml', 'psalm', 'phpstan', 'template', 'fix', 'FIXME', 'fixme', 'override']``

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Default value: ``true``

List of tags that must not be treated as Doctrine Annotations.

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

Default value: ``['abstract', 'access', 'code', 'deprec', 'encode', 'exception', 'final', 'ingroup', 'inheritdoc', 'inheritDoc', 'magic', 'name', 'toc', 'tutorial', 'private', 'static', 'staticvar', 'staticVar', 'throw', 'api', 'author', 'category', 'copyright', 'deprecated', 'example', 'filesource', 'global', 'ignore', 'internal', 'license', 'link', 'method', 'package', 'param', 'property', 'property-read', 'property-write', 'return', 'see', 'since', 'source', 'subpackage', 'throws', 'todo', 'TODO', 'usedBy', 'uses', 'var', 'version', 'after', 'afterClass', 'backupGlobals', 'backupStaticAttributes', 'before', 'beforeClass', 'codeCoverageIgnore', 'codeCoverageIgnoreStart', 'codeCoverageIgnoreEnd', 'covers', 'coversDefaultClass', 'coversNothing', 'dataProvider', 'depends', 'expectedException', 'expectedExceptionCode', 'expectedExceptionMessage', 'expectedExceptionMessageRegExp', 'group', 'large', 'medium', 'preserveGlobalState', 'requires', 'runTestsInSeparateProcesses', 'runInSeparateProcess', 'small', 'test', 'testdox', 'ticket', 'uses', 'SuppressWarnings', 'noinspection', 'package_version', 'enduml', 'startuml', 'psalm', 'phpstan', 'template', 'fix', 'FIXME', 'fixme', 'override']``

Expand Down
4 changes: 2 additions & 2 deletions doc/rules/function_notation/native_function_invocation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Configuration

List of functions to ignore.

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

Default value: ``[]``

Expand All @@ -31,7 +31,7 @@ List of function names or sets to fix. Defined sets are ``@internal`` (all
native functions), ``@all`` (all global functions) and ``@compiler_optimized``
(functions that are specially optimized by Zend).

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

Default value: ``['@compiler_optimized']``

Expand Down
2 changes: 1 addition & 1 deletion doc/rules/import/fully_qualified_strict_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Default value: ``false``
Collection of PHPDoc annotation tags where FQCNs should be processed. As of now
only simple tags with ``@tag \F\Q\C\N`` format are supported (no complex types).

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

Default value: ``['param', 'phpstan-param', 'phpstan-property', 'phpstan-property-read', 'phpstan-property-write', 'phpstan-return', 'phpstan-var', 'property', 'property-read', 'property-write', 'psalm-param', 'psalm-property', 'psalm-property-read', 'psalm-property-write', 'psalm-return', 'psalm-var', 'return', 'see', 'throws', 'var']``

Expand Down
2 changes: 1 addition & 1 deletion doc/rules/import/ordered_imports.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Default value: ``false``

Defines the order of import types.

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

Default value: ``null``

Expand Down
2 changes: 1 addition & 1 deletion doc/rules/language_construct/error_suppression.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Default value: ``false``

List of global functions to exclude from removing ``@``.

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

Default value: ``[]``

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Default value: ``'static'``
Dictionary of ``method`` => ``call_type`` values that differ from the default
strategy.

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

Default value: ``[]``

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

List of annotations to remove, e.g. ``["author"]``.

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

Default value: ``[]``

Expand Down
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: ``array``
Allowed types: ``list<string>``

Default value: ``[]``

Expand Down
4 changes: 2 additions & 2 deletions 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 ``int[]``
Allowed types: ``int`` and ``list<int>``

Default value: ``1``

Expand All @@ -44,7 +44,7 @@ The tags that should be aligned. Allowed values are tags with name (``'param',
'phpstan-method', 'psalm-method'``) and any custom tag with description (e.g.
``@tag <desc>``).

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

Default value: ``['method', 'param', 'property', 'return', 'throws', 'type', 'var']``

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

The list of tags to normalize.

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

Default value: ``['example', 'id', 'internal', 'inheritdoc', 'inheritdocs', 'link', 'source', 'toc', 'tutorial']``

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

Mapping between replaced annotations with new ones.

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

Default value: ``['property-read' => 'property', 'property-write' => 'property', 'type' => 'var', 'link' => 'see']``

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

Sequence in which annotations in PHPDoc should be ordered.

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

Default value: ``['param', 'throws', 'return']``

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: ``array``
Allowed types: ``list<string>``

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: ``string[][]``
Allowed types: ``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_casing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Configuration

List of tags to fix with their expected casing.

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

Default value: ``['inheritDoc']``

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: ``array``
Allowed types: ``list<string>``

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
2 changes: 1 addition & 1 deletion doc/rules/phpdoc/phpdoc_to_comment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Default value: ``false``

List of ignored tags (matched case insensitively).

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

Default value: ``[]``

Expand Down
2 changes: 1 addition & 1 deletion doc/rules/string_notation/heredoc_closing_marker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Default value: ``false``

Reserved closing markers to be kept unchanged.

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

Default value: ``['CSS', 'DIFF', 'HTML', 'JS', 'JSON', 'MD', 'PHP', 'PYTHON', 'RST', 'TS', 'SQL', 'XML', 'YAML']``

Expand Down
2 changes: 1 addition & 1 deletion src/AbstractDoctrineAnnotationFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected function createConfigurationDefinition(): FixerConfigurationResolverIn
{
return new FixerConfigurationResolver([
(new FixerOptionBuilder('ignored_tags', 'List of tags that must not be treated as Doctrine Annotations.'))
->setAllowedTypes(['array'])
->setAllowedTypes(['string[]'])
->setAllowedValues([static function (array $values): bool {
foreach ($values as $value) {
if (!\is_string($value)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Documentation/FixerDocumentGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function generateFixerDocumentation(FixerInterface $fixer): string
if (null === $allowed) {
$allowedKind = 'Allowed types';
$allowed = array_map(
static fn ($value): string => '``'.$value.'``',
static fn (string $value): string => '``'.(str_ends_with($value, '[]') ? sprintf('list<%s>', substr($value, 0, -2)) : $value).'``',
$option->getAllowedTypes(),
);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Alias/NoAliasFunctionsFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ protected function createConfigurationDefinition(): FixerConfigurationResolverIn

return new FixerConfigurationResolver([
(new FixerOptionBuilder('sets', $list))
->setAllowedTypes(['array'])
->setAllowedTypes(['string[]'])
->setAllowedValues([new AllowedValueSubset(array_keys($sets))])
->setDefault(['@internal', '@IMAP', '@pg'])
->getOption(),
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Basic/NoTrailingCommaInSinglelineFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected function createConfigurationDefinition(): FixerConfigurationResolverIn

return new FixerConfigurationResolver([
(new FixerOptionBuilder('elements', 'Which elements to fix.'))
->setAllowedTypes(['array'])
->setAllowedTypes(['string[]'])
->setAllowedValues([new AllowedValueSubset($elements)])
->setDefault($elements)
->getOption(),
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ protected function createConfigurationDefinition(): FixerConfigurationResolverIn
{
return new FixerConfigurationResolver([
(new FixerOptionBuilder('elements', 'Dictionary of `const|method|property|trait_import|case` => `none|one|only_if_meta` values.'))
->setAllowedTypes(['array'])
->setAllowedTypes(['string[]'])
->setAllowedValues([static function (array $option): bool {
foreach ($option as $type => $spacing) {
$supportedTypes = ['const', 'method', 'property', 'trait_import', 'case'];
Expand Down
8 changes: 4 additions & 4 deletions src/Fixer/ClassNotation/FinalInternalClassFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ protected function createConfigurationDefinition(): FixerConfigurationResolverIn

return new FixerConfigurationResolver([
(new FixerOptionBuilder('annotation_include', 'Class level attribute or annotation tags that must be set in order to fix the class (case insensitive).'))
->setAllowedTypes(['array'])
->setAllowedTypes(['string[]'])
->setAllowedValues($annotationsAsserts)
->setDefault(
array_map(
Expand All @@ -166,7 +166,7 @@ protected function createConfigurationDefinition(): FixerConfigurationResolverIn
->setDeprecationMessage('Use `include` to configure PHPDoc annotations tags and attributes.')
->getOption(),
(new FixerOptionBuilder('annotation_exclude', 'Class level attribute or annotation tags that must be omitted to fix the class, even if all of the white list ones are used as well (case insensitive).'))
->setAllowedTypes(['array'])
->setAllowedTypes(['string[]'])
->setAllowedValues($annotationsAsserts)
->setDefault(
array_map(
Expand All @@ -178,13 +178,13 @@ protected function createConfigurationDefinition(): FixerConfigurationResolverIn
->setDeprecationMessage('Use `exclude` to configure PHPDoc annotations tags and attributes.')
->getOption(),
(new FixerOptionBuilder('include', 'Class level attribute or annotation tags that must be set in order to fix the class (case insensitive).'))
->setAllowedTypes(['array'])
->setAllowedTypes(['string[]'])
->setAllowedValues($annotationsAsserts)
->setDefault(self::DEFAULTS['include'])
->setNormalizer($annotationsNormalizer)
->getOption(),
(new FixerOptionBuilder('exclude', 'Class level attribute or annotation tags that must be omitted to fix the class, even if all of the white list ones are used as well (case insensitive).'))
->setAllowedTypes(['array'])
->setAllowedTypes(['string[]'])
->setAllowedValues($annotationsAsserts)
->setDefault(self::DEFAULTS['exclude'])
->setNormalizer($annotationsNormalizer)
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/ClassNotation/OrderedClassElementsFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ protected function createConfigurationDefinition(): FixerConfigurationResolverIn

return new FixerConfigurationResolver([
(new FixerOptionBuilder('order', 'List of strings defining order of elements.'))
->setAllowedTypes(['array'])
->setAllowedTypes(['string[]'])
->setAllowedValues([
static function (array $values) use ($builtIns): bool {
foreach ($values as $value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected function createConfigurationDefinition(): FixerConfigurationResolverIn
return new FixerConfigurationResolver([
(new FixerOptionBuilder('elements', 'List of strings which element should be modified.'))
->setDefault($values)
->setAllowedTypes(['array'])
->setAllowedTypes(['string[]'])
->setAllowedValues([new AllowedValueSubset($values)])
->getOption(),
]);
Expand Down
Loading

0 comments on commit cd1922b

Please sign in to comment.