Skip to content
CAI
Software that uses CAICheck a score

doctrine/inflector

64.0

Adequate · 26 September 2026

2.3k

lines of production code

PHP

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Norwegian Bokmål, Spanish, and Turkish inflection rules

The inflector now supports Norwegian Bokmål, Spanish, and Turkish. Each language includes dedicated rule sets for singularization, pluralization, and irregular word substitutions, enabling accurate word form transformations for these languages.

src/Rules/NorwegianBokmal, src/Rules/Spanish, src/Rules/Turkish · high confidence

Added English pluralization and singularization rules

The English inflection rules for the Doctrine Inflector have been implemented, providing support for converting between singular and plural forms of English words. This includes handling irregular plurals (such as 'die' to 'dice' and 'nursery' to 'nurseries'), transformation rules for standard endings, and a list of uninflected words. This change enables the library to correctly process English text for singularization and pluralization tasks.

src/Rules/English · high confidence

Added French language inflection rules

The library now supports French language inflection, enabling correct singularization and pluralization of French words. This includes handling specific irregular forms (such as monsieur/messieurs) and uninflected words (such as bois and mas) that should not be altered by the inflector.

src/Rules/French · high confidence

Added Portuguese language support to the inflector

The inflector now supports Portuguese, enabling correct singular and plural forms for the language. This includes rules for regular inflections, a list of uninflected words (e.g., 'ônibus', 'lápis'), and irregular word substitutions (e.g., 'cão' → 'cães', 'mão' → 'mãos').

src/Rules/Portuguese · high confidence

Introduce multi-language inflection support with caching and extensible rulesets

The library now supports inflection for multiple languages, including Italian and Esperanto, alongside existing support for English, French, Norwegian, Portuguese, Spanish, and Turkish. A new \CachedWordInflector\ wraps inflection calls to improve performance, and the \InflectorFactory\ provides a \createForLanguage\ method to select the target language. The architecture has been refactored to use a \GenericLanguageInflectorFactory\ that allows custom singular and plural rulesets to be added or reset, enabling extensibility for future language additions.

src · high confidence

Introduce new rule-based inflection classes

The src/Rules directory now contains a new set of classes (Pattern, Patterns, Ruleset, Substitution, Substitutions, Transformation, Transformations, and Word) that implement the inflection logic. These classes provide the underlying mechanism for applying transformation and substitution rules to words, enabling the inflector to process text according to defined patterns and irregular forms.

src/Rules · high confidence

Behavioural changes

Removed legacy Debug class and added project infrastructure files

The legacy Debug class in the Common namespace has been removed, eliminating the previous debug dumping functionality that relied on the xdebug extension. Additionally, the repository now includes standard project infrastructure files: .doctrine-project.json for documentation versioning, .gitattributes and .gitignore for repository management, a MIT LICENSE file, a SECURITY.md for vulnerability reporting, and configuration files for PHPStan, PHPUnit, and PHP\_CodeSniffer to standardize the development and testing environment.

(repo-wide) · high confidence

Test coverage

Add French functional tests for pluralization rules; Added comprehensive test coverage for the Inflector component; Added functional tests for English pluralization rules; Added functional tests for Italian inflection rules; Added functional tests for Norwegian Bokmål, Spanish, and Turkish inflection rules; Added unit tests for inflector rule classes.

Dependencies

Updated development dependencies and PHP version requirements

The project's development tooling has been updated to support modern PHP versions and testing frameworks. The minimum supported PHP version is now 7.2 or 8.0. Development dependencies have been upgraded to allow PHPUnit 8.5 through 12.2, PHPStan 1.12 through 2.0, and the Doctrine Coding Standard 12.0 through 14.0.

(dependencies) · high confidence

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

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 49 → 64 (+15.0)
  • Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 98 → 99 (+1.1)
  • Architecture 94 → 100 (+5.9)
  • Maturity 49 → 46 (-2.8)
  • Readiness 32 → 73 (+40.3)
  • Security 65 → 77 (+12.4)

Resolved (15)

  • Coverage not measured — test suite did not build
  • Dimension evaluation failed
  • Duplicated block (10 lines × 14) (src/Rules/English/Uninflected.php)
  • Duplicated block (10 lines × 2) (src/Rules/Portuguese/Uninflected.php)
  • Duplicated block (13 lines × 5) (src/Inflector.php)
  • Duplicated block (16 lines × 6) (src/Rules/Italian/Inflectible.php)
  • Duplicated block (5 lines × 2) (src/Rules/Spanish/Inflectible.php)
  • Duplicated block (6 lines × 7) (src/Rules/Portuguese/Inflectible.php)
  • Duplicated block (6 lines × 8) (src/Rules/English/Inflectible.php)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • No artifact signing
  • No exposed public API
  • No tests found
  • Test reliability not included

New (15)

  • Ambiguous intent of 'inflect' method. The term 'inflect' is used for both specific grammatical transformations (singularize/pluralize) and generic word manipulation. While Inflector exposes singularize and pluralize, the underlying WordInflector interface and its implementations (including RulesetInflector, Transformations, Transformation, Substitutions, and NoopWordInflector) all use a generic inflect method. This forces consumers to know the specific context of the WordInflector to understand if it performs singularization, pluralization, or a no-op, rather than having explicit method names for the specific operation.
  • Documentation: no installation or build instructions (README.md)
  • Duplicated block (14 lines × 8) (src/Rules/English/Rules.php)
  • Duplicated block (15 lines × 3) (src/Rules/NorwegianBokmal/Uninflected.php)
  • Duplicated block (9–13 lines × 2) (src/Rules/Italian/Inflectible.php)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Orphaned files with no living knowledge
  • Workflow token permissions not restricted

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

Survey your own repository

doctrine/inflector 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 26 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 288d99b85cac099b2db56b52a9bf62652ff66f61 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-a15879f6f801.