mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2025-03-26 17:43:49 +01:00

This package provides some opiniated PHPStan rules to make our code more explicit and easier to read. https://github.com/rectorphp/type-perfect As our code already is in pretty good shape, the new rules do not create any new warnings. Also add some blank lines to the PHPStan configuration file to make it more readable. Fixes #1335
70 lines
1.8 KiB
Text
70 lines
1.8 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: 9
|
|
|
|
paths:
|
|
- Classes
|
|
- Configuration
|
|
- Tests
|
|
- ext_localconf.php
|
|
|
|
# Allow instanceof checks, particularly in tests
|
|
checkAlwaysTrueCheckTypeFunctionCall: false
|
|
|
|
type_coverage:
|
|
return_type: 100
|
|
param_type: 100
|
|
property_type: 95
|
|
|
|
cognitive_complexity:
|
|
class: 10
|
|
function: 5
|
|
|
|
type_perfect:
|
|
no_mixed_property: true
|
|
no_mixed_caller: true
|
|
null_over_false: true
|
|
narrow_param: true
|
|
narrow_return: true
|
|
|
|
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'
|
|
|
|
ignoreErrors:
|
|
-
|
|
message: '#Out of 1 possible constant types#'
|
|
path: Tests/Functional/Command/CreateTestDataCommandTest.php
|