-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon
More file actions
55 lines (50 loc) · 2.17 KB
/
Copy pathphpstan.neon
File metadata and controls
55 lines (50 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
includes:
- vendor/larastan/larastan/extension.neon
- vendor/nesbot/carbon/extension.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/tomasvotruba/type-coverage/config/extension.neon
- phpstan-baseline.neon
parameters:
# Raised 5 -> 6 (2026-08-01, 844 findings baselined), then 6 -> max with
# strict-rules (2026-08-06, baseline regenerated): new code must be
# max+strict clean, existing debt is frozen rather than blocking.
# Chip away at the baseline, don't drop the level.
level: max
# Models declare casts via the casts() method (Laravel 11+ style); larastan
# only parses that method's return array when this flag is on.
parseModelCastsMethod: true
# Ratchet floors set to the measured coverage at adoption (2026-08-06),
# same philosophy as the CI line-coverage gate: never lower, bump as
# type-hint-focused PRs land.
type_coverage:
return: 98
param: 82
property: 97
# Known tradeoff: disabled so baselined inline @phpstan-ignore comments and
# resolved baseline entries don't surface as unmatched-ignore errors. The
# cost is that stale baseline entries go undetected; periodically regenerate
# the baseline (`phpstan analyse --generate-baseline`) to trim them.
reportUnmatchedIgnoredErrors: false
paths:
- app
- bootstrap
- config
- database
- public
- resources
- routes
- tests
ignoreErrors:
-
message: "#^Called 'env' outside of the config directory which returns null when the config is cached, use 'config'.$#"
path: *config/*.php
# Mockery's shouldReceive() is typed as ExpectationInterface|HigherOrderMessage,
# but the whole fluent chain (with/once/andReturn/...) lives only on the
# concrete Expectation class. Known larastan false positive on a
# runtime-valid chain — applies to every chain method, not just two.
-
message: '#^Call to an undefined method Mockery\\ExpectationInterface\|Mockery\\HigherOrderMessage::\w+\(\)\.$#'
path: tests/*
excludePaths:
- vendor/*
- */vendor/*