mirror of
https://gh.wpcy.net/https://github.com/fairpm/did-manager.git
synced 2026-06-19 02:03:36 +08:00
1) Delete WordPress specific Classes and methods, its tests and examples 2) THere was a typo in one of the folder names Sorage which is now corectly named back to Storage. 3) Normalise the Namespace from Fairdidmanager to Fair\DID 4) Run Codequality checks via Mago
131 lines
6.6 KiB
TOML
131 lines
6.6 KiB
TOML
# Welcome to Mago!
|
|
# For full documentation, see https://mago.carthage.software/tools/overview
|
|
php-version = "8.3.0"
|
|
|
|
[source]
|
|
paths = ["src/", "tests/"]
|
|
includes = ["vendor"]
|
|
excludes = []
|
|
|
|
[formatter]
|
|
always-break-named-arguments-list = false
|
|
inline-empty-classlike-braces = true
|
|
inline-empty-function-braces = true
|
|
inline-empty-method-braces = true
|
|
null-type-hint = "question"
|
|
preserve-breaking-argument-list = true
|
|
preserve-breaking-array-like = true
|
|
preserve-breaking-attribute-list = true
|
|
preserve-breaking-conditional-expression = true
|
|
preserve-breaking-member-access-chain = true
|
|
preserve-breaking-parameter-list = true
|
|
|
|
[linter]
|
|
integrations = ["symfony"]
|
|
|
|
[linter.rules]
|
|
assert-description = { enabled = false }
|
|
braced-string-interpolation = { enabled = false }
|
|
class-name = { enabled = false }
|
|
constant-name = { enabled = false }
|
|
cyclomatic-complexity = { enabled = false }
|
|
excessive-parameter-list = { enabled = false }
|
|
final-controller = { enabled = false }
|
|
function-name = { enabled = false }
|
|
halstead = { enabled = false }
|
|
interface-name = { enabled = false }
|
|
kan-defect = { enabled = false }
|
|
literal-named-argument = { enabled = false }
|
|
no-assign-in-condition = { enabled = false }
|
|
no-boolean-flag-parameter = { enabled = false }
|
|
no-else-clause = { enabled = false }
|
|
no-empty = { enabled = false } # empty() is awful, but loose truthiness is just as bad without being explicit about it.
|
|
no-empty-comment = { enabled = false }
|
|
no-literal-password = { enabled = false }
|
|
no-shorthand-ternary = { enabled = false }
|
|
prefer-first-class-callable = { enabled = false }
|
|
tagged-fixme = { enabled = false }
|
|
tagged-todo = { enabled = false }
|
|
too-many-methods = { enabled = false }
|
|
trait-name = { enabled = false }
|
|
|
|
|
|
[analyzer]
|
|
# Enable all features and categories, then disable individual rules as needed
|
|
allow-possibly-undefined-array-keys = false
|
|
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
|
|
memoize-properties = true
|
|
no-boolean-literal-comparison = true
|
|
perform-heuristic-checks = true
|
|
strict-list-index-checks = true
|
|
trust-existence-checks = false
|
|
|
|
# to get a list of all firing rules suitable for pasting in below:
|
|
# vendor/bin/mago analyze --reporting-format=emacs | perl -nE 'say qq{"$1",} if / - (.*?):/' | sort | uniq
|
|
ignore = [
|
|
"impossible-assignment", # bad type inference
|
|
"impossible-condition", # wrong in very obvious places
|
|
"impossible-nonnull-entry-check", # confidently claims that keys cannot exist which very well can
|
|
"incompatible-property-type", # doesn't allow list<string> as an alias for array<int, string>
|
|
"invalid-argument", # bizarre inference failures, also doesn't grok list<>
|
|
"invalid-array-index", # doesn't allow non-negative-int
|
|
"invalid-destructuring-source", # thinks collections are `mixed`
|
|
"invalid-iterator", # deferred until array shape annotations are tightened
|
|
"invalid-method-access", # completely broken with laravel
|
|
"invalid-operand", # prevents useful control-flow shorthand. would enable if it allowed void context.
|
|
"invalid-return-statement", # broken when `static` return type is involved anywhere
|
|
"less-specific-argument", # deferred until collection and array-shape typing is improved
|
|
"less-specific-nested-argument-type", # fails on every single test. need to disable this just for tests/
|
|
"less-specific-nested-return-statement", # can't deal with collection method chaining
|
|
"less-specific-return-statement", # deferred
|
|
"mismatched-array-index", # deferred until we can put a stake through Laravel's craptastic __() function
|
|
"missing-magic-method", # laravel's obfuscations are still too much for mago to handle
|
|
"missing-override-attribute", # unnecessary in many cases
|
|
"mixed-argument", # poor type inference
|
|
"mixed-array-access", # completely broken, fails to infer an array even when it's the only return type
|
|
"mixed-array-assignment", # broken in the same fashion as mixed-array-access
|
|
"mixed-array-index", # deferred until key types are annotated more precisely
|
|
"mixed-assignment", # complete non-starter, seems to do no type inference at all
|
|
"mixed-method-access", # might have some use if i could disable it on tests
|
|
"mixed-operand", # forbids even truthiness checks without a known type
|
|
"mixed-property-access", # deferred
|
|
"mixed-return-statement", # terrible type inference
|
|
"no-value", # infers 'never' for local variables that were guarded with !empty() on the line immediately above
|
|
"non-documented-method", # misses docblocks that are quite plainly present
|
|
"non-documented-property", # misses docblocks that are quite plainly present
|
|
"non-existent-class-like", # path dependency symbols are not resolved consistently by mago
|
|
"non-existent-method", # cannot handle magic methods at all, making it a non-starter with laravel
|
|
"non-existent-property", # also lacks magic support. ironic for something called mago.
|
|
"null-argument", # fails to read type from @property-read
|
|
"null-array-index", # fails to read type from @property-read
|
|
"null-operand", # fails to read type from @property-read
|
|
"null-property-access", # fails to read type from @property-read
|
|
"nullable-return-statement", # deferred until defensive wrapping is tightened around vendor APIs
|
|
"possibly-invalid-argument", # deferred
|
|
"possibly-false-argument", # deferred until false-returning builtins are wrapped consistently
|
|
"possibly-null-argument", # basic type inference failures
|
|
"possibly-null-array-access", # fails to read type from @property-read
|
|
"possibly-null-array-index", # more trouble with the __() function
|
|
"possibly-undefined-array-index", # deferred
|
|
"possibly-undefined-string-array-index", # fires on unset(), where it's fine for the index to not exist
|
|
"redundant-comparison", # fails to read type from @property-read
|
|
"redundant-condition", # basic type inference failures
|
|
"redundant-logical-operation", # basic type inference failures
|
|
"redundant-null-coalesce", # fails to read type from @property-read
|
|
"template-constraint-violation", # deferred
|
|
"too-many-arguments", # signature for test() is broken
|
|
"undefined-string-array-index", # won't even _assign_ to arbitrary arrays
|
|
"undefined-variable", # can't handle Pest's use of $this
|
|
"unhandled-thrown-type", # we will not globally enforce checked exceptions
|
|
"unsafe-instantiation", # accepted for current static factory pattern
|
|
"unused-parameter", # too common a case to warn about
|
|
"unused-statement", # too common a case to warn about
|
|
]
|
|
|
|
|