mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-14 05:16:12 +01:00
tea/phpstan.neon
Oliver Klee 74d26a72a0
[CLEANUP] Reduce redundancies in the PHPStan configuration (#1242)
Directories configured via `paths` already allows PHPStan to discover
the symbols in the code located there. So there is no need to add
these directories again via `scanDirectories`.

https://phpstan.org/user-guide/discovering-symbols#third-party-code-outside-of-composer-dependencies
2024-04-18 15:40:58 +02:00

55 lines
1.4 KiB
Text

includes:
- phpstan-baseline.neon
- .Build/vendor/spaze/phpstan-disallowed-calls/disallowed-dangerous-calls.neon
- .Build/vendor/spaze/phpstan-disallowed-calls/disallowed-execution-calls.neon
- .Build/vendor/spaze/phpstan-disallowed-calls/disallowed-insecure-calls.neon
- .Build/vendor/spaze/phpstan-disallowed-calls/disallowed-loose-calls.neon
parameters:
parallel:
# Don't be overly greedy on machines with more CPU's to be a good neighbor especially on CI
maximumNumberOfProcesses: 5
level: 3
bootstrapFiles:
- .Build/vendor/autoload.php
paths:
- Classes
- Configuration
- Tests
type_coverage:
return_type: 100
param_type: 100
property_type: 95
cognitive_complexity:
class: 10
function: 5
disallowedFunctionCalls:
-
function:
- 'var_dump()'
- 'xdebug_break()'
- 'debug()'
message: 'Use logging instead or remove if it was for debugging purposes.'
-
function: 'header()'
message: 'Use PSR-7 API instead'
disallowedStaticCalls:
-
method:
- 'TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump()'
- 'TYPO3\CMS\Core\Utility\DebugUtility::debug()'
message: 'Use logging instead or remove if it was for debugging purposes.'
disallowedSuperglobals:
-
superglobal:
- '$_GET'
- '$_POST'
- '$_FILES'
- '$_SERVER'
message: 'Use PSR-7 API instead'