Skip to content

Commit 034308f

Browse files
committed
explain ignored rules
1 parent ab4f482 commit 034308f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

phpstan.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,33 @@ parameters:
44
- resources
55
- test
66
ignoreErrors:
7+
# $this, $data comes from UnityMailer
78
- messages:
89
- '#Variable \$this might not be defined.#'
910
- '#Variable \$data might not be defined.#'
1011
paths:
1112
- resources/mail/*
13+
# these functions are called with call_user_func
1214
- messages:
1315
- '#Method SSHKeyAddTest::addSshKeysPaste\(\) is unused.#'
1416
- '#Method SSHKeyAddTest::addSshKeysImport\(\) is unused.#'
1517
- '#Method SSHKeyAddTest::addSshKeysGenerate\(\) is unused.#'
1618
- '#Method SSHKeyAddTest::addSshKeysGithub\(\) is unused.#'
1719
paths:
1820
- test/functional/SSHKeyAddTest.php
21+
# assertTrue(true) makes phpunit shut up about tests doing no assertions
1922
- messages:
2023
- '#Call to method PHPUnit\\Framework\\Assert::assertTrue\(\) with true will always evaluate to true.#'
2124
paths:
2225
- test/functional/InvalidEPPNTest.php
2326
- test/functional/PageLoadTest.php
27+
# I cannot seem to make this error go away no matter how many functions I add @phpstan-impure to
2428
- messages:
2529
- '#Negated boolean expression is always false\.#'
2630
paths:
2731
- test/functional/PiRemoveUserTest.php
2832
- test/phpunit-bootstrap.php
33+
# $Subject is written by mail templates
2934
- messages:
3035
- '#Property UnityWebPortal\\lib\\UnityWebhook::\$Subject is never written, only read\.#'
3136
paths:

0 commit comments

Comments
 (0)