106 lines
4.3 KiB
TOML
106 lines
4.3 KiB
TOML
php-version = "8.4.0"
|
|
|
|
[source]
|
|
excludes = ["web/wp/wp-admin/includes/noop.php"]
|
|
extensions = ["php"]
|
|
includes = ["config", "vendor", "web/app/plugins", "web/vendor", "web/wp"]
|
|
paths = ["web/app/themes/haiku-atelier-2024/"]
|
|
|
|
[formatter]
|
|
# Brace style for classes, traits, etc.
|
|
classlike-brace-style = "same_line"
|
|
# Brace style for closures.
|
|
closure-brace-style = "same_line"
|
|
# Brace style for control structures.
|
|
control-brace-style = "same_line"
|
|
# Brace style for functions.
|
|
function-brace-style = "same_line"
|
|
# Brace style for methods.
|
|
method-brace-style = "same_line"
|
|
# Maximum line length that the printer will wrap on.
|
|
print-width = 120
|
|
# Remove the trailing PHP close tag (?>) from files.
|
|
remove-trailing-close-tag = true
|
|
# Prefer single quotes over double quotes for strings.
|
|
single-quote = true
|
|
# Number of spaces per indentation level.
|
|
tab-width = 4
|
|
# Add a trailing comma to multi-line arrays, parameter lists, etc.
|
|
trailing-comma = true
|
|
# Use tabs instead of spaces for indentation.
|
|
use-tabs = false
|
|
# Place empty control structure bodies on the same line.
|
|
inline-empty-control-braces = true
|
|
# Place empty function bodies on the same line.
|
|
inline-empty-function-braces = true
|
|
# Place empty constructor bodies on the same line.
|
|
inline-empty-constructor-braces = true
|
|
# Place empty method bodies on the same line.
|
|
inline-empty-method-braces = true
|
|
# Place empty anonymous class bodies on the same line.
|
|
inline-empty-anonymous-class-braces = true
|
|
# How to break method chains.
|
|
method-chain-breaking-style = "next_line"
|
|
# Preserve existing line breaks in method chains.
|
|
preserve-breaking-member-access-chain = false
|
|
# Preserve existing line breaks in argument lists.
|
|
preserve-breaking-argument-list = false
|
|
# Preserve existing line breaks in array-like structures.
|
|
preserve-breaking-array-like = false
|
|
# Preserve existing line breaks in parameter lists.
|
|
preserve-breaking-parameter-list = false
|
|
# Preserve existing line breaks in attribute lists.
|
|
preserve-breaking-attribute-list = false
|
|
# Preserve existing line breaks in ternary expressions.
|
|
preserve-breaking-conditional-expression = false
|
|
# Always break parameter lists with promoted properties.
|
|
break-promoted-properties-list = true
|
|
# Place the binary operator on the next line when breaking.
|
|
line-before-binary-operator = true
|
|
# Always break named argument lists into multiple lines.
|
|
always-break-named-arguments-list = true
|
|
# Always break named argument lists in attributes.
|
|
always-break-attribute-named-argument-lists = true
|
|
# Use table-style alignment for arrays.
|
|
array-table-style-alignment = true
|
|
# Sort use statements alphabetically.
|
|
sort-uses = true
|
|
# Insert a blank line between different types of use statements.
|
|
separate-use-types = true
|
|
# Expand grouped use statements into individual statements.
|
|
expand-use-groups = true
|
|
# How to format null type hints (null|T vs ?T).
|
|
null-type-hint = "null_pipe"
|
|
# Add parentheses around new in member access ((new Foo)->bar()).
|
|
parentheses-around-new-in-member-access = false
|
|
# Add parentheses to new expressions without arguments (new Foo()).
|
|
parentheses-in-new-expression = true
|
|
# Add parentheses to exit and die constructs.
|
|
parentheses-in-exit-and-die = true
|
|
# Add parentheses to attributes without arguments.
|
|
parentheses-in-attribute = true
|
|
# Add a space before arrow function parameters.
|
|
space-before-arrow-function-parameter-list-parenthesis = false
|
|
|
|
[linter]
|
|
integrations = ["wordpress"]
|
|
|
|
[linter.rules]
|
|
ambiguous-function-call = { enabled = true }
|
|
halstead = { effort-threshold = 7000 }
|
|
literal-named-argument = { enabled = false }
|
|
no-redundant-readonly = { enabled = true }
|
|
no-redundant-use = { enabled = true }
|
|
no-variable-variable = { enabled = true }
|
|
|
|
[analyzer]
|
|
allow-possibly-undefined-array-keys = true
|
|
analyze-dead-code = true
|
|
check-arrow-function-missing-type-hints = true
|
|
check-closure-missing-type-hints = true
|
|
check-missing-type-hints = true
|
|
check-throws = true
|
|
find-unused-definitions = true
|
|
find-unused-expressions = true
|
|
perform-heuristic-checks = true
|
|
strict-list-index-checks = true
|