mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-12-25 15:06:10 +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:
Daniel Siepmann 2024-02-06 13:52:03 +01:00 committed by GitHub
parent 024f2e70b7
commit db5535a7a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -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",

View file

@ -25,3 +25,7 @@ parameters:
return_type: 100
param_type: 100
property_type: 95
cognitive_complexity:
class: 10
function: 5