You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I execute PHP_CodeSniffer via php vendor/bin/phpcs src/ --standard=./vendor/php-parallel-lint/php-code-style/ruleset.xml, the coding style is as follows:
phpcs:
[exec]
[exec] FILE: ...d/open-source-contributions/PHP-Console-Highlighter/src/Highlighter.php
[exec] --------------------------------------------------------------------------------
[exec] FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
[exec] --------------------------------------------------------------------------------
[exec] 111 | ERROR | Function's cyclomatic complexity (28) exceeds allowed maximum of
[exec] | | 20
[exec] --------------------------------------------------------------------------------
[exec] UPGRADE TO PHP_CODESNIFFER 2.0 TO FIX ERRORS AUTOMATICALLY
[exec] --------------------------------------------------------------------------------
[exec]
[exec] Result: 1
The text was updated successfully, but these errors were encountered:
PR #20 downgraded this particular error to a warning and ensured that warnings will not fail the CI builds.
Additionally PR #19 improved the cyclomatic complexity a little by bringing it down from 28 to 24. Considering this is a switch-case with a lot of different token cases, I don't think this can be brought down further, other than by rewriting the code to use token lists with isset().
What do you think ? Is this issue addressed sufficiently by the above mentioned changes ?
When I execute
PHP_CodeSniffer
viaphp vendor/bin/phpcs src/ --standard=./vendor/php-parallel-lint/php-code-style/ruleset.xml
, the coding style is as follows:The text was updated successfully, but these errors were encountered: