forked from smrealms/smr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon.dist
95 lines (91 loc) · 3.88 KB
/
phpstan.neon.dist
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Distributed PHPStan config
parameters:
level: 6
paths:
- src
- test
bootstrapFiles:
- src/config.php
# Stricter analysis
polluteScopeWithLoopInitialAssignments: false
polluteScopeWithAlwaysIterableForeach: false
checkFunctionNameCase: true
checkInternalClassCaseSensitivity: true
checkTooWideReturnTypesInProtectedAndPublicMethods: true
dynamicConstantNames:
- BUG_REPORT_TO_ADDRESSES
- ENABLE_BETA
- ENABLE_DEBUG
- ENABLE_NPCS_CHESS
- FACEBOOK_APP_ID
- GOOGLE_ANALYTICS_ID
- GOOGLE_CLIENT_ID
- IRC_BOT_VERBOSE_PING
- NPC_LOG_TO_DATABASE
- RECAPTCHA_PRIVATE
- SMTP_HOSTNAME
- TWITTER_CONSUMER_KEY
- USING_AJAX
# We code in protection against a value of 0
- SmrMines::TOTAL_ENEMY_MINES_MODIFIER
#----------------------------------------------
# Warning suppression (to be fixed eventually!)
#----------------------------------------------
ignoreErrors:
-
# Template files currently emit many undefined variable errors
# because we source them inside Template::includeTemplate. This
# will require a redesign of the Template class to fix. (Level 1)
message: '#Variable .* might not be defined#'
path: src/template
-
# This while loop is needed to reconnect the IRC bot after server
# timeouts. It could be replaced with Docker daemonization if we
# modify the delayed callback actions. (Level 4)
message: '#While loop condition is always true.#'
path: src/tools/irc/irc.php
count: 1
-
# The `$targetPlayer` has impure functions called on it, which
# should reset its method return value cache, but PHPStan cannot
# detect that this is happening. (Level 4)
message: '#Right side of || is always false.#'
path: src/engine/Default/trader_attack_processing.php
count: 1
-
# Caused by temporary use of `markTestSkipped`. (Level 4)
message: '#Unreachable statement - code above always terminates.#'
path: test/SmrTest/lib/DefaultGame/Discord/CommandTest.php
count: 1
-
# This Admin Tool is temporarily(?) disabled. (Level 4)
message: '#Unreachable statement - code above always terminates.#'
path: src/engine/Default/admin/game_delete_processing.php
count: 1
-
# https://github.com/phpstan/phpstan/issues/7520
message: '#Expression in empty\(\) is always falsy.#'
paths:
- src/bootstrap.php
- src/engine/Default/bug_report_processing.php
-
# https://github.com/phpstan/phpstan/issues/7913
message: '#Empty array passed to foreach.#'
paths:
- src/bootstrap.php
- src/engine/Default/bug_report_processing.php
-
# https://github.com/thephpleague/oauth2-client/issues/897
message: '#Parameter \#1 \$token of method .*::getResourceOwner\(\) expects .*AccessToken, .*AccessTokenInterface given.#'
path: src/lib/Smr/SocialLogin
count: 2
-
# https://github.com/PHP-DI/PHP-DI/pull/827
message: '#Method Smr\\Container\\DiContainer::buildContainer\(\) should return Smr\\Container\\ResettableCompiledContainer|Smr\\Container\\ResettableContainer but returns DI\\Container.#'
path: src/lib/Smr/Container/DiContainer.php
count: 1
-
# https://github.com/PHP-DI/PHP-DI/pull/827
message: '#Call to an undefined method DI\\Container::(initialized|reset)\(\).#'
path: test/SmrTest/Container/ResettableContainerTraitTest.php
count: 9