-
-
Notifications
You must be signed in to change notification settings - Fork 998
Expand file tree
/
Copy pathphpstan.neon
More file actions
51 lines (50 loc) · 2.01 KB
/
Copy pathphpstan.neon
File metadata and controls
51 lines (50 loc) · 2.01 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
includes:
# Carbon's official PHPStan extension: resolves macros registered via mixin()/macro()
# (including Leantime's date/time macros, registered in bootstrap.php) on all Carbon types.
- ../vendor/nesbot/carbon/extension.neon
parameters:
bootstrapFiles:
- bootstrap.php
level: 3
inferPrivatePropertyTypeFromConstructor: true
paths:
- ../public
- ../app
- ../.phpstan/Rules
excludePaths:
- ../app/Plugins/*/vendor/*
- ../app/Plugins/GoogleCalendar/*
scanDirectories:
- ../vendor
- ../config
stubFiles:
# Declares Leantime's runtime-registered methods (Str/Carbon macros, Collection::countNested,
# Event::discoverListeners) so vanilla PHPStan stops reporting them as undefined.
- stubs/leantime-macros.stub
# Declares concrete Laravel methods our code calls through looser contracts (no Larastan).
- stubs/laravel-gaps.stub
ignoreErrors:
# Legacy templates receive their variables from the view layer ($tpl->assign / extract)
# and blade files via compiled-in view data. PHPStan analyses them as plain PHP and so
# cannot see those variables. This is a known limitation of the template pattern, not a
# code defect. reportUnmatched is off because templates are mid-migration (paths come and
# go) and app/Plugins is a private submodule absent in CI.
-
identifier: variable.undefined
reportUnmatched: false
paths:
- ../app/Domain/*/Templates/*
- ../app/Views/*
- ../app/Plugins/*/Templates/*
universalObjectCratesClasses:
- Leantime\Core\Configuration\Environment
earlyTerminatingMethodCalls:
Leantime\Core\UI\Templates:
- redirect
- display
- displayPartial
# services:
# -
# class: Leanstan\Rules\FacadeRule
# tags:
# - phpstan.rules.rule