mirror of
https://github.com/snipe/snipe-it.git
synced 2026-08-18 11:15:42 +00:00
45 lines
1.8 KiB
Plaintext
45 lines
1.8 KiB
Plaintext
includes:
|
|
- ./vendor/larastan/larastan/extension.neon
|
|
- phpstan-baseline.neon
|
|
|
|
parameters:
|
|
paths:
|
|
- app
|
|
- config
|
|
- database
|
|
- routes
|
|
|
|
# Level 4 catches dead code branches, always-false instanceof,
|
|
# unreachable code after return, and most type-mismatch classes
|
|
# of bug. Anything higher (5+) starts flagging Laravel-magic paths
|
|
# that need bigger config investments to satisfy. Raise later if
|
|
# the noise budget allows. Baseline captures pre-existing findings
|
|
# so CI stays green on this PR; new findings on future PRs will
|
|
# still fail the check. Unused-parameter detection is handled by
|
|
# PHPMD (see phpmd-ruleset.xml) since PHPStan intentionally omits
|
|
# that check to avoid false positives on interface-conforming
|
|
# methods.
|
|
level: 4
|
|
|
|
# Snipe-IT supports PHP 8.2 through 8.5. Setting phpVersion to the
|
|
# MINIMUM supported version makes PHPStan flag any 8.3+ syntax
|
|
# (typed class constants, json_validate, property hooks, etc.)
|
|
# that would break on an 8.2 deployment. The analyzer itself runs
|
|
# under whatever version CI provides; only the target check moves.
|
|
phpVersion: 80200
|
|
|
|
parallel:
|
|
maximumNumberOfProcesses: 4
|
|
|
|
# Larastan already understands Laravel Eloquent shapes at level 4.
|
|
# Ignore common false positives so signal stays useful.
|
|
ignoreErrors:
|
|
# $model->save() returns bool but analyzers sometimes flag it as
|
|
# unused when the caller doesn't branch on it; Snipe-IT has
|
|
# deliberate fire-and-forget saves in observers where the
|
|
# return value adds no information.
|
|
-
|
|
message: '#Call to an undefined method Illuminate\\Database\\Eloquent\\Builder#'
|
|
paths:
|
|
- app/Models/*.php
|