{ "$defs": { "AnalyzerConfiguration": { "additionalProperties": false, "description": "Configuration options for the static analyzer.", "properties": { "allow-possibly-undefined-array-keys": { "default": true, "description": "Allow accessing array keys that may not be defined without reporting an issue.", "type": "boolean" }, "analyze-dead-code": { "default": false, "description": "Whether to analyze dead code.", "type": "boolean" }, "baseline": { "default": null, "description": "Path to a baseline file to ignore listed issues.", "type": ["string", "null"] }, "baseline-variant": { "$ref": "#/$defs/BaselineVariant", "default": "loose", "description": "The baseline variant to use when generating new baselines.\n\nOptions:\n\n- `\"strict\"`: Exact line matching with start/end line numbers\n- `\"loose\"`: Count-based matching by (file, code, message) tuple (default)\n\nThe loose variant is more resilient to code changes as line number shifts\ndon't affect the baseline." }, "check-arrow-function-missing-type-hints": { "default": false, "description": "Check for missing type hints (both parameters and return types) in arrow functions when `check_missing_type_hints` is enabled.\n\nWhen `true`, arrow functions (declared with `fn() => ...`) will be checked for missing\ntype hints. When `false`, arrow functions are ignored, which is useful because arrow\nfunctions often rely on type inference and are typically short, making types obvious.\n\nDefaults to `false`.", "type": "boolean" }, "check-closure-missing-type-hints": { "default": false, "description": "Check for missing type hints (both parameters and return types) in closures when `check_missing_type_hints` is enabled.\n\nWhen `true`, closures (anonymous functions declared with `function() {}`) will be\nchecked for missing type hints. When `false`, closures are ignored, which is useful\nbecause closures often rely on type inference.\n\nDefaults to `false`.", "type": "boolean" }, "check-experimental": { "default": false, "description": "Check for incorrect casing when referencing classes, interfaces, traits, enums,\nand functions.\n\nDefaults to `false`.", "type": "boolean" }, "check-missing-override": { "default": false, "description": "Check for missing `#[Override]` attributes on overriding methods.\n\nWhen enabled, the analyzer reports methods that override a parent method without\nthe `#[Override]` attribute (PHP 8.3+).\n\nDefaults to `true`.", "type": "boolean" }, "check-missing-type-hints": { "default": false, "description": "Check for missing type hints on parameters, properties, and return types.\n\nWhen enabled, the analyzer will report warnings for function parameters, class properties,\nand function return types that lack explicit type declarations.\n\nDefaults to `false`.", "type": "boolean" }, "check-name-casing": { "default": false, "description": "Defaults to `false`.", "type": "boolean" }, "check-property-initialization": { "default": false, "description": "Enable property initialization checking (`missing-constructor`, `uninitialized-property`).\n\nWhen `false`, disables both `missing-constructor` and `uninitialized-property` issues\nentirely. This is useful for projects that prefer to rely on runtime errors for\nproperty initialization.\n\nDefaults to `false`.", "type": "boolean" }, "check-throws": { "default": false, "description": "Whether to check for thrown exceptions.", "type": "boolean" }, "check-use-statements": { "default": false, "description": "Check for non-existent symbols in use statements.\n\nWhen enabled, the analyzer will report use statements that import symbols\n(classes, interfaces, traits, enums, functions, or constants) that do not exist\nin the codebase.\n\nDefaults to `false`.", "type": "boolean" }, "class-initializers": { "default": [], "description": "Method names treated as class initializers (like `__construct`).\n\nProperties initialized in these methods count as \"definitely initialized\"\njust like in the constructor. This is useful for frameworks that use\nlifecycle methods like PHPUnit's `setUp()` or framework `boot()` methods.\n\nExample: `[\"setUp\", \"initialize\", \"boot\"]`\n\nDefaults to empty (no additional initializers).", "items": { "type": "string" }, "type": "array" }, "disable-default-plugins": { "default": false, "description": "Disable all default plugins (including stdlib).\n\nWhen set to `true`, no plugins will be loaded by default, and only plugins\nexplicitly listed in `plugins` will be enabled.\n\nDefaults to `false`.", "type": "boolean" }, "enforce-class-finality": { "default": false, "description": "Enforce that concrete classes are declared `final`.\n\nWhen enabled, the analyzer reports a warning for any class that is not\n`final`, `abstract`, or annotated with `@api`, provided the class has no children.\n\nDefaults to `false`.", "type": "boolean" }, "excludes": { "default": [], "description": "A list of patterns to exclude from analysis.", "items": { "type": "string" }, "type": "array" }, "find-unused-definitions": { "default": true, "description": "Whether to find unused definitions.", "type": "boolean" }, "find-unused-expressions": { "default": true, "description": "Whether to find unused expressions.", "type": "boolean" }, "find-unused-parameters": { "default": false, "description": "Find and report unused function/method parameters.\n\nWhen enabled, the analyzer reports parameters that are declared but never used\nwithin the function body.\n\nDefaults to `true`.", "type": "boolean" }, "ignore": { "default": [], "description": "Ignore specific issues based on their code, optionally scoped to paths.", "items": { "$ref": "#/$defs/IgnoreEntry" }, "type": "array" }, "memoize-properties": { "default": true, "description": "Whether to memoize properties.", "type": "boolean" }, "minimum-fail-level": { "$ref": "#/$defs/Level", "default": "Error", "description": "Set the minimum issue severity that causes the command to fail.\n\nThe command will exit with a non-zero status if any issues at or above\nthis level are found. For example, setting this to `\"warning\"` means\nthe command fails on warnings and errors, but not on notes or help suggestions.\n\nOptions: `\"note\"`, `\"help\"`, `\"warning\"`, `\"error\"`\n\nCan be overridden by the `--minimum-fail-level` CLI flag.\n\nDefaults to `\"error\"`." }, "no-boolean-literal-comparison": { "default": false, "description": "Disallow comparisons where a boolean literal is used as an operand.\n\nDefaults to `false`.", "type": "boolean" }, "perform-heuristic-checks": { "description": "**Deprecated**: Use `check-missing-override` and `find-unused-parameters` instead.\n\nWhen set to `true`, enables both `check-missing-override` and `find-unused-parameters`.\nWhen set to `false`, disables both.\n\nThis option is kept for backwards compatibility with existing configurations.", "type": ["boolean", "null"], "writeOnly": true }, "performance": { "$ref": "#/$defs/PerformanceConfiguration", "default": { "array-combination-threshold": 128, "consensus-limit-threshold": 256, "disjunction-complexity-threshold": 4096, "formula-size-threshold": 512, "integer-combination-threshold": 128, "negation-complexity-threshold": 4096, "saturation-complexity-threshold": 8192, "string-combination-threshold": 128 }, "description": "Performance tuning settings.\n\nThese thresholds control how deeply the analyzer explores complex logical formulas.\nHigher values allow more precise analysis but may significantly increase analysis time.\nLower values improve speed but may reduce precision on complex conditional code." }, "plugins": { "default": [], "description": "List of plugins to enable (by name or alias).\n\nPlugins can be specified by their canonical name or any of their aliases:\n- `stdlib` (aliases: `standard`, `std`, `php-stdlib`)\n- `psl` (aliases: `php-standard-library`, `azjezz-psl`)\n- `flow-php` (aliases: `flow`, `flow-etl`)\n- `psr-container` (aliases: `psr-11`)\n\nExample: `plugins = [\"stdlib\", \"psl\"]`", "items": { "type": "string" }, "type": "array" }, "register-super-globals": { "default": true, "description": "Register superglobals (e.g., `$_GET`, `$_POST`, `$_SERVER`) in the analysis context.\n\nIf disabled, super globals won't be available unless explicitly imported using\nthe `global` keyword.\n\nDefaults to `true`.", "type": "boolean" }, "require-api-or-internal": { "default": false, "description": "Require `@api` or `@internal` annotations on abstract classes, interfaces, and traits.\n\nWhen enabled, the analyzer reports a warning for any abstract class, interface,\nor trait that is not annotated with either `@api` or `@internal`.\n\nDefaults to `false`.", "type": "boolean" }, "strict-list-index-checks": { "default": false, "description": "Enforce strict checks when accessing list elements by index.\n\nWhen `true`, the analyzer requires that any integer used to access a `list`\nelement is provably non-negative (e.g., of type `int<0, max>`). This helps\nprevent potential runtime errors from using a negative index.\n\nWhen `false` (the default), any `int` is permitted as an index, offering\nmore flexibility at the cost of type safety.", "type": "boolean" }, "trust-existence-checks": { "default": true, "description": "Trust symbol existence checks to narrow types.\n\nWhen enabled, conditional checks like `method_exists()`, `property_exists()`,\n`function_exists()`, and `defined()` will narrow the type within the conditional block,\nsuppressing errors for symbols that are verified to exist at runtime.\n\nWhen disabled, these checks are ignored and the analyzer requires explicit type hints,\nwhich is stricter but may produce more false positives for dynamic code.\n\nDefaults to `true`.", "type": "boolean" }, "unchecked-exception-classes": { "default": [], "description": "Exceptions to ignore (exact class match only, not subclasses).\n\nWhen an exception class is listed here, only that exact class will be ignored\nduring `check_throws` analysis. Parent classes and subclasses are not affected.", "items": { "type": "string" }, "type": "array" }, "unchecked-exceptions": { "default": [], "description": "Exceptions to ignore including all subclasses (hierarchy-aware).\n\nWhen an exception class is listed here, any exception of that class or any of its\nsubclasses will be ignored during `check_throws` analysis.\n\nFor example, adding `LogicException` will ignore `LogicException`, `InvalidArgumentException`,\n`OutOfBoundsException`, and all other subclasses.", "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "ArrayStyleOption": { "enum": ["short", "long"], "type": "string" }, "AssertionStyle": { "enum": ["static", "self_", "this"], "type": "string" }, "BaselineVariant": { "description": "The variant of baseline format to use.", "oneOf": [ { "const": "strict", "description": "Strict baseline with exact line matching.\n\nEach issue is stored with its exact start and end line numbers.\nAny change in line numbers requires baseline regeneration.", "type": "string" }, { "const": "loose", "description": "Loose baseline with count-based matching.\n\nIssues are grouped by (file, code, message) and stored with a count.\nMore resilient to code changes as line shifts don't affect the baseline.", "type": "string" } ] }, "BraceStyle": { "description": "Specifies brace placement style for various constructs.\n\n- `SameLine`: Opening brace on the same line as the declaration\n- `NextLine`: Opening brace on the next line for single-line signatures;\n on the same line when the signature breaks across multiple lines\n- `AlwaysNextLine`: Opening brace always on the next line, regardless of\n whether the signature breaks", "enum": ["same_line", "next_line", "always_next_line"], "type": "string" }, "DisallowedEntry": { "anyOf": [ { "description": "Simple string entry (just the name).", "type": "string" }, { "description": "Entry with name and optional help message.", "properties": { "help": { "type": ["string", "null"] }, "name": { "type": "string" } }, "required": ["name"], "type": "object" } ], "description": "An entry that can be either a simple string or an object with name and optional help." }, "EndOfLine": { "description": "Specifies the style of line endings.", "enum": ["auto", "lf", "crlf", "cr"], "type": "string" }, "FormatterConfiguration": { "additionalProperties": false, "description": "Configuration options for formatting source code.", "properties": { "align-assignment-like": { "default": false, "description": "Whether to align consecutive assignment-like constructs in columns.\n\nWhen enabled, consecutive variable assignments, class properties, class constants,\nglobal constants, array key-value pairs, and backed enum cases are column-aligned.\n\nFor arrays, this applies to multiline or width-broken mappings. Compact inline arrays\nstay compact and are not padded into columns.\n\nExample with `true`:\n```php\n$foo = 1;\n$b = 2;\n$ccccccc = 3;\n\nclass X {\n public string $foo = 1;\n public readonly int $barrrr = 2;\n}\n```\n\nExample with `false`:\n```php\n$foo = 1;\n$b = 2;\n$ccccccc = 3;\n```\n\nNote: Blank lines and comments break alignment runs. In class bodies,\ndifferent member types (properties vs constants) are aligned separately.\n\nDefault: false", "type": "boolean" }, "always-break-attribute-named-argument-lists": { "default": false, "description": "Whether to always break named argument lists in attributes into multiple lines.\n\nWhen enabled:\n```php\n#[SomeAttribute(\n argument1: 'value1',\n argument2: 'value2',\n)]\nclass Foo {}\n```\n\nDefault: false", "type": "boolean" }, "always-break-named-arguments-list": { "default": false, "description": "Whether to always break named argument lists into multiple lines.\n\nWhen enabled:\n```php\n$foo = some_function(\n argument1: 'value1',\n argument2: 'value2',\n);\n```\n\nDefault: false", "type": "boolean" }, "array-table-style-alignment": { "default": true, "description": "Whether to use table-style alignment for arrays.\n\nWhen enabled, array elements are aligned in a table-like format:\n```php\n$array = [\n ['foo', 1.2, 123, false],\n ['bar', 52.4, 456, true],\n ['baz', 3.6, 789, false],\n ['qux', 4.8, 1, true],\n ['quux', 5.0, 12, false],\n];\n```\n\nDefault: true", "type": "boolean" }, "break-promoted-properties-list": { "default": true, "description": "Whether to break a parameter list with one or more promoted properties into multiple lines.\n\nWhen enabled, parameter lists with promoted properties are always multi-line:\n```php\nclass User {\n public function __construct(\n public string $name,\n public string $email,\n ) {}\n}\n```\n\nWhen disabled, they may be kept on a single line if space allows:\n```php\nclass User {\n public function __construct(public string $name, public string $email) {}\n}\n```\n\nDefault: true", "type": "boolean" }, "classlike-brace-style": { "$ref": "#/$defs/BraceStyle", "default": "always_next_line", "description": "Brace placement for class-like structures (classes, interfaces, traits, enums).\n\nExample with `same_line`:\n```php\nclass Foo {\n}\n```\n\nExample with `next_line` or `always_next_line`:\n```php\nclass Foo\n{\n}\n```\n\nDefault: `always_next_line`" }, "closure-brace-style": { "$ref": "#/$defs/BraceStyle", "default": "same_line", "description": "Brace placement for closures.\n\nExample with `same_line`:\n```php\n$closure = function() {\n return 'Hello, world!';\n};\n```\n\nExample with `next_line`:\n```php\n$closure = function()\n{\n return 'Hello, world!';\n};\n```\n\nDefault: `same_line`" }, "control-brace-style": { "$ref": "#/$defs/BraceStyle", "default": "same_line", "description": "Brace placement for control structures (if, for, while, etc.).\n\nExample with `same_line`:\n```php\nif ($expr) {\n return 'Hello, world!';\n}\n```\n\nExample with `next_line`:\n```php\nif ($expr)\n{\n return 'Hello, world!';\n}\n```\n\nDefault: `same_line`" }, "empty-line-after-class-like-constant": { "default": false, "description": "Whether to add an empty line after class-like constant.\n\nNote: if an empty line already exists, it will be preserved regardless of this\nsettings value.\n\nDefault: false", "type": "boolean" }, "empty-line-after-class-like-open": { "default": false, "description": "Whether to add an empty line immediately after a class-like opening brace.\n\nDefault: false", "type": "boolean" }, "empty-line-after-control-structure": { "default": false, "description": "Whether to add an empty line after control structures (if, for, foreach, while, do, switch).\n\nNote: if an empty line already exists, it will be preserved regardless of this\nsettings value.\n\nDefault: false", "type": "boolean" }, "empty-line-after-declare": { "default": true, "description": "Whether to add an empty line after declare statement.\n\nNote: if an empty line already exists, it will be preserved regardless of this\nsettings value.\n\nDefault: true", "type": "boolean" }, "empty-line-after-enum-case": { "default": false, "description": "Whether to add an empty line after enum case.\n\nNote: if an empty line already exists, it will be preserved regardless of this\nsettings value.\n\nDefault: false", "type": "boolean" }, "empty-line-after-method": { "default": true, "description": "Whether to add an empty line after method.\n\nNote: if an empty line already exists, it will be preserved regardless of this\nsettings value.\n\nDefault: true", "type": "boolean" }, "empty-line-after-namespace": { "default": true, "description": "Whether to add an empty line after namespace.\n\nNote: if an empty line already exists, it will be preserved regardless of this\nsettings value.\n\nDefault: true", "type": "boolean" }, "empty-line-after-opening-tag": { "default": true, "description": "Whether to add an empty line after opening tag.\n\nNote: if an empty line already exists, it will be preserved regardless of this\nsettings value.\n\nDefault: true", "type": "boolean" }, "empty-line-after-property": { "default": false, "description": "Whether to add an empty line after property.\n\nNote: if an empty line already exists, it will be preserved regardless of this\nsettings value.\n\nDefault: false", "type": "boolean" }, "empty-line-after-symbols": { "default": true, "description": "Whether to add an empty line after symbols (class, enum, interface, trait, function, const).\n\nNote: if an empty line already exists, it will be preserved regardless of this\nsettings value.\n\nDefault: true", "type": "boolean" }, "empty-line-after-trait-use": { "default": false, "description": "Whether to add an empty line after trait use.\n\nNote: if an empty line already exists, it will be preserved regardless of this\nsettings value.\n\nDefault: false", "type": "boolean" }, "empty-line-after-use": { "default": true, "description": "Whether to add an empty line after use statements.\n\nNote: if an empty line already exists, it will be preserved regardless of this\nsettings value.\n\nDefault: true", "type": "boolean" }, "empty-line-before-class-like-close": { "default": false, "description": "Whether to insert an empty line before the closing brace of class-like\nstructures when the class body is not empty.\n\nWhen enabled, a blank line will be inserted immediately before the `}`\nthat closes a class, trait, interface or enum, but only if the body\ncontains at least one member.\n\nDefault: false", "type": "boolean" }, "empty-line-before-dangling-comments": { "default": true, "description": "Whether to add an empty line before dangling comments.\n\nDefault: true", "type": "boolean" }, "empty-line-before-return": { "default": false, "description": "Whether to add an empty line before return statements.\n\nDefault: false", "type": "boolean" }, "empty-line-between-same-symbols": { "default": true, "description": "Whether to add an empty line between consecutive symbols of the same type.\n\nOnly applies when `empty_line_after_symbols` is true.\n\nDefault: true", "type": "boolean" }, "end-of-line": { "$ref": "#/$defs/EndOfLine", "default": "auto", "description": "End-of-line characters to use.\n\nDefault: \"lf\"" }, "excludes": { "description": "A list of patterns to exclude from formatting.\n\nDefaults to `[]`.", "items": { "type": "string" }, "type": "array" }, "expand-use-groups": { "default": true, "description": "Whether to expand grouped use statements into individual statements.\n\nWhen enabled:\n```php\nuse Foo\\Bar;\nuse Foo\\Baz;\n```\n\nWhen disabled:\n```php\nuse Foo\\{Bar, Baz};\n```\n\nDefault: true", "type": "boolean" }, "first-method-chain-on-new-line": { "default": true, "description": "When method chaining breaks across lines, place the first method on a new line.\n\nThis follows PER-CS 4.7: \"When [method chaining is] put on separate lines, [...] the first method MUST be on the next line.\"\n\nWhen enabled:\n```php\n$this\n ->getCache()\n ->forget();\n```\n\nWhen disabled:\n```php\n$this->getCache()\n ->forget();\n```\n\nDefault: `true`", "type": "boolean" }, "following-clause-on-newline": { "default": false, "description": "Whether to place `else`, `elseif`, `catch` and `finally` on a new line.\n\nDefault: false", "type": "boolean" }, "function-brace-style": { "$ref": "#/$defs/BraceStyle", "default": "next_line", "description": "Brace placement for function declarations.\n\nExample with `same_line`:\n```php\nfunction foo() {\n return 'Hello, world!';\n}\n```\n\nExample with `next_line`:\n```php\nfunction foo()\n{\n return 'Hello, world!';\n}\n```\n\nDefault: `next_line`" }, "indent-binary-expression-continuation": { "default": false, "description": "Whether to indent continuation lines of binary expressions.\n\nWhen enabled, if a binary expression breaks across lines, the continuation\nis indented relative to the start of the expression:\n```php\n$emailNotifications = $this->stringUtils->splitStringToArray($jobPosting->getVacancyEmailNotification())\n ?? [];\n```\n\nWhen disabled, the continuation aligns with the start of the assignment:\n```php\n$emailNotifications = $this->stringUtils->splitStringToArray($jobPosting->getVacancyEmailNotification())\n?? [];\n```\n\nDefault: false", "type": "boolean" }, "indent-heredoc": { "default": true, "description": "Whether to indent heredoc/nowdoc content.\n\nDefault: true", "type": "boolean" }, "inline-abstract-property-hooks": { "default": true, "description": "Whether to keep abstract property hooks inline.\n\nWhen enabled: `public int $id { get; }`\nWhen disabled: hook list is always expanded\n\nDefault: true ([PER-CS 4.10](https://www.php-fig.org/per/coding-style/#410-interface-and-abstract-properties) compliant)", "type": "boolean" }, "inline-empty-anonymous-class-braces": { "default": true, "description": "Place empty anonymous class bodies on the same line.\n\nExample with `false`:\n```php\n$anon = new class\n{\n};\n```\n\nExample with `true`:\n```php\n$anon = new class {};\n```\n\nDefault: true", "type": "boolean" }, "inline-empty-classlike-braces": { "default": true, "description": "Place empty class-like bodies on the same line.\n\nExample with `false`:\n```php\nclass Foo\n{\n}\n```\n\nExample with `true`:\n```php\nclass Foo {}\n```\n\nDefault: true", "type": "boolean" }, "inline-empty-closure-braces": { "default": true, "description": "Place empty closure bodies on the same line.\n\nExample with `false`:\n```php\n$closure = function()\n{\n};\n```\n\nExample with `true`:\n```php\n$closure = function() {};\n```\n\nDefault: true", "type": "boolean" }, "inline-empty-constructor-braces": { "default": true, "description": "Place empty constructor bodies on the same line.\n\nExample with `false`:\n```php\nclass Foo {\n public function __construct()\n {\n }\n}\n```\n\nExample with `true`:\n```php\nclass Foo {\n public function __construct() {}\n}\n```\n\nDefault: true", "type": "boolean" }, "inline-empty-control-braces": { "default": false, "description": "Place empty control structure bodies on the same line.\n\nExample with `false`:\n```php\nif ($expr)\n{\n}\n```\n\nExample with `true`:\n```php\nif ($expr) {}\n```\n\nDefault: false", "type": "boolean" }, "inline-empty-function-braces": { "default": true, "description": "Place empty function bodies on the same line.\n\nExample with `false`:\n```php\nfunction foo()\n{\n}\n```\n\nExample with `true`:\n```php\nfunction foo() {}\n```\n\nDefault: true", "type": "boolean" }, "inline-empty-method-braces": { "default": true, "description": "Place empty method bodies on the same line.\n\nExample with `false`:\n```php\nclass Foo\n{\n public function bar()\n {\n }\n}\n```\n\nExample with `true`:\n```php\nclass Foo\n{\n public function bar() {}\n}\n```\n\nDefault: true", "type": "boolean" }, "line-before-binary-operator": { "default": true, "description": "Whether to add a line before binary operators or after when breaking.\n\nWhen true:\n```php\n$foo = 'Hello, '\n . 'world!';\n```\n\nWhen false:\n```php\n$foo = 'Hello, ' .\n 'world!';\n```\n\nNote: If the right side has a leading comment, this setting is always false.\n\nDefault: true", "type": "boolean" }, "method-brace-style": { "$ref": "#/$defs/BraceStyle", "default": "next_line", "description": "Brace placement for method declarations.\n\nExample with `same_line`:\n```php\nclass Foo\n{\n public function bar() {\n return 'Hello, world!';\n }\n}\n```\n\nExample with `next_line`:\n```php\nclass Foo\n{\n public function bar()\n {\n return 'Hello, world!';\n }\n}\n```\n\nDefault: `next_line`" }, "method-chain-breaking-style": { "$ref": "#/$defs/MethodChainBreakingStyle", "default": "next_line", "description": "How to format broken method/property chains.\n\nWhen `next_line`, the first method/property starts on a new line:\n```php\n$foo\n ->bar()\n ->baz();\n```\n\nWhen `same_line`, the first method/property stays on the same line:\n```php\n$foo->bar()\n ->baz();\n```\n\nDefault: `next_line`" }, "method-chain-semicolon-on-next-line": { "default": false, "description": "When a method chain breaks across multiple lines, place the semicolon on its own line.\n\nWhen enabled:\n```php\n$object->method1()\n ->method2()\n ->method3()\n;\n```\n\nWhen disabled:\n```php\n$object->method1()\n ->method2()\n ->method3();\n```\n\nDefault: `false`", "type": "boolean" }, "null-type-hint": { "$ref": "#/$defs/NullTypeHint", "default": "question", "description": "How to format null type hints.\n\nWith `Question`:\n```php\nfunction foo(\n ?string $a,\n null|int|string $b,\n int|null|string $c,\n) {}\n```\n\nWith `NullPipe`:\n```php\nfunction foo(\n null|string $a,\n null|int|string $b,\n int|null|string $c,\n) {}\n```\n\nWith `NullPipeLast`:\n```php\nfunction foo(\n string|null $a,\n int|string|null $b,\n int|string|null $c,\n) {}\n```\n\nDefault: `Question`" }, "opening-tag-on-own-line": { "default": true, "description": "Whether the opening `bar();\n```\n\nWhen disabled (PHP 8.4+ only):\n```php\n$foo = new Foo->bar();\n```\n\nDefault: false", "type": "boolean" }, "parentheses-in-attribute": { "default": false, "description": "Whether to include parentheses in attributes with no arguments.\n\nWhen enabled:\n```php\n#[SomeAttribute()]\nclass Foo {}\n```\n\nWhen disabled:\n```php\n#[SomeAttribute]\nclass Foo {}\n```\n\nDefault: false", "type": "boolean" }, "parentheses-in-exit-and-die": { "default": true, "description": "Whether to include parentheses in `exit` and `die` constructs.\n\nWhen enabled:\n```php\nexit();\ndie();\n```\n\nWhen disabled:\n```php\nexit;\ndie;\n```\n\nDefault: true", "type": "boolean" }, "parentheses-in-new-expression": { "default": true, "description": "Whether to include parentheses in `new` expressions when no arguments are provided.\n\nWhen enabled:\n```php\n$foo = new Foo();\n```\n\nWhen disabled:\n```php\n$foo = new Foo;\n```\n\nDefault: true", "type": "boolean" }, "preserve-breaking-argument-list": { "default": false, "description": "Whether to preserve line breaks in argument lists, even if they could fit on a single line.\n\nDefault: false", "type": "boolean" }, "preserve-breaking-array-like": { "default": true, "description": "Whether to preserve line breaks in array-like structures, even if they could fit on a single line.\n\nDefault: true", "type": "boolean" }, "preserve-breaking-attribute-list": { "default": false, "description": "Whether to preserve line breaks in attribute lists, even if they could fit on a single line.\n\nDefault: false", "type": "boolean" }, "preserve-breaking-condition-expression": { "default": false, "description": "Whether to preserve line breaks in condition expressions (if, elseif, while, do-while, switch, match).\n\nWhen enabled, if the original source has conditions broken across multiple lines,\nthe formatter maintains that layout using PER Coding Style 3.0 rules.\n\nDefault: false", "type": "boolean" }, "preserve-breaking-conditional-expression": { "default": false, "description": "Whether to preserve line breaks in conditional (ternary) expressions.\n\nDefault: false", "type": "boolean" }, "preserve-breaking-member-access-chain": { "default": false, "description": "Whether to preserve line breaks in method chains, even if they could fit on a single line.\n\nDefault: false", "type": "boolean" }, "preserve-breaking-parameter-list": { "default": false, "description": "Whether to preserve line breaks in parameter lists, even if they could fit on a single line.\n\nDefault: false", "type": "boolean" }, "preset": { "anyOf": [ { "$ref": "#/$defs/FormatterPreset" }, { "type": "null" } ] }, "print-width": { "default": 120, "description": "Maximum line length that the printer will wrap on.\n\nDefault: 120", "format": "uint", "minimum": 0, "type": "integer" }, "remove-trailing-close-tag": { "default": true, "description": "Whether to remove the trailing PHP close tag (`?>`) from files.\n\nDefault: true", "type": "boolean" }, "separate-class-like-members": { "default": true, "description": "Whether to separate class-like members of different kinds with a blank line.\n\nDefault: true", "type": "boolean" }, "separate-use-types": { "default": true, "description": "Whether to insert a blank line between different types of use statements.\n\nWhen enabled:\n```php\nuse Foo\\Bar;\nuse Foo\\Baz;\n\nuse function Foo\\bar;\nuse function Foo\\baz;\n\nuse const Foo\\A;\nuse const Foo\\B;\n```\n\nWhen disabled:\n```php\nuse Foo\\Bar;\nuse Foo\\Baz;\nuse function Foo\\bar;\nuse function Foo\\baz;\nuse const Foo\\A;\nuse const Foo\\B;\n```\n\nDefault: true", "type": "boolean" }, "single-quote": { "default": true, "description": "Whether to use single quotes instead of double quotes for strings.\n\nThe formatter automatically determines which quotes to use based on the string content,\nwith a preference for single quotes if this option is enabled.\n\nDecision logic:\n- If the string contains more single quotes than double quotes, double quotes are used\n- If the string contains more double quotes than single quotes, single quotes are used\n- If equal number of both, single quotes are used if this option is true\n\nDefault: true", "type": "boolean" }, "sort-class-methods": { "default": false, "description": "Whether to sort class methods by visibility and name.\n\nWhen enabled, methods in class-like structures are automatically reordered:\n1. Constructor (`__construct`) - always first\n2. Static methods (by visibility: public, protected, private)\n - Abstract methods before concrete methods\n - Alphabetically by name within each group\n3. Instance methods (by visibility: public, protected, private)\n - Abstract methods before concrete methods\n - Alphabetically by name within each group\n4. Other magic methods (e.g., `__toString`, `__get`, `__set`)\n - Sorted alphabetically by name\n5. Destructor (`__destruct`) - always last\n\nThis applies to all class-like structures: classes, traits, interfaces, and enums.\nOther members (constants, properties, trait uses, enum cases) remain in their original positions.\n\nDefault: false", "type": "boolean" }, "sort-uses": { "default": true, "description": "Whether to sort use statements alphabetically.\n\nDefault: true", "type": "boolean" }, "space-after-additive-unary-prefix-operator": { "default": false, "description": "Whether to add a space after the additive unary operators (+ and -).\n\nWhen enabled: `+ $i`\nWhen disabled: `+$i`\n\nDefault: false", "type": "boolean" }, "space-after-bitwise-not-unary-prefix-operator": { "default": false, "description": "Whether to add a space after the bitwise not operator (~).\n\nWhen enabled: `~ $foo`\nWhen disabled: `~$foo`\n\nDefault: false", "type": "boolean" }, "space-after-cast-unary-prefix-operators": { "default": true, "description": "Whether to add a space after cast operators (int, float, string, etc.).\n\nWhen enabled: `(int) $foo`\nWhen disabled: `(int)$foo`\n\nDefault: true", "type": "boolean" }, "space-after-decrement-unary-prefix-operator": { "default": false, "description": "Whether to add a space after the decrement prefix operator (--).\n\nWhen enabled: `-- $i`\nWhen disabled: `--$i`\n\nDefault: false", "type": "boolean" }, "space-after-error-control-unary-prefix-operator": { "default": false, "description": "Whether to add a space after the error control operator (@).\n\nWhen enabled: `@ $foo`\nWhen disabled: `@$foo`\n\nDefault: false", "type": "boolean" }, "space-after-increment-unary-prefix-operator": { "default": false, "description": "Whether to add a space after the increment prefix operator (++).\n\nWhen enabled: `++ $i`\nWhen disabled: `++$i`\n\nDefault: false", "type": "boolean" }, "space-after-logical-not-unary-prefix-operator": { "default": false, "description": "Whether to add a space after the logical not operator (!).\n\nWhen enabled: `! $foo`\nWhen disabled: `!$foo`\n\nDefault: false", "type": "boolean" }, "space-after-reference-unary-prefix-operator": { "default": false, "description": "Whether to add a space after the reference operator (&).\n\nWhen enabled: `& $foo`\nWhen disabled: `&$foo`\n\nDefault: false", "type": "boolean" }, "space-around-assignment-in-declare": { "default": false, "description": "Whether to add spaces around the assignment in declare statements.\n\nWhen enabled: `declare(strict_types = 1)`\nWhen disabled: `declare(strict_types=1)`\n\nDefault: false", "type": "boolean" }, "space-around-concatenation-binary-operator": { "default": true, "description": "Whether to add spaces around the concatenation operator (.)\n\nWhen enabled: `$a . $b`\nWhen disabled: `$a.$b`\n\nDefault: true", "type": "boolean" }, "space-before-arrow-function-parameter-list-parenthesis": { "default": false, "description": "Whether to add a space before the opening parameters in arrow functions.\n\nWhen enabled: `fn ($x) => $x * 2`\nWhen disabled: `fn($x) => $x * 2`\n\nDefault: false", "type": "boolean" }, "space-before-closure-parameter-list-parenthesis": { "default": true, "description": "Whether to add a space before the opening parameters in closures.\n\nWhen enabled: `function ($x) use ($y)`\nWhen disabled: `function($x) use ($y)`\n\nDefault: true", "type": "boolean" }, "space-before-closure-use-clause-parenthesis": { "default": true, "description": "Whether to add a space before the opening parenthesis in closure use clause.\n\nWhen enabled: `function() use ($var)`\nWhen disabled: `function() use($var)`\n\nDefault: true", "type": "boolean" }, "space-before-hook-parameter-list-parenthesis": { "default": false, "description": "Whether to add a space before the opening parameters in hooks.\n\nWhen enabled: `$hook ($param)`\nWhen disabled: `$hook($param)`\n\nDefault: false", "type": "boolean" }, "space-within-grouping-parenthesis": { "default": false, "description": "Whether to add spaces within grouping parentheses.\n\nWhen enabled: `( $expr ) - $expr`\nWhen disabled: `($expr) - $expr`\n\nDefault: false", "type": "boolean" }, "tab-width": { "default": 4, "description": "Number of spaces per indentation level.\n\nDefault: 4", "format": "uint", "minimum": 0, "type": "integer" }, "trailing-comma": { "default": true, "description": "Whether to add a trailing comma to the last element in multi-line syntactic structures.\n\nWhen enabled, trailing commas are added to lists, arrays, parameter lists,\nargument lists, and other similar structures when they span multiple lines.\n\nDefault: true", "type": "boolean" }, "uppercase-literal-keyword": { "default": false, "description": "Whether to print boolean and null literals in upper-case (e.g. `TRUE`, `FALSE`, `NULL`).\nWhen enabled these literals are printed in uppercase; when disabled they are printed\nin lowercase.\n\nDefault: false", "type": "boolean" }, "use-tabs": { "default": false, "description": "Whether to use tabs instead of spaces for indentation.\n\nDefault: false", "type": "boolean" } }, "title": "FormatterConfiguration", "type": "object" }, "FormatterPreset": { "description": "Available formatter presets.", "type": "string" }, "GlobConfiguration": { "additionalProperties": false, "description": "Configuration for glob pattern matching behavior.\n\nThese settings control how glob patterns in `paths`, `includes`, and `excludes` are interpreted.\nAll defaults match standard glob behavior for backwards compatibility.", "properties": { "backslash-escape": { "default": true, "description": "Whether `\\` escapes special characters in patterns.\n\nDefault: `true`.", "type": "boolean" }, "case-insensitive": { "default": false, "description": "Match patterns case-insensitively.\n\nDefault: `false`.", "type": "boolean" }, "empty-alternates": { "default": false, "description": "Whether an empty case in alternates is allowed.\n\nWhen enabled, `{,a}` matches both `\"\"` and `\"a\"`.\n\nDefault: `false`.", "type": "boolean" }, "literal-separator": { "default": false, "description": "When `true`, a single `*` does not match path separators (`/`).\n\nThis makes `src/*/Test` match only `src/foo/Test`, not `src/foo/bar/Test`.\nUse `**` for recursive matching across directories.\n\nDefault: `false`.", "type": "boolean" } }, "type": "object" }, "GuardConfiguration": { "additionalProperties": false, "properties": { "baseline": { "default": null, "description": "Path to a baseline file to ignore listed issues.", "type": ["string", "null"] }, "baseline-variant": { "$ref": "#/$defs/BaselineVariant", "default": "loose", "description": "The baseline variant to use when generating new baselines.\n\nOptions:\n\n- `\"strict\"`: Exact line matching with start/end line numbers\n- `\"loose\"`: Count-based matching by (file, code, message) tuple (default)\n\nThe loose variant is more resilient to code changes as line number shifts\ndon't affect the baseline." }, "excludes": { "default": [], "description": "A list of patterns to exclude from guard checking.", "items": { "type": "string" }, "type": "array" }, "minimum-fail-level": { "$ref": "#/$defs/Level", "default": "Error", "description": "Set the minimum issue severity that causes the command to fail.\n\nOptions: `\"note\"`, `\"help\"`, `\"warning\"`, `\"error\"`\n\nCan be overridden by the `--minimum-fail-level` CLI flag.\n\nDefaults to `\"error\"`." }, "mode": { "$ref": "#/$defs/GuardMode", "default": "default" }, "perimeter": { "$ref": "#/$defs/PerimeterSettings", "default": { "layering": [], "layers": {}, "rules": [] } }, "structural": { "$ref": "#/$defs/StructuralSettings", "default": { "rules": [] } } }, "type": "object" }, "GuardMode": { "description": "Specifies which guard modes to run.", "oneOf": [ { "const": "default", "description": "Run both structural and perimeter guards (default)", "type": "string" }, { "const": "structural", "description": "Run only structural guard", "type": "string" }, { "const": "perimeter", "description": "Run only perimeter guard", "type": "string" } ] }, "IgnoreEntry": { "anyOf": [ { "description": "Ignore a code everywhere: `\"code1\"`", "type": "string" }, { "description": "Ignore a code in specific paths: `{ code = \"code2\", in = \"path/\" }`", "properties": { "code": { "type": "string" }, "in": { "items": { "type": "string" }, "type": "array" } }, "required": ["code", "in"], "type": "object" } ], "description": "Represents an entry in the analyzer's `ignore` configuration.\n\nCan be either a plain code string (ignored everywhere) or a scoped entry\nthat only ignores a code in specific paths." }, "Level": { "description": "Represents the severity level of an issue.", "oneOf": [ { "const": "Note", "description": "A note, providing additional information or context.", "type": "string" }, { "const": "Help", "description": "A help message, suggesting possible solutions or further actions.", "type": "string" }, { "const": "Warning", "description": "A warning, indicating a potential problem that may need attention.", "type": "string" }, { "const": "Error", "description": "An error, indicating a problem that prevents the code from functioning correctly.", "type": "string" } ] }, "LinterConfiguration": { "additionalProperties": false, "properties": { "baseline": { "default": null, "description": "Path to a baseline file to ignore listed issues.", "type": ["string", "null"] }, "baseline-variant": { "$ref": "#/$defs/BaselineVariant", "default": "loose", "description": "The baseline variant to use when generating new baselines.\n\nOptions:\n\n- `\"strict\"`: Exact line matching with start/end line numbers\n- `\"loose\"`: Count-based matching by (file, code, message) tuple (default)\n\nThe loose variant is more resilient to code changes as line number shifts\ndon't affect the baseline." }, "excludes": { "default": [], "description": "A list of patterns to exclude from linting.", "items": { "type": "string" }, "type": "array" }, "integrations": { "default": [], "description": "Integrations to enable during linting.", "items": { "type": "string" }, "type": "array" }, "minimum-fail-level": { "$ref": "#/$defs/Level", "default": "Error", "description": "Set the minimum issue severity that causes the command to fail.\n\nOptions: `\"note\"`, `\"help\"`, `\"warning\"`, `\"error\"`\n\nCan be overridden by the `--minimum-fail-level` CLI flag.\n\nDefaults to `\"error\"`." }, "rules": { "$ref": "#/$defs/RulesSettings", "default": { "ambiguous-constant-access": { "enabled": false, "level": "Help" }, "ambiguous-function-call": { "enabled": false, "level": "Help" }, "array-style": { "enabled": true, "level": "Note", "style": "short" }, "assert-description": { "enabled": true, "level": "Warning" }, "assertion-style": { "enabled": true, "level": "Warning", "style": "static" }, "block-statement": { "enabled": true, "level": "Note" }, "braced-string-interpolation": { "enabled": true, "level": "Note" }, "class-name": { "enabled": true, "level": "Help", "psr": false }, "combine-consecutive-issets": { "enabled": true, "level": "Warning" }, "constant-condition": { "enabled": true, "level": "Help" }, "constant-name": { "enabled": true, "level": "Help" }, "cyclomatic-complexity": { "enabled": true, "level": "Error", "method-threshold": null, "threshold": 15 }, "deprecated-cast": { "enabled": true, "level": "Error" }, "deprecated-shell-execute-string": { "enabled": true, "level": "Error" }, "deprecated-switch-semicolon": { "enabled": true, "level": "Error" }, "disallowed-functions": { "enabled": true, "extensions": [], "functions": [], "level": "Warning" }, "enum-name": { "enabled": true, "level": "Help" }, "excessive-nesting": { "enabled": true, "function-like-threshold": null, "level": "Warning", "threshold": 7 }, "excessive-parameter-list": { "constructor-threshold": null, "enabled": true, "level": "Error", "threshold": 5 }, "explicit-nullable-param": { "enabled": true, "level": "Warning" }, "explicit-octal": { "enabled": true, "level": "Warning" }, "file-name": { "check-functions": false, "enabled": true, "level": "Warning" }, "final-controller": { "enabled": true, "level": "Error" }, "function-name": { "camel": false, "either": false, "enabled": true, "level": "Help" }, "halstead": { "difficulty-threshold": 12.0, "effort-threshold": 5000.0, "enabled": true, "level": "Warning", "volume-threshold": 1000.0 }, "identity-comparison": { "enabled": true, "level": "Warning" }, "ineffective-format-ignore-next": { "enabled": true, "level": "Warning" }, "ineffective-format-ignore-region": { "enabled": true, "level": "Warning" }, "inline-variable-return": { "enabled": true, "level": "Warning" }, "instanceof-stringable": { "enabled": true, "level": "Warning" }, "interface-name": { "enabled": true, "level": "Help", "psr": false }, "invalid-open-tag": { "enabled": true, "level": "Note" }, "kan-defect": { "enabled": true, "level": "Error", "threshold": 1.6 }, "literal-named-argument": { "check-first-argument": false, "enabled": true, "level": "Warning", "threshold": 1 }, "loop-does-not-iterate": { "enabled": true, "level": "Warning" }, "lowercase-keyword": { "enabled": true, "level": "Help" }, "lowercase-type-hint": { "enabled": true, "level": "Help" }, "method-name": { "camel": true, "either": false, "enabled": false, "level": "Help", "use-snake-case-for-tests": false }, "middleware-in-routes": { "enabled": true, "level": "Warning" }, "missing-docs": { "classes": false, "constants": true, "enabled": false, "enum-cases": true, "enums": false, "functions": true, "interfaces": false, "level": "Help", "methods": true, "properties": true, "statics": true, "traits": false }, "no-alias-function": { "enabled": true, "level": "Note" }, "no-alternative-syntax": { "enabled": false, "level": "Warning" }, "no-array-accumulation-in-loop": { "enabled": false, "level": "Warning" }, "no-assign-in-argument": { "enabled": false, "level": "Warning" }, "no-assign-in-condition": { "enabled": true, "level": "Warning" }, "no-boolean-flag-parameter": { "enabled": true, "exclude-constructors": true, "exclude-setters": false, "level": "Help" }, "no-closing-tag": { "enabled": true, "level": "Help" }, "no-db-schema-change": { "enabled": true, "level": "Error" }, "no-debug-symbols": { "enabled": true, "level": "Note" }, "no-direct-db-query": { "enabled": true, "level": "Warning" }, "no-else-clause": { "enabled": true, "level": "Help" }, "no-empty": { "enabled": true, "level": "Error" }, "no-empty-catch-clause": { "enabled": true, "level": "Warning" }, "no-empty-comment": { "enabled": true, "level": "Note", "preserve-single-line-comments": false }, "no-empty-loop": { "enabled": true, "level": "Note" }, "no-error-control-operator": { "enabled": true, "level": "Error" }, "no-eval": { "enabled": true, "level": "Error" }, "no-ffi": { "enabled": true, "level": "Error" }, "no-fully-qualified-global-class-like": { "enabled": false, "level": "Help" }, "no-fully-qualified-global-constant": { "enabled": false, "level": "Help" }, "no-fully-qualified-global-function": { "enabled": false, "level": "Help" }, "no-global": { "enabled": true, "level": "Error" }, "no-goto": { "enabled": true, "level": "Note" }, "no-hash-comment": { "enabled": true, "level": "Warning" }, "no-hash-emoji": { "enabled": true, "level": "Warning" }, "no-ini-set": { "enabled": true, "level": "Warning" }, "no-inline": { "enabled": false, "level": "Error" }, "no-insecure-comparison": { "enabled": true, "level": "Error" }, "no-is-null": { "enabled": false, "level": "Note" }, "no-isset": { "allow-array-checks": false, "enabled": true, "level": "Warning" }, "no-iterator-to-array-in-foreach": { "enabled": false, "level": "Warning" }, "no-literal-password": { "enabled": true, "level": "Error" }, "no-multi-assignments": { "enabled": true, "level": "Warning" }, "no-nested-ternary": { "enabled": true, "level": "Warning" }, "no-noop": { "enabled": true, "level": "Help" }, "no-only": { "enabled": true, "level": "Error" }, "no-parameter-shadowing": { "enabled": false, "level": "Warning" }, "no-php-tag-terminator": { "enabled": true, "level": "Note" }, "no-protected-in-final": { "enabled": true, "level": "Help" }, "no-redundant-binary-string-prefix": { "enabled": true, "level": "Help" }, "no-redundant-block": { "enabled": true, "level": "Help" }, "no-redundant-continue": { "enabled": true, "level": "Help" }, "no-redundant-file": { "enabled": true, "level": "Help" }, "no-redundant-final": { "enabled": true, "level": "Help" }, "no-redundant-isset": { "enabled": true, "level": "Help" }, "no-redundant-label": { "enabled": true, "level": "Help" }, "no-redundant-literal-return": { "enabled": true, "level": "Warning" }, "no-redundant-math": { "enabled": true, "level": "Help" }, "no-redundant-method-override": { "enabled": true, "level": "Help" }, "no-redundant-nullsafe": { "enabled": true, "level": "Help" }, "no-redundant-parentheses": { "enabled": true, "level": "Help" }, "no-redundant-readonly": { "enabled": true, "level": "Help" }, "no-redundant-string-concat": { "enabled": true, "level": "Help" }, "no-redundant-use": { "enabled": true, "level": "Warning" }, "no-redundant-write-visibility": { "enabled": true, "level": "Help" }, "no-redundant-yield-from": { "enabled": true, "level": "Help" }, "no-request-all": { "enabled": true, "level": "Warning" }, "no-request-variable": { "enabled": true, "level": "Error" }, "no-roles-as-capabilities": { "enabled": true, "level": "Warning" }, "no-self-assignment": { "enabled": true, "level": "Warning" }, "no-shell-execute-string": { "enabled": true, "level": "Error" }, "no-short-bool-cast": { "enabled": false, "level": "Help" }, "no-short-opening-tag": { "enabled": true, "level": "Warning" }, "no-shorthand-ternary": { "enabled": true, "level": "Warning" }, "no-sprintf-concat": { "enabled": true, "level": "Warning" }, "no-trailing-space": { "enabled": true, "level": "Note" }, "no-underscore-class": { "enabled": true, "level": "Warning" }, "no-unescaped-output": { "enabled": true, "level": "Error" }, "no-unsafe-finally": { "enabled": true, "level": "Error" }, "no-variable-variable": { "enabled": true, "level": "Warning" }, "no-void-reference-return": { "enabled": true, "level": "Warning" }, "optional-param-order": { "enabled": true, "level": "Warning" }, "prefer-anonymous-migration": { "enabled": true, "level": "Warning" }, "prefer-arrow-function": { "enabled": true, "level": "Help" }, "prefer-early-continue": { "enabled": true, "level": "Help", "max_allowed_statements": 0 }, "prefer-first-class-callable": { "check-functions": false, "enabled": true, "level": "Warning" }, "prefer-interface": { "enabled": true, "level": "Note" }, "prefer-pre-increment": { "enabled": false, "level": "Help" }, "prefer-static-closure": { "enabled": true, "level": "Help" }, "prefer-test-attribute": { "enabled": false, "level": "Warning" }, "prefer-view-array": { "enabled": true, "level": "Help" }, "prefer-while-loop": { "enabled": true, "level": "Note" }, "property-name": { "camel": true, "either": false, "enabled": false, "level": "Help" }, "psl-array-functions": { "enabled": true, "level": "Warning" }, "psl-data-structures": { "enabled": true, "level": "Warning" }, "psl-datetime": { "enabled": true, "level": "Warning" }, "psl-math-functions": { "enabled": true, "level": "Warning" }, "psl-output": { "enabled": true, "level": "Error" }, "psl-randomness-functions": { "enabled": true, "level": "Warning" }, "psl-regex-functions": { "enabled": true, "level": "Warning" }, "psl-sleep-functions": { "enabled": true, "level": "Warning" }, "psl-string-functions": { "enabled": true, "level": "Warning" }, "readable-literal": { "enabled": true, "level": "Warning", "min-digits": 5 }, "require-namespace": { "enabled": false, "level": "Warning" }, "require-preg-quote-delimiter": { "enabled": true, "level": "Warning" }, "sensitive-parameter": { "enabled": true, "level": "Error" }, "single-class-per-file": { "enabled": true, "level": "Warning" }, "sorted-integer-keys": { "enabled": false, "level": "Help" }, "str-contains": { "enabled": true, "level": "Warning" }, "str-starts-with": { "enabled": true, "level": "Warning" }, "strict-assertions": { "enabled": true, "level": "Warning" }, "strict-behavior": { "allow-loose-behavior": false, "enabled": true, "level": "Warning" }, "strict-types": { "allow-disabling": false, "enabled": true, "level": "Warning" }, "switch-continue-to-break": { "enabled": false, "level": "Warning" }, "tagged-fixme": { "enabled": true, "level": "Warning" }, "tagged-todo": { "enabled": true, "level": "Warning" }, "tainted-data-to-sink": { "enabled": true, "known-sink-functions": ["printf"], "level": "Error" }, "too-many-enum-cases": { "enabled": true, "level": "Error", "threshold": 20 }, "too-many-methods": { "count-hooks": false, "count-setters-and-getters": false, "enabled": true, "level": "Error", "threshold": 10 }, "too-many-properties": { "enabled": true, "level": "Error", "threshold": 10 }, "trait-name": { "enabled": true, "level": "Help", "psr": false }, "use-compound-assignment": { "enabled": true, "level": "Help" }, "use-dedicated-expectation": { "enabled": true, "level": "Warning" }, "use-simpler-expectation": { "enabled": true, "level": "Warning" }, "use-specific-assertions": { "enabled": true, "level": "Warning" }, "use-specific-expectations": { "enabled": true, "level": "Warning" }, "use-wp-functions": { "enabled": true, "level": "Warning" }, "valid-docblock": { "enabled": true, "level": "Note" }, "variable-name": { "camel": false, "check-parameters": true, "either": true, "enabled": false, "level": "Help" }, "yoda-conditions": { "enabled": false, "level": "Help" } }, "description": "Settings for various linting rules." } }, "type": "object" }, "MethodChainBreakingStyle": { "enum": ["same_line", "next_line"], "type": "string" }, "NullTypeHint": { "description": "Specifies null type hint style.", "enum": ["null_pipe", "null_pipe_last", "question"], "type": "string" }, "PHPVersion": { "description": "Represents a PHP version in `(major, minor, patch)` format,\npacked internally into a single `u32` for easy comparison.\n\n# Examples\n\n```\nuse mago_php_version::PHPVersion;\n\nlet version = PHPVersion::new(8, 4, 0);\nassert_eq!(version.major(), 8);\nassert_eq!(version.minor(), 4);\nassert_eq!(version.patch(), 0);\nassert_eq!(version.to_version_id(), 0x08_04_00);\nassert_eq!(version.to_string(), \"8.4.0\");\n```", "type": "string" }, "ParserConfiguration": { "additionalProperties": false, "description": "Configuration for the PHP parser.\n\nControls how PHP code is parsed, including lexer-level settings\nthat affect tokenization behavior.", "properties": { "enable-short-tags": { "default": true, "description": "Whether to enable PHP short open tags (`