phauthentic/cognitive-code-analysis
A PHP library for measuring cognitive complexity in source code. It parses PHP and reports complexity scores to help identify hard-to-understand methods, improve maintainability, and integrate code-quality checks into CI and static analysis.
Phauthentic/cognitive-code-analysis-github-action@v1 removes the main reason teams would build bespoke complexity-checking workflows. Adopt the action rather than maintaining shell pipelines.phpcca.yaml filename with auto-discovery and init scaffolding supports a consistent, committed configuration story across projects — a precondition for org-wide rollout.Consider adoption when:
phpcca.yaml and treat threshold configuration as a reviewed engineering standard.Look elsewhere or deprioritize when:
For executives: This is a low-cost, high-leverage quality control. The new GitHub Action gives us one-line CI setup for cognitive complexity checks on pull requests, with no bespoke scripts or vendor lock-in. It produces evidence we can use to prioritize refactoring and reduce long-term maintenance cost.
For engineering leadership: 1.11.1 makes the tool operationally credible: a supported GitHub Action, documented GitHub and GitLab CI recipes, a canonical phpcca.yaml with auto-discovery, and startup output showing which config and cache state are active. Defaults now filter to methods exceeding the threshold, so reports are quieter and more actionable. Migration from 1.11.0 is low-risk — rename the config file, note the new init output, and be aware of the default filtering change — and there are no breaking CLI changes.
For engineering teams: Adopt via bin/phpcca init, commit phpcca.yaml, and wire the GitHub Action with post-comment, emit-annotations, and optional artifact upload. Start advisory, then promote to a blocking threshold once the baseline is understood. Use SARIF where code-scanning dashboards already exist.
How can I help you explore Laravel packages today?