UNPKG

coc-php-cs-fixer

Version:

PHP CS Fixer (PHP Coding Standards Fixer) and Laravel Pint extension for coc.nvim

1,453 lines 147 kB
{ "$schema": "https://json-schema.org/draft-04/schema#", "title": "Laravel Pint", "type": "object", "properties": { "preset": { "type": "string", "description": "Preset that applies a group of rules to the formatting.", "default": "laravel", "oneOf": [ { "enum": [ "laravel", "symfony", "psr12", "per" ] } ] }, "exclude": { "type": "array", "description": "List of folders to exclude.", "items": { "type": "string" } }, "notName": { "type": "array", "description": "List of file name patterns to exclude.", "items": { "type": "string" } }, "notPath": { "type": "array", "description": "List of exact file paths to exclude.", "items": { "type": "string" } }, "cache-folder": { "type": "string", "description": "Cache file path for customise it. Defaults to tmp folder that your operating system uses." }, "rules": { "type": "object", "description": "Customise rules used for the formatting, this replaces the ones of the preset", "properties": { "Laravel/laravel_phpdoc_alignment": { "description": "Aligns PHPDocs (@throws, @return, etc) using Laravel's opinionated style", "type": "boolean" }, "align_multiline_comment": { "description": "Each line of multi-line DocComments must have an asterisk [PSR-5] and must be aligned with the first one.", "type": "object", "properties": { "comment_type": { "description": "Whether to fix PHPDoc comments only (`phpdocs_only`), any multi-line comment whose lines all start with an asterisk (`phpdocs_like`) or any multi-line comment (`all_multiline`).", "default": "phpdocs_only", "oneOf": [ { "enum": [ "phpdocs_only", "phpdocs_like", "all_multiline" ] } ] } } }, "array_indentation": { "description": "Each element of an array must be indented exactly once." }, "array_push": { "description": "Converts simple usages of `array_push($x, $y);` to `$x[] = $y;`." }, "array_syntax": { "description": "PHP arrays should be declared using the configured syntax.", "type": "object", "properties": { "syntax": { "description": "Whether to use the `long` or `short` array syntax.", "default": "short", "oneOf": [ { "enum": [ "long", "short" ] } ] } } }, "assign_null_coalescing_to_coalesce_equal": { "description": "Use the null coalescing assignment operator `??=` where possible." }, "attribute_empty_parentheses": { "description": "PHP attributes declared without arguments must (not) be followed by empty parentheses.", "type": "object", "properties": { "use_parentheses": { "description": "Whether attributes should be followed by parentheses or not.", "default": false, "type": "boolean" } } }, "backtick_to_shell_exec": { "description": "Converts backtick operators to `shell_exec` calls." }, "binary_operator_spaces": { "description": "Binary operators should be surrounded by space as configured.", "type": "object", "properties": { "default": { "description": "Default fix strategy.", "default": "single_space", "oneOf": [ { "enum": [ "align", "align_by_scope", "align_single_space", "align_single_space_minimal", "align_single_space_by_scope", "align_single_space_minimal_by_scope", "single_space", "no_space", "at_least_single_space", null ] } ] }, "operators": { "description": "Dictionary of `binary operator` => `fix strategy` values that differ from the default strategy. Supported are: `=`, `*`, `/`, `%`, `<`, `>`, `|`, `^`, `+`, `-`, `&`, `&=`, `&&`, `||`, `.=`, `/=`, `=>`, `==`, `>=`, `===`, `!=`, `<>`, `!==`, `<=`, `and`, `or`, `xor`, `-=`, `%=`, `*=`, `|=`, `+=`, `<<`, `<<=`, `>>`, `>>=`, `^=`, `**`, `**=`, `<=>`, `??` and `??=`.", "default": {}, "type": "object" } } }, "blank_line_after_namespace": { "description": "There MUST be one blank line after the namespace declaration." }, "blank_line_after_opening_tag": { "description": "Ensure there is no code on the same line as the PHP open tag and it is followed by a blank line." }, "blank_line_before_statement": { "description": "An empty line feed must precede any configured statement.", "type": "object", "properties": { "statements": { "description": "List of statements which must be preceded by an empty line.", "default": [ "break", "continue", "declare", "return", "throw", "try" ], "type": "array", "oneOf": [ { "enum": [ [ "break", "case", "continue", "declare", "default", "do", "exit", "for", "foreach", "goto", "if", "include", "include_once", "phpdoc", "require", "require_once", "return", "switch", "throw", "try", "while", "yield", "yield_from" ] ] } ] } } }, "blank_line_between_import_groups": { "description": "Putting blank lines between `use` statement groups." }, "blank_lines_before_namespace": { "description": "Controls blank lines before a namespace declaration.", "type": "object", "properties": { "max_line_breaks": { "description": "Maximum line breaks that should exist before namespace declaration.", "default": 2, "type": "int" }, "min_line_breaks": { "description": "Minimum line breaks that should exist before namespace declaration.", "default": 2, "type": "int" } } }, "braces": { "description": "The body of each structure MUST be enclosed by braces. Braces should be properly placed. Body of braces should be properly indented.", "type": "object", "properties": { "allow_single_line_anonymous_class_with_empty_body": { "description": "Whether single line anonymous class with empty body notation should be allowed.", "default": false, "type": "boolean" }, "allow_single_line_closure": { "description": "Whether single line lambda notation should be allowed.", "default": false, "type": "boolean" }, "position_after_anonymous_constructs": { "description": "Whether the opening brace should be placed on \"next\" or \"same\" line after anonymous constructs (anonymous classes and lambda functions).", "default": "same", "oneOf": [ { "enum": [ "next", "same" ] } ] }, "position_after_control_structures": { "description": "Whether the opening brace should be placed on \"next\" or \"same\" line after control structures.", "default": "same", "oneOf": [ { "enum": [ "next", "same" ] } ] }, "position_after_functions_and_oop_constructs": { "description": "Whether the opening brace should be placed on \"next\" or \"same\" line after classy constructs (non-anonymous classes, interfaces, traits, methods and non-lambda functions).", "default": "next", "oneOf": [ { "enum": [ "next", "same" ] } ] } } }, "braces_position": { "description": "Braces must be placed as configured.", "type": "object", "properties": { "allow_single_line_anonymous_functions": { "description": "Allow anonymous functions to have opening and closing braces on the same line.", "default": true, "type": "boolean" }, "allow_single_line_empty_anonymous_classes": { "description": "Allow anonymous classes to have opening and closing braces on the same line.", "default": true, "type": "boolean" }, "anonymous_classes_opening_brace": { "description": "The position of the opening brace of anonymous classes‘ body.", "default": "same_line", "oneOf": [ { "enum": [ "next_line_unless_newline_at_signature_end", "same_line" ] } ] }, "anonymous_functions_opening_brace": { "description": "The position of the opening brace of anonymous functions‘ body.", "default": "same_line", "oneOf": [ { "enum": [ "next_line_unless_newline_at_signature_end", "same_line" ] } ] }, "classes_opening_brace": { "description": "The position of the opening brace of classes‘ body.", "default": "next_line_unless_newline_at_signature_end", "oneOf": [ { "enum": [ "next_line_unless_newline_at_signature_end", "same_line" ] } ] }, "control_structures_opening_brace": { "description": "The position of the opening brace of control structures‘ body.", "default": "same_line", "oneOf": [ { "enum": [ "next_line_unless_newline_at_signature_end", "same_line" ] } ] }, "functions_opening_brace": { "description": "The position of the opening brace of functions‘ body.", "default": "next_line_unless_newline_at_signature_end", "oneOf": [ { "enum": [ "next_line_unless_newline_at_signature_end", "same_line" ] } ] } } }, "cast_spaces": { "description": "A single space or none should be between cast and variable.", "type": "object", "properties": { "space": { "description": "Spacing to apply between cast and variable.", "default": "single", "oneOf": [ { "enum": [ "none", "single" ] } ] } } }, "class_attributes_separation": { "description": "Class, trait and interface elements must be separated with one or none blank line.", "type": "object", "properties": { "elements": { "description": "Dictionary of `const|method|property|trait_import|case` => `none|one|only_if_meta` values.", "default": { "const": "one", "method": "one", "property": "one", "trait_import": "none", "case": "none" }, "type": "object" } } }, "class_definition": { "description": "Whitespace around the keywords of a class, trait, enum or interfaces definition should be one space.", "type": "object", "properties": { "inline_constructor_arguments": { "description": "Whether constructor argument list in anonymous classes should be single line.", "default": true, "type": "boolean" }, "multi_line_extends_each_single_line": { "description": "Whether definitions should be multiline.", "default": false, "type": "boolean" }, "single_item_single_line": { "description": "Whether definitions should be single line when including a single item.", "default": false, "type": "boolean" }, "single_line": { "description": "Whether definitions should be single line.", "default": false, "type": "boolean" }, "space_before_parenthesis": { "description": "Whether there should be a single space after the parenthesis of anonymous class (PSR12) or not.", "default": false, "type": "boolean" } } }, "class_keyword": { "description": "Converts FQCN strings to `*::class` keywords." }, "class_keyword_remove": { "description": "Converts `::class` keywords to FQCN strings." }, "class_reference_name_casing": { "description": "When referencing an internal class it must be written using the correct casing." }, "clean_namespace": { "description": "Namespace must not contain spacing, comments or PHPDoc." }, "combine_consecutive_issets": { "description": "Using `isset($var) &&` multiple times should be done in one call." }, "combine_consecutive_unsets": { "description": "Calling `unset` on multiple items should be done in one call." }, "combine_nested_dirname": { "description": "Replace multiple nested calls of `dirname` by only one call with second `$level` parameter. Requires PHP >= 7.0." }, "comment_to_phpdoc": { "description": "Comments with annotation should be docblock when used on structural elements.", "type": "object", "properties": { "ignored_tags": { "description": "List of ignored tags.", "default": [], "type": "array" } } }, "compact_nullable_type_declaration": { "description": "Remove extra spaces in a nullable type declaration." }, "compact_nullable_typehint": { "description": "Remove extra spaces in a nullable typehint." }, "concat_space": { "description": "Concatenation should be spaced according to configuration.", "type": "object", "properties": { "spacing": { "description": "Spacing to apply around concatenation operator.", "default": "none", "oneOf": [ { "enum": [ "one", "none" ] } ] } } }, "constant_case": { "description": "The PHP constants `true`, `false`, and `null` MUST be written using the correct casing.", "type": "object", "properties": { "case": { "description": "Whether to use the `upper` or `lower` case syntax.", "default": "lower", "oneOf": [ { "enum": [ "upper", "lower" ] } ] } } }, "control_structure_braces": { "description": "The body of each control structure MUST be enclosed within braces." }, "control_structure_continuation_position": { "description": "Control structure continuation keyword must be on the configured line.", "type": "object", "properties": { "position": { "description": "The position of the keyword that continues the control structure.", "default": "same_line", "oneOf": [ { "enum": [ "next_line", "same_line" ] } ] } } }, "curly_braces_position": { "description": "Curly braces must be placed as configured.", "type": "object", "properties": { "allow_single_line_anonymous_functions": { "description": "Allow anonymous functions to have opening and closing braces on the same line.", "default": true, "type": "boolean" }, "allow_single_line_empty_anonymous_classes": { "description": "Allow anonymous classes to have opening and closing braces on the same line.", "default": true, "type": "boolean" }, "anonymous_classes_opening_brace": { "description": "The position of the opening brace of anonymous classes‘ body.", "default": "same_line", "oneOf": [ { "enum": [ "next_line_unless_newline_at_signature_end", "same_line" ] } ] }, "anonymous_functions_opening_brace": { "description": "The position of the opening brace of anonymous functions‘ body.", "default": "same_line", "oneOf": [ { "enum": [ "next_line_unless_newline_at_signature_end", "same_line" ] } ] }, "classes_opening_brace": { "description": "The position of the opening brace of classes‘ body.", "default": "next_line_unless_newline_at_signature_end", "oneOf": [ { "enum": [ "next_line_unless_newline_at_signature_end", "same_line" ] } ] }, "control_structures_opening_brace": { "description": "The position of the opening brace of control structures‘ body.", "default": "same_line", "oneOf": [ { "enum": [ "next_line_unless_newline_at_signature_end", "same_line" ] } ] }, "functions_opening_brace": { "description": "The position of the opening brace of functions‘ body.", "default": "next_line_unless_newline_at_signature_end", "oneOf": [ { "enum": [ "next_line_unless_newline_at_signature_end", "same_line" ] } ] } } }, "date_time_create_from_format_call": { "description": "The first argument of `DateTime::createFromFormat` method must start with `!`." }, "date_time_immutable": { "description": "Class `DateTimeImmutable` should be used instead of `DateTime`." }, "declare_equal_normalize": { "description": "Equal sign in declare statement should be surrounded by spaces or not following configuration.", "type": "object", "properties": { "space": { "description": "Spacing to apply around the equal sign.", "default": "none", "oneOf": [ { "enum": [ "single", "none" ] } ] } } }, "declare_parentheses": { "description": "There must not be spaces around `declare` statement parentheses." }, "declare_strict_types": { "description": "Force strict types declaration in all files. Requires PHP >= 7.0." }, "dir_constant": { "description": "Replaces `dirname(__FILE__)` expression with equivalent `__DIR__` constant." }, "doctrine_annotation_array_assignment": { "description": "Doctrine annotations must use configured operator for assignment in arrays.", "type": "object", "properties": { "ignored_tags": { "description": "List of tags that must not be treated as Doctrine Annotations.", "default": [ "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" ], "type": "array" }, "operator": { "description": "The operator to use.", "default": "=", "oneOf": [ { "enum": [ "=", ":" ] } ] } } }, "doctrine_annotation_braces": { "description": "Doctrine annotations without arguments must use the configured syntax.", "type": "object", "properties": { "ignored_tags": { "description": "List of tags that must not be treated as Doctrine Annotations.", "default": [ "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" ], "type": "array" }, "syntax": { "description": "Whether to add or remove braces.", "default": "without_braces", "oneOf": [ { "enum": [ "with_braces", "without_braces" ] } ] } } }, "doctrine_annotation_indentation": { "description": "Doctrine annotations must be indented with four spaces.", "type": "object", "properties": { "ignored_tags": { "description": "List of tags that must not be treated as Doctrine Annotations.", "default": [ "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" ], "type": "array" }, "indent_mixed_lines": { "description": "Whether to indent lines that have content before closing parenthesis.", "default": false, "type": "boolean" } } }, "doctrine_annotation_spaces": { "description": "Fixes spaces in Doctrine annotations.", "type": "object", "properties": { "after_argument_assignments": { "description": "Whether to add, remove or ignore spaces after argument assignment operator.", "default": false, "type": [ "null", "boolean" ] }, "after_array_assignments_colon": { "description": "Whether to add, remove or ignore spaces after array assignment `:` operator.", "default": true, "type": [ "null", "boolean" ] }, "after_array_assignments_equals": { "description": "Whether to add, remove or ignore spaces after array assignment `=` operator.", "default": true, "type": [ "null", "boolean" ] }, "around_commas": { "description": "Whether to fix spaces around commas.", "default": true, "type": "boolean" }, "around_parentheses": { "description": "Whether to fix spaces around parentheses.", "default": true, "type": "boolean" }, "before_argument_assignments": { "description": "Whether to add, remove or ignore spaces before argument assignment operator.", "default": false, "type": [ "null", "boolean" ] }, "before_array_assignments_colon": { "description": "Whether to add, remove or ignore spaces before array `:` assignment operator.", "default": true, "type": [ "null", "boolean" ] }, "before_array_assignments_equals": { "description": "Whether to add, remove or ignore spaces before array `=` assignment operator.", "default": true, "type": [ "null", "boolean" ] }, "ignored_tags": { "description": "List of tags that must not be treated as Doctrine Annotations.", "default": [ "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" ], "type": "array" } } }, "echo_tag_syntax": { "description": "Replaces short-echo `<?=` with long format `<?php echo`/`<?php print` syntax, or vice-versa.", "type": "object", "properties": { "format": { "description": "The desired language construct.", "default": "long", "oneOf": [ { "enum": [ "long", "short" ] } ] }, "long_function": { "description": "The function to be used to expand the short echo tags.", "default": "echo", "oneOf": [ { "enum": [ "echo", "print" ] } ] }, "shorten_simple_statements_only": { "description": "Render short-echo tags only in case of simple code.", "default": true, "type": "boolean" } } }, "elseif": { "description": "The keyword `elseif` should be used instead of `else if` so that all control keywords look like single words." }, "empty_loop_body": { "description": "Empty loop-body must be in configured style.", "type": "object", "properties": { "style": { "description": "Style of empty loop-bodies.", "default": "semicolon", "type": "string", "oneOf": [ { "enum": [ "braces", "semicolon" ] } ] } } }, "empty_loop_condition": { "description": "Empty loop-condition must be in configured style.", "type": "object", "properties": { "style": { "description": "Style of empty loop-condition.", "default": "while", "type": "string", "oneOf": [ { "enum": [ "while", "for" ] } ] } } }, "encoding": { "description": "PHP code MUST use only UTF-8 without BOM (remove BOM)." }, "ereg_to_preg": { "description": "Replace deprecated `ereg` regular expression functions with `preg`." }, "error_suppression": { "description": "Error control operator should be added to deprecation notices and/or removed from other cases.", "type": "object", "properties": { "mute_deprecation_error": { "description": "Whether to add `@` in deprecation notices.", "default": true, "type": "boolean" }, "noise_remaining_usages": { "description": "Whether to remove `@` in remaining usages.", "default": false, "type": "boolean" }, "noise_remaining_usages_exclude": { "description": "List of global functions to exclude from removing `@`.", "default": [], "type": "array" } } }, "escape_implicit_backslashes": { "description": "Escape implicit backslashes in strings and heredocs to ease the understanding of which are special chars interpreted by PHP and which not.", "type": "object", "properties": { "double_quoted": { "description": "Whether to fix double-quoted strings.", "default": true, "type": "boolean" }, "heredoc_syntax": { "description": "Whether to fix heredoc syntax.", "default": true, "type": "boolean" }, "single_quoted": { "description": "Whether to fix single-quoted strings.", "default": false, "type": "boolean" } } }, "explicit_indirect_variable": { "description": "Add curly braces to indirect variables to make them clear to understand. Requires PHP >= 7.0." }, "explicit_string_variable": { "description": "Converts implicit variables into explicit ones in double-quoted strings or heredoc syntax." }, "final_class": { "description": "All classes must be final, except abstract ones and Doctrine entities." }, "final_internal_class": { "description": "Internal classes should be `final`.", "type": "object", "properties": { "annotation_exclude": { "description": "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).", "default": [ "@final", "@Entity", "@ORM\\Entity", "@ORM\\Mapping\\Entity", "@Mapping\\Entity", "@Document", "@ODM\\Document" ], "type": "array" }, "annotation_include": { "description": "Class level attribute or annotation tags that must be set in order to fix the class (case insensitive).", "default": [ "@internal" ], "type": "array" }, "consider_absent_docblock_as_internal_class": { "description": "Whether classes without any DocBlock should be fixed to final.", "default": false, "type": "boolean" }, "exclude": { "description": "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).", "default": [ "final", "Entity", "ORM\\Entity", "ORM\\Mapping\\Entity", "Mapping\\Entity", "Document", "ODM\\Document" ], "type": "array" }, "include": { "description": "Class level attribute or annotation tags that must be set in order to fix the class (case insensitive).", "default": [ "internal" ], "type": "array" } } }, "final_public_method_for_abstract_class": { "description": "All `public` methods of `abstract` classes should be `final`." }, "fopen_flag_order": { "description": "Order the flags in `fopen` calls, `b` and `t` must be last." }, "fopen_flags": { "description": "The flags in `fopen` calls must omit `t`, and `b` must be omitted or included consistently.", "type": "object", "properties": { "b_mode": { "description": "The `b` flag must be used (`true`) or omitted (`false`).", "default": true, "type": "boolean" } } }, "full_opening_tag": { "description": "PHP code must use the long `<?php` tags or short-echo `<?=` tags and not other tag variations." }, "fully_qualified_strict_types": { "description": "Removes the leading part of fully qualified symbol references if a given symbol is imported or belongs to the current namespace.", "type": "object", "properties": { "import_symbols": { "description": "Whether FQCNs found during analysis should be automatically imported.", "default": false, "type": "boolean" }, "leading_backslash_in_global_namespace": { "description": "Whether FQCN is prefixed with backslash when that FQCN is used in global namespace context.", "default": false, "type": "boolean" }, "phpdoc_tags": { "description": "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).", "default": [ "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" ], "type": "array" } } }, "function_declaration": { "description": "Spaces should be properly placed in a function declaration.", "type": "object", "properties": { "closure_fn_spacing": { "description": "Spacing to use before open parenthesis for short arrow functions.", "default": "one", "oneOf": [ { "enum": [ "none", "one" ] } ] }, "closure_function_spacing": { "description": "Spacing to use before open parenthesis for closures.", "default": "one", "oneOf": [ { "enum": [ "none", "one" ] } ] }, "trailing_comma_single_line": { "description": "Whether trailing commas are allowed in single line signatures.", "default": false, "type": "boolean" } } }, "function_to_constant": { "description": "Replace core functions calls returning constants with the constants.", "type": "object", "properties": { "functions": { "description": "List of function names to fix.", "default": [ "get_called_class", "get_class", "get_class_this", "php_sapi_name", "phpversion", "pi" ], "type": "array", "oneOf": [ { "enum": [ [ "get_called_class", "get_class", "get_class_this", "php_sapi_name", "phpversion", "pi" ] ] } ] } } }, "function_typehint_space": { "description": "Ensure single space between function's argument and its typehint." }, "general_phpdoc_annotation_remove": { "description": "Configured annotations should be omitted from PHPDoc.", "type": "object", "properties": { "annotations": { "description": "List of annotations to remove, e.g. `[\"author\"]`.", "default": [], "type": "array" }, "case_sensitive": { "description": "Should annotations be case sensitive.", "default": true, "type": "boolean" } } }, "general_phpdoc_tag_rename": { "description": "Renames PHPDoc tags.", "type": "object", "properties": { "case_sensitive": { "description": "Whether tags should be replaced only if they have exact same ca