mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-24 18:36:12 +01:00
[TASK] Add PHPStan extension for cognitive load (#1156)
A new composer package "tomasvotruba/cognitive-complexity" is added. This one is a PHPStan extension which will check the cognitive complexity of classes and functions/methods. We have very low numbers as our examples are not too complex yet. Real projects adopting the extension might configure higher values in the beginning or use the baseline approach. Resolves: #1154
This commit is contained in:
parent
024f2e70b7
commit
db5535a7a0
2 changed files with 5 additions and 0 deletions
|
@ -62,6 +62,7 @@
|
|||
"symfony/console": "^5.4 || ^6.4 || ^7.0",
|
||||
"symfony/translation": "^5.4 || ^6.4 || ^7.0",
|
||||
"symfony/yaml": "^5.4 || ^6.4 || ^7.0",
|
||||
"tomasvotruba/cognitive-complexity": "^0.2.3",
|
||||
"tomasvotruba/type-coverage": "^0.2.1",
|
||||
"typo3/cms-fluid-styled-content": "^11.5.4 || ^12.4.0",
|
||||
"typo3/coding-standards": "^0.6.1",
|
||||
|
|
|
@ -25,3 +25,7 @@ parameters:
|
|||
return_type: 100
|
||||
param_type: 100
|
||||
property_type: 95
|
||||
|
||||
cognitive_complexity:
|
||||
class: 10
|
||||
function: 5
|
||||
|
|
Loading…
Reference in a new issue