Open source projects I maintain or contribute to. Source code and releases are on GitHub.

Code Analysis

Cognitive Code Analysis (PHP)

A cognitive code complexity analysis tool for PHP (phpcca). It measures how hard code is for a human to understand — complementary to cyclomatic complexity, which focuses on testability. Supports churn analysis, configurable thresholds, and multiple report formats.

Cognitive Code Analysis (C#)

C# port of the cognitive complexity analyser. Scans *.cs files and reports per-method cognitive metrics, with optional Halstead and cyclomatic complexity, Cobertura coverage, and output as console text, HTML, SARIF, or GitHub/GitLab annotations.

Cognitive Code Analysis (Java)

Java port of the cognitive complexity analyser. Measures how hard code is for a human to understand, with configurable thresholds and documentation on interpreting results.

Cognitive Code Analysis GitHub Action

Composite GitHub Action that runs Cognitive Code Analysis in pull-request workflows. Install via PHAR or Composer, analyse changed PHP files, and optionally publish Markdown PR comments, workflow annotations, artifacts, and SARIF uploads.

Git Churn Calculator

A cross-platform CLI tool that calculates a Churn Risk Score for every file in a git repository by combining change frequency, author spread, and optional Cobertura test coverage data. Output as CSV, JSON, HTML, or D3 time-series charts.

PHPStan Rules

Additional PHPStan rules focused on clean code and architecture conventions — method signatures, return types, dependency constraints, modular boundaries, and related checks. Rules can be extended at project level for domain-specific policies.

DDD Tools

DDD Context Mapper

A browser-based diagram editor for Domain-Driven Design context maps. Draw bounded contexts, connect them with directed relationships and DDD-style labels, then export and import the diagram as JSON — no build step or server required.

Libraries

Event Sourcing

A framework-agnostic event sourcing library for PHP. Provides the basic building blocks with minimal third-party dependencies; aggregates can stay free of library coupling via reflection-based extraction.