Skip to content
CAI
Software that uses CAICheck a score

AliReaza/event-driven

50.7

Adequate · 10 November 2026

89

lines of production code

PHP

primary language

9

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an event-driven listener framework that manages event subscriptions and unsubscriptions with configurable timeouts. It provides a provider interface for managing listeners and includes a test suite to verify its behavior. The project is maintained as a Composer package, relying on standard PHP testing tools and UUID generation.

Behavioural changes

Refined event-driven listener interface and provider signatures

The EventDrivenListenerInterface and ListenerProvider now accept an optional $timeout\_ms parameter in the subscribe() method, allowing callers to specify a timeout for event subscription. Additionally, the unsubscribe() method's $unsubscribe parameter is now explicitly typed as boolean, and the ListenerProvider's constructor property is changed from private to public, affecting how the internal provider instance is accessed.

src · high confidence

Test coverage

Added missing newlines to test files

Added missing newlines at the end of the EventDispatcherTest and ListenerProviderTest files, ensuring proper file formatting in the test suite.

tests · high confidence

Dependencies

Update composer.json dependencies and metadata

The composer.json manifest has been updated to version 1.2.0, with the alireaza/uuid dependency upgraded to 1.2.0 and phpunit/phpunit bumped to ^9.5.16. The package metadata was also corrected, including the author's homepage URL and the addition of a LinkedIn funding link.

(dependencies) · medium confidence

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

Score

  • CAI 51 → 51 (+0.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 71 → 71 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 49 → 49 (+0.0)
  • Readiness 38 → 38 (+0.0)
  • Security 100 → 100 (+0.0)

Resolved (3)

  • Documentation: no contributor guidance (README.md)
  • Inconsistent parameter semantics for 'unsubscribe'. The parameter name 'unsubscribe' with type 'bool' is confusing. Does passing 'true' mean 'perform the unsubscribe action' or 'is the state now unsubscribed'? Furthermore, 'unsubscribe' is the inverse of 'subscribe', but if 'subscribe' means 'start listening', 'unsubscribe' means 'stop listening'. However, ListenerProvider also has 'addListener' and 'clearListeners'. The presence of 'unsubscribe' on both suggests a lifecycle operation, but the boolean parameter is redundant and confusing (usually a method call implies the action).
  • Semantic ambiguity of 'subscribe' across different domains. In EventDrivenListenerInterface, 'subscribe' likely implies starting a long-running listener loop or connection (given the timeout parameter). In ListenerProvider, 'subscribe' is ambiguous: it could mean registering a new listener (which is already done via addListener) or starting the provider's internal subscription mechanism. The naming collision suggests these are different operations (lifecycle management vs. registration) sharing the same verb.

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

Survey your own repository

AliReaza/event-driven 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 10 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 5250eb6d15bafc2cf12e7fe1e60ab8deece41d2c — the exact code this score is about.
  • Scored under rubric-2026.11.2 — 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.4+preprod-464a0040a931.