Skip to content
CAI
Software that uses CAICheck a score

sebastianbergmann/complexity

63.5

Adequate · 17 November 2026

877

lines of production code

PHP

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

Behavioural changes

1 commit (0 fixes) modifying build

A change to existing behaviour in build — 1 commit, 1 file: “Create release when tag is pushed”.

build · medium confidence · unverified

1 commit (0 fixes) modifying tools

A change to existing behaviour in tools — 1 commit, 4 files: “Update dependency php-cs-fixer/shim to ^3.95.31”. Also in this area: 3 commits (0 fixes) modifying tools.

tools/.php-cs-fixer · medium confidence · unverified

12 commits (4 fixes) modifying src

A change to existing behaviour in src — 12 commits (4 fixs), 1 file: “Make short-circuiting traversal optional”; “Fix CS/WS issue”; “Remove redundant casts”; and 8 more.

src · medium confidence · unverified

127 commits (0 fixes) modifying tools

A change to existing behaviour in tools — 127 commits, 3 files: “Update tools”; “Use PHPStan instead of Psalm”; “\* Install PHPStan using Composer in order to be able to use phpstan/phpstan-strict-rules and tomasvotruba/type-coverage \* Configure phpstan/phpstan-strict-rules and tomasvotruba/type-coverage \* Update PHPStan configuration \* Put Phive binary under version control and manage it through "ant update-tools"”; and 4 more.

tools · medium confidence · unverified

2 commits (0 fixes) modifying src/Exception

A change to existing behaviour in src/Exception — 2 commits, 2 files: “Extend Throwable”; “Initial work on ComplexityCalculatingVisitor and Calculator”.

src/Exception · medium confidence · unverified

20 commits (4 fixes) modifying src/Complexity

A change to existing behaviour in src/Complexity — 20 commits (4 fixs), 3 files: “Implement ComplexityCollection::cyclomaticComplexityMinimum(), ComplexityCollection::cyclomaticComplexityMaximum(), ComplexityCollection::cyclomaticComplexityAverage(), and ComplexityCollection::cyclomaticComplexityMedian()”; “Implement ComplexityCollection::isFunction() and ComplexityCollection::isMethod()”; “Use PHPStan instead of Psalm”; and 17 more.

src/Complexity · medium confidence · unverified

25 commits (3 fixes) modifying src/Visitor

A change to existing behaviour in src/Visitor — 25 commits (3 fixs), 2 files: “Make short-circuiting traversal optional”; “Remove superfluous code”; “Implement calculation of Cyclomatic Complexity for trait methods”; and 21 more.

src/Visitor · medium confidence · unverified

74 commits (0 fixes) modifying tools/.phpstan

A change to existing behaviour in tools/.phpstan — 74 commits, 343 files: “Update dependency tomasvotruba/type-coverage to ^2.2.2”; “Update dependency phpstan/phpstan to ^2.3.3”; “Update dependency tomasvotruba/type-coverage to ^2.3.0”; and 35 more.

tools/.phpstan · medium confidence · unverified

92 commits (3 fixes) modifying (repo-wide)

A change to existing behaviour in (repo-wide) — 92 commits (3 fixs), 11 files: “Update PHPUnit configuration”; “Update badges”; “Bump copyright year”; and 57 more.

(repo-wide) · low confidence · unverified

Test coverage

20 commits adding/updating tests in tests/integration; 33 commits adding/updating tests in tests/unit; 9 commits adding/updating tests in tests/\_fixture.

Dependencies

149 commits updating dependencies (15 manifests)

A dependency / build maintenance change in (dependencies) — 149 commits (1 fix), 15 files: “Update dependency phpunit/phpunit to ^13.3.3”; “Update dependency tomasvotruba/type-coverage to ^2.2.2”; “Update dependency phpstan/phpstan to ^2.3.3”; and 101 more.

(dependencies) · high confidence · unverified

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 63.5.

Lenses

  • Code Health 100.0
  • Architecture 69.0
  • Maturity 48.9
  • Readiness 79.1
  • Security 85.0

Changes since last survey

  • 300 commits — 291 feature/other, 9 fixes

By area

  • (root) — 95 commits
  • tools/.phpstan — 73 commits
  • .github/workflows — 52 commits
  • .phive/phars.xml — 28 commits
  • (repo) — 25 commits
  • src/Complexity — 7 commits
  • src/Visitor — 7 commits
  • .psalm/baseline.xml — 3 commits
  • .github/FUNDING.yml — 2 commits
  • tests/unit — 2 commits
  • tools/.php-cs-fixer — 2 commits
  • .github/CODE_OF_CONDUCT.md — 1 commit
  • .github/CONTRIBUTING.md — 1 commit
  • src/Calculator.php — 1 commit
  • tools/composer — 1 commit

Notable commits

  • fix: Fix CS/WS issue
  • fix: Fix CS/WS issues
  • fix: Fix copy/paste mistake
  • fix: Fix issues identified by PHPStan
  • fix: Fix package name
  • fix: Revert "Do not use Composer-installed PHPUnit"
  • fix: Revert "Handle edge cases"
  • fix: Revert "Implement ComplexityCollection::cyclomaticComplexityMinimum(), ComplexityCollection::cyclomaticComplexityMaximum(), ComplexityCollection::cyclomaticComplexityAverage(), and ComplexityCollection::cyclomaticComplexityMedian()"
  • fix: fix(node-visitor): Ensure that missing statements do not crash in visitor
  • change: * Install PHPStan using Composer in order to be able to use phpstan/phpstan-strict-rules and tomasvotruba/type-coverage * Configure phpstan/phpstan-strict-rules and tomasvotruba/type-coverage * Update PHPStan configuration * Put Phive binary under version control and manage it through "ant update-tools"
  • change: Add Liberapay and Tidelift
  • change: Add documentation on how to contribute
  • change: Add thanks.dev
  • change: Allow nikic/php-parser ^5.0
  • change: Allow write operations
  • change: Also automerge minor updates
  • change: Bump
  • change: Bump
  • change: Bump copyright year
  • change: Bump copyright year
  • …and 280 more

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

sebastianbergmann/complexity was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 17 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit f48385755b0808f41fe5f6fd309a86763cb71f76 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.85+preprod-eba6548ac50f.