# Welcome to Mago!
# For full documentation, see https://mago.carthage.software/tools/overview
php-version = "8.4.0"

[source]
workspace = "."
paths = ["app/", "database/factories/", "database/migrations/", "database/seeders/", "tests/", "resources/lang/en_US"]
includes = ["vendor"]
excludes = []

[formatter]
print-width = 160
tab-width = 4
use-tabs = false
trailing-comma = false
method-chain-breaking-style = "same_line"
preserve-breaking-array-like = false
align-assignment-like = true
null-type-hint = "null_pipe"
sort-class-methods = true

[linter]
integrations = ["symfony", "laravel", "phpunit"]
excludes = ["app/Providers/AppServiceProvider.php"]  # Additionally excluded from linter only

[linter.rules]
ambiguous-function-call = { enabled = false }
literal-named-argument = { enabled = false }
halstead = { effort-threshold = 7000 }
prefer-early-continue = { enabled = false }

[analyzer]
find-unused-definitions = true
find-unused-expressions = true
analyze-dead-code = false
memoize-properties = true
allow-possibly-undefined-array-keys = true
check-throws = true
check-missing-override = false
find-unused-parameters = false
strict-list-index-checks = false
no-boolean-literal-comparison = false
check-missing-type-hints = false
register-super-globals = true

# deze mag iedereen
[[guard.perimeter.rules]]
namespace = "FireflyIII\\"
permit = ["Carbon\\Carbon"]

# guard rules
[[guard.perimeter.rules]]
namespace = "FireflyIII\\Services"
permit = ["@self", "@native","FireflyIII\\Models"]

[[guard.perimeter.rules]]
namespace = "FireflyIII\\Transformers"
permit = ["@self", "@native","FireflyIII\\Models"]
