-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
phpstan.neon
59 lines (46 loc) · 2.89 KB
/
phpstan.neon
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
56
57
58
59
includes:
- vendor/larastan/larastan/extension.neon
- vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon
parameters:
paths:
- app
- database/factories
- database/seeders
- routes
inferPrivatePropertyTypeFromConstructor: true
excludePaths:
- */app/Domains/Vault/ManageCalendar/Web/ViewHelpers/VaultCalendarIndexViewHelper.php
- */app/Domains/Contact/DavClient/Services/Utils/Dav/ServiceUrlQuery.php
- */app/Models/Contact.php
level: 5
ignoreErrors:
# Global ignore of the "Access to an undefined property"
- '#Access to an undefined property .*\.#'
# Global ignore of VCard properties access
# - '#Access to an undefined property Sabre\\VObject\\Component\\VCard::\$.*\.#'
# Specific column loaded with DB::raw
#- message: '#Access to an undefined property App\\Models\\Post::\$year\.#'
# path: */app/Domains/Vault/ManageJournals/Web/ViewHelpers/JournalShowViewHelper.php
# unsearchable scout global method
#- message: '#Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\HasMany<App\\Models\\Note>::unsearchable\(\)\.#'
# path: */app/Models/Contact.php
- message: '#Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\HasMany<App\\Models\\Note>::unsearchable\(\)\.#'
path: */app/Models/Vault.php
- message: '#Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\HasMany<App\\Models\\Contact>::unsearchable\(\)\.#'
path: */app/Models/Vault.php
# larastan false positive with Collection::random
- message: '#Parameter \#1 \$number of method Illuminate\\Support\\Collection<int,.*>::random\(\) expects .*, Closure\(Illuminate\\Support\\Collection\): int.* given\.#'
path: */app/Domains/Vault/ManageVault/Web/ViewHelpers/VaultIndexViewHelper.php
# larastan needs to manage ->pivot properties
#- '#Access to an undefined property App\\Models\\[^:]*::\$pivot\.#'
# Attributes
#- message: '#Access to an undefined property App\\Models\\AddressBookSubscription::\$isWayPush\.#'
# path: */app/Domains/Contact/DavClient/Services/Utils/AddressBookSynchronizer.php
#- message: '#Access to an undefined property App\\Models\\AddressBookSubscription::\$isWayGet\.#'
# path: */app/Domains/Contact/DavClient/Services/Utils/AddressBookSynchronizer.php
#- message: '#Access to an undefined property App\\Logging\\Loggable::\$id\.#'
# path: */app/Logging/LoggingHandler.php
#- message: '#Access to an undefined property Illuminate\\Database\\Eloquent\\Model::\$user_id\.#'
# path: */app/Listeners/WebauthnRegistered.php
- path: */app/Helpers/helpers.php
message: '#Function readVersion\(\) never returns null so it can be removed from the return type\.#'