Public report of Intervention/image, published 13 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 13 November 2026, 21:21 UTC · Survey ID cd_06e421a3873b4957baecc6bb2959e273

Intervention/image

Measured 13 November 2026, 21:20 UTC, at code version 3a47838

Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.

CAI score 62out of 100 Adequate
CriticalWeakAdequateStrongExemplary
Up 1 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A medium codebase: 25,838 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 0.4 person-years · Weakest lens: Maturity, 54

Findings by how serious they are

9 critical 118 serious 10 minor

22 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
13 November 2026, 21:20 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

32of 32 dimensions measured by tools.
132of 137 findings point to an exact file and line, so you can open each one in the code. The other 5 concern the repository as a whole, such as missing documentation.
32dimensions across 5 lenses, read from 25,838 lines of product code in 1 project.
Chapters

Executive summary

Intervention/image falls short of our standard for production because we found no recorded design decisions and no architecture document or diagram. It scores 62 out of 100 and is rated Adequate, and eight of its nine critical findings are security problems in the build pipeline and in its servers and containers.

Maturity, at 54, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 7 points. Raising the type checker to a stricter level comes next, worth about 4 points. Raising Maturity to 70 would lift the score to about 67.

Five pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Two settings leave the servers or containers unsafe, and one pipeline step runs a download nobody checks. Pinning each tool to an exact version, correcting the unsafe settings and checking the download against a checksum would close these risks. The set of files in separate parts that keep changing together needs that dependency made explicit.

The product code is 25,838 lines, about €55,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Maturity 54 · counts for 47%Code Health 61 · counts for 26%Production Readiness 62 · counts for 14%Security and Compliance 94 · counts for 8%Architecture 97 · counts for 4%

If Maturity rose from 54 to 70, the lowest score rated Strong, the score would rise from 62 to about 67.

Code composition: what the lines of code are
Product code 53%Tests 47%
New since the last survey: 40 findings

These 40 critical or serious findings weren't in the previous survey, on 24 October 2026.

  • Code Duplication · Edited copy of a member (33 corresponding lines) src/Alignment.php
  • Code Duplication · Edited copy of a member (30 corresponding lines) src/Colors/Rgb/Colorspace.php
  • Code Duplication · Edited copy of a member (37 corresponding lines) src/FileExtension.php
  • Code Duplication · Edited copy of a member (20 corresponding lines) src/Geometry/Tools/Resizer.php
  • Code Duplication · Edited copy of a member (25 corresponding lines) src/Drivers/Imagick/Modifiers/ContainModifier.php
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/Drivers/Gd/Modifiers/DrawBezierModifier.php
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/Geometry/Polygon.php
  • Code Duplication · Edited copy of a member (23 corresponding lines) src/Drivers/Imagick/Modifiers/DrawEllipseModifier.php
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/Drivers/Gd/Modifiers/DrawPolygonModifier.php
  • Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) src/Drivers/Imagick/Encoders/BmpEncoder.php
  • Code Duplication · Edited copies of one member (6 members, 16+ corresponding lines) src/Colors/Cmyk/Color.php
  • Code Duplication · Edited copy of a member (13 corresponding lines) src/Geometry/Tools/Resizer.php
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/Drivers/AbstractDriver.php
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/Drivers/Imagick/Modifiers/BrightnessModifier.php
  • Code Duplication · Edited copy of a member (18 corresponding lines) src/Drivers/Gd/Modifiers/CoverModifier.php
  • Code Duplication · Edited copies of one member (7 members, 14+ corresponding lines) src/Colors/Cmyk/Colorspace.php
  • Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) src/Drivers/Imagick/Modifiers/ContrastModifier.php
  • Code Duplication · Edited copy of a member (13 corresponding lines) src/Drivers/Gd/Modifiers/ContainModifier.php
  • Code Duplication · Edited copy of a member (13 corresponding lines) src/Geometry/Tools/Resizer.php
  • Code Duplication · Edited copies of one member (5 members, 12+ corresponding lines) src/Colors/Cmyk/Colorspace.php
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/Drivers/Imagick/Modifiers/TextModifier.php
  • Code Duplication · Edited copy of a member (13 corresponding lines) src/Drivers/Gd/Modifiers/FillModifier.php
  • Code Duplication · Edited copy of a member (20 corresponding lines) src/Traits/CanDetectImageSources.php
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/Drivers/Gd/Modifiers/DrawRectangleModifier.php
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/Drivers/Gd/Modifiers/DrawEllipseModifier.php
  • Code Duplication · Edited copy of a member (9 corresponding lines) src/Drivers/Imagick/Modifiers/DrawLineModifier.php
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/Drivers/Gd/Modifiers/BrightnessModifier.php
  • Code Duplication · Edited copy of a member (4 corresponding lines) src/Geometry/Rectangle.php
  • Code Duplication · Edited copy of a member (9 corresponding lines) src/Geometry/Ellipse.php
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/Drivers/Gd/Modifiers/GrayscaleModifier.php
  • Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) src/Geometry/Rectangle.php
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/Drivers/Gd/Modifiers/ContrastModifier.php
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/Colors/FloatColorChannel.php
  • Code Duplication · Edited copy of a member (5 corresponding lines) src/Geometry/Factories/EllipseFactory.php
  • Churn × Complexity Hotspots · Hotspot: src/Drivers/Imagick/Modifiers/OrientModifier.php src/Drivers/Imagick/Modifiers/OrientModifier.php
  • Change Coupling · Change coupling clique: DrawEllipseModifier.php, DrawLineModifier.php, DrawPixelModifier.php, DrawPolygonModifier.php, DrawRectangleModifier.php src/Drivers/Imagick/Modifiers/DrawEllipseModifier.php
  • Change Coupling · Change coupling clique: DrawEllipseModifier.php, DrawLineModifier.php, DrawPolygonModifier.php, DrawRectangleModifier.php src/Drivers/Gd/Modifiers/DrawEllipseModifier.php
  • Change Coupling · Change coupling: ContainModifier.php ↔ ReduceColorsModifier.php src/Drivers/Gd/Modifiers/ContainModifier.php
  • Change Coupling · Change coupling: ContainModifier.php ↔ CropModifier.php src/Drivers/Gd/Modifiers/ContainModifier.php
  • Change Coupling · Change coupling: CoverModifier.php ↔ ResizeModifier.php src/Drivers/Gd/Modifiers/CoverModifier.php

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 16 findings

These 16 critical or serious findings were in the previous survey, on 24 October 2026, and are gone from this one.

  • Code Duplication · Duplicated block (16 lines × 2) src/Colors/Oklab/Decoders/StringColorDecoder.php
  • Code Duplication · Duplicated block (11 lines × 2) src/Resolution.php
  • Change Coupling · Boundary-crossing change coupling: Color.php ↔ ColorInterface.php src/Colors/Cmyk/Color.php
  • Change Coupling · Boundary-crossing change coupling: Color.php ↔ ColorInterface.php src/Colors/Oklch/Color.php
  • Change Coupling · Boundary-crossing change coupling: ImageInterface.php ↔ FillTransparentAreasModifier.php src/Interfaces/ImageInterface.php
  • Change Coupling · Change-coupling hub: DrawEllipseModifier.php → DrawLineModifier.php, DrawRectangleModifier.php, DrawLineModifier.php, DrawPixelModifier.php, DrawPolygonModifier.php, DrawRectangleModifier.php, RotateModifier.php src/Drivers/Imagick/Modifiers/DrawEllipseModifier.php
  • Change Coupling · Change-coupling hub: DrawEllipseModifier.php → DrawLineModifier.php, DrawPolygonModifier.php, DrawRectangleModifier.php, DrawLineModifier.php src/Drivers/Gd/Modifiers/DrawEllipseModifier.php
  • Change Coupling · Change-coupling hub: DrawRectangleModifier.php → DrawEllipseModifier.php, DrawLineModifier.php, DrawLineModifier.php, DrawPixelModifier.php, DrawPolygonModifier.php, RotateModifier.php src/Drivers/Imagick/Modifiers/DrawRectangleModifier.php
  • Change Coupling · Change-coupling hub: DrawLineModifier.php → DrawPixelModifier.php, DrawPolygonModifier.php, RotateModifier.php src/Drivers/Imagick/Modifiers/DrawLineModifier.php
  • Change Coupling · Change coupling: DrawPolygonModifier.php ↔ DrawRectangleModifier.php src/Drivers/Gd/Modifiers/DrawPolygonModifier.php
  • Change Coupling · Change coupling: DrawPixelModifier.php ↔ DrawPolygonModifier.php src/Drivers/Imagick/Modifiers/DrawPixelModifier.php
  • Change Coupling · Change-coupling hub: ContainModifier.php → CropModifier.php, FillTransparentAreasModifier.php, ReduceColorsModifier.php src/Drivers/Gd/Modifiers/ContainModifier.php
  • Change Coupling · Change-coupling hub: DrawLineModifier.php → DrawPixelModifier.php, DrawPolygonModifier.php, DrawRectangleModifier.php src/Drivers/Gd/Modifiers/DrawLineModifier.php
  • Change Coupling · Change coupling: CoverModifier.php ↔ ResizeModifier.php src/Drivers/Gd/Modifiers/CoverModifier.php
  • Change Coupling · Change coupling: DrawPolygonModifier.php ↔ RotateModifier.php src/Drivers/Imagick/Modifiers/DrawPolygonModifier.php
  • Change Coupling · Change coupling: CoverModifier.php ↔ ResizeModifier.php src/Drivers/Gd/Modifiers/CoverModifier.php
Rebuild cost: about €55,000 · Estimate
Cost to rebuild€18,000 to €91,000, for 303 to 962 hours of work, about 0.4 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.9 at a score of 62. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 25,838 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Record your significant design decisions.
Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Raises the score by about 7 points · Medium effort · Architecture documentation
2
Raise PHPStan to level 8 (`level: 8` in `phpstan.neon.dist`, or `max`) or Psalm to `errorLevel="3"` or stricter, so `?Type` is a type the checker holds you to; generate a baseline for what that surfaces only to pay it down, not to keep it.
Then resolve the baselined nullness errors rather than adding to them: each is a call on a value the checker showed could be null — narrow it (`if ($x === null) { … }`, `?->`, an early return), make the property non-nullable and initialise it in the constructor, or change the return type so the null cannot arrive.
Raises the score by about 4 points · Medium effort · Nullable reference types
3
Explain in the README how to run the tests.
Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Raises the score by about 4 points · Medium effort · Documentation (README)

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €55,000 to build again, about 0.4 person-years of work. Its weakest lens is Maturity, at 54 (Adequate). Maturity is about how well the project explains and looks after itself, which decides whether a new developer, or a new supplier, can take over. Because the weakest lens counts most in the score, work on Maturity also moves the score most.
Based on: the rebuild estimate · the Maturity grade · how much each lens counts
What to do: Start with the Maturity actions in Top priorities.
If you do one thing first · First action
Record your significant design decisions. Of all the actions in this report, it raises the score most for the work it takes: about 7 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

46 modules, with 111 dependencies between them. One loop runs through 11 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 6 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 Typography2 Interfaces3 Colors4 Colors.Themes5 Geometry.Tools6 Colors.Cmyk.Channels7 Colors.Hsl.Channels8 Colors.Hsv9 Colors.Hsv.Channels10 Colors.Oklab.Channels11 Colors.Oklch12 Geometry13 Colors.Hsl14 Colors.Oklab15 Geometry.Factories16 Colors.Rgb17 Colors.Themes.VibrantMuted18 Colors.Cmyk19 Intervention.Image20 Drivers21 Analyzers22 Colors.Cmyk.Decoders23 Colors.Hsl.Decoders24 Colors.Hsv.Decoders25 Colors.Oklab.Decoders26 Colors.Oklch.Decoders27 Colors.Rgb.Decoders28 Decoders29 Drivers.Gd30 Drivers.Gd.Decoders31 Drivers.Imagick32 Drivers.Imagick.Decoders33 Encoders34 Modifiers35 Drivers.Gd.Analyzers36 Drivers.Gd.Encoders37 Drivers.Gd.Modifiers38 Drivers.Imagick.Analyzers39 Drivers.Imagick.Encoders40 Drivers.Imagick.Modifiers
1 Typography32
2 Interfaces16
3 Colors131
4 Colors.Themes2
5 Geometry.Tools1
6 Colors.Cmyk.Channels2
7 Colors.Hsl.Channels4
8 Colors.Hsv321
9 Colors.Hsv.Channels4
10 Colors.Oklab.Channels3
11 Colors.Oklch3211
12 Geometry211
13 Colors.Hsl3211
14 Colors.Oklab3211
15 Geometry.Factories612
16 Colors.Rgb6211111
17 Colors.Themes.VibrantMuted611
18 Colors.Cmyk321
19 Intervention.Image3911111111
20 Drivers2252
21 Analyzers97
22 Colors.Cmyk.Decoders21
23 Colors.Hsl.Decoders21
24 Colors.Hsv.Decoders21
25 Colors.Oklab.Decoders21
26 Colors.Oklch.Decoders21
27 Colors.Rgb.Decoders612
28 Decoders112
29 Drivers.Gd17113
30 Drivers.Gd.Decoders1621
31 Drivers.Imagick163
32 Drivers.Imagick.Decoders111
33 Encoders12113
34 Modifiers385131
35 Drivers.Gd.Analyzers155
36 Drivers.Gd.Encoders186
37 Drivers.Gd.Modifiers194335
38 Drivers.Imagick.Analyzers166
39 Drivers.Imagick.Encoders3311
40 Drivers.Imagick.Modifiers192135
Uses a module listed above itPart of a loopThe module itself
1 Typography2 Interfaces3 Colors4 Colors.Themes5 Geometry.Tools6 Colors.Cmyk.Channels7 Colors.Hsl.Channels8 Colors.Hsv9 Colors.Hsv.Channels10 Colors.Oklab.Channels11 Colors.Oklch12 Geometry13 Colors.Hsl14 Colors.Oklab15 Geometry.Factories16 Colors.Rgb17 Colors.Themes.VibrantMuted18 Colors.Cmyk19 Intervention.Image20 Drivers21 Analyzers22 Colors.Cmyk.Decoders23 Colors.Hsl.Decoders24 Colors.Hsv.Decoders25 Colors.Oklab.Decoders26 Colors.Oklch.Decoders27 Colors.Rgb.Decoders28 Decoders29 Drivers.Gd30 Drivers.Gd.Decoders31 Drivers.Imagick32 Drivers.Imagick.Decoders33 Encoders34 Modifiers35 Drivers.Gd.Analyzers36 Drivers.Gd.Encoders37 Drivers.Gd.Modifiers38 Drivers.Imagick.Analyzers39 Drivers.Imagick.Encoders40 Drivers.Imagick.ModifiersTypography1Interfaces2Colors3Colors.Themes4Geometry.Tools5Colors.Cmyk.Channels6Colors.Hsl.Channels7Colors.Hsv8Colors.Hsv.Channels9Colors.Oklab.Channels10Colors.Oklch11Geometry12Colors.Hsl13Colors.Oklab14Geometry.Factories15Colors.Rgb16Colors.Themes.VibrantMuted17Colors.Cmyk18Intervention.Image19Drivers20Analyzers21Colors.Cmyk.Decoders22Colors.Hsl.Decoders23Colors.Hsv.Decoders24Colors.Oklab.Decoders25Colors.Oklch.Decoders26Colors.Rgb.Decoders27Decoders28Drivers.Gd29Drivers.Gd.Decoders30Drivers.Imagick31Drivers.Imagick.Decoders32Encoders33Modifiers34Drivers.Gd.Analyzers35Drivers.Gd.Encoders36Drivers.Gd.Modifiers37Drivers.Imagick.Analyzers38Drivers.Imagick.Encoders39Drivers.Imagick.Modifiers403216131212432143321121132113211612621111161132139111111112252972121212121612112171131621163111121133851311551861943351663311192135+6 more modules (most-connected shown)

At a glance — Code Health · 61% · Adequate · gated by X5 ·

At a glance — Architecture · 97% · Exemplary ·

At a glance — Maturity · 54% · Adequate · gated by M2 ·

At a glance — Readiness · 62% · Adequate ·

At a glance — Security · 94% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A05:2025 — Injection6High / Critical
A02:2025 — Security Misconfiguration5High / Critical

Roadmap

Top priorities: Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them; Raise PHPStan to level 8 (`level: 8` in `phpstan.neon.dist`, or `max`) or Psalm to `errorLevel="3"` or stricter, so `?Type` is a type the checker holds you to; generate a baseline for what that surfaces only to pay it down, not to keep it. Then resolve the baselined nullness errors rather than adding to them: each is a call on a value the checker showed could be null — narrow it (`if ($x === null) { … }`, `?->`, an early return), make the property non-nullable and initialise it in the constructor, or change the return type so the null cannot arrive; Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+7.2 ptsMediumArchitecture documentation
Raise PHPStan to level 8 (`level: 8` in `phpstan.neon.dist`, or `max`) or Psalm to `errorLevel="3"` or stricter, so `?Type` is a type the checker holds you to; generate a baseline for what that surfaces only to pay it down, not to keep it. Then resolve the baselined nullness errors rather than adding to them: each is a call on a value the checker showed could be null — narrow it (`if ($x === null) { … }`, `?->`, an early return), make the property non-nullable and initialise it in the constructor, or change the return type so the null cannot arrive.+3.8 ptsMediumNullable reference types
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.+3.7 ptsMediumDocumentation (README)
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.+1.2 ptsMediumDeployment & Rollback
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+1.2 ptsMediumRelease Hygiene
Swallowed exception (caught, then discarded)+0.9 ptsMediumException handling
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED.+0.3 ptsLowStatic Analysis (SAST)
Resolve the 2 High IaC finding(s) in IaC & Container Security — start with REDACTED (2).+0.3 ptsLowIaC & Container Security

File quality

Per-file score 0–10 — a quality signature. Of 71 files carrying findings, judged against the Production bar: 1% slop · 30% mixed · 69% near-clean.

FileScoreBandWorst signal
REDACTED2.1SlopIaC & Container Security: High IaC: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
src/Drivers/Gd/Modifiers/ContainModifier.php5.5MixedCode Duplication: Edited copy of a member (13 corresponding lines)
src/Drivers/Imagick/Modifiers/DrawEllipseModifier.php7.0MixedCode Duplication: Edited copy of a member (23 corresponding lines)
src/Drivers/Gd/Modifiers/CoverModifier.php7.0MixedCode Duplication: Edited copy of a member (18 corresponding lines)
src/Drivers/Gd/Modifiers/DrawEllipseModifier.php7.0MixedCode Duplication: Edited copy of a member (8 corresponding lines)
src/Geometry/Rectangle.php7.0MixedCode Duplication: Edited copy of a member (4 corresponding lines)
src/Geometry/Ellipse.php7.0MixedCode Duplication: Edited copy of a member (9 corresponding lines)
src/Drivers/Imagick/Encoders/AvifEncoder.php7.1MixedCode Duplication: Members sharing a duplicated core (7 members, 50+ identical tokens)
src/Colors/Cmyk/Colorspace.php7.1MixedCode Duplication: Members sharing a duplicated core (6 members, 50+ identical tokens)
src/Colors/Cmyk/Color.php7.4MixedCode Duplication: Members sharing a duplicated core (6 members, 50+ identical tokens)
src/Geometry/Tools/Resizer.php7.4MixedCode Duplication: Edited copy of a member (20 corresponding lines)
src/Colors/Hsl/Decoders/StringColorDecoder.php7.4MixedCode Duplication: Duplicated block (17 lines × 2)
src/Colors/Themes/VibrantMuted/Definition.php7.8MixedCyclomatic Complexity: Definition.isColorInCategory (cyclomatic 22)
src/Geometry/Polygon.php7.8MixedGod Classes: TooManyMethods: Polygon
src/Drivers/Imagick/Modifiers/DrawBezierModifier.php7.8MixedCode Duplication: Members sharing a duplicated core (4 members, 50+ identical tokens)
src/Drivers/Imagick/Modifiers/ContainModifier.php7.8MixedCode Duplication: Edited copy of a member (25 corresponding lines)
src/Drivers/Gd/Modifiers/DrawBezierModifier.php7.8MixedCode Duplication: Edited copy of a member (17 corresponding lines)
src/Drivers/Imagick/Encoders/BmpEncoder.php7.8MixedCode Duplication: Edited copies of one member (3 members, 17+ corresponding lines)
src/Drivers/Imagick/Encoders/HeicEncoder.php7.8MixedCode Duplication: Duplicated block (15 lines × 2)

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 9

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 118

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 10

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 22

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 32 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.7, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 32 dimensions across the health lenses
D1D2D3D4D6D10D13D15D17D19D27D28D29D31D34D35D44AX10AX3AX4M1M2M3P1P3P4P6X16X21X28X3X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 132 of 137 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1d6c8-c7e0-7774-a9c7-de6a4ba20611.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.php) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.php) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 1 direct Composer requirement(s) were read, but the outdated signal needs Packagist, and no committed composer.lock resolves them to releases, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D14 License Compliance — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — this repository declares a composer.json but commits no composer.lock this pass can read, so the set of packages it installs is not on disk: its composer.json states version CONSTRAINTS, and Composer's guidance is that a library leaves the lock uncommitted. Producing the graph needs Composer's solver, which this pass does not run, and grading whichever release happens to be newest today would be a verdict about a dependency graph nobody resolved. NOT a finding that this repository's licences are compliant: this dimension asserts nothing about its licensing in either direction.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (151 contributor(s) across 2480 commit(s) sampled, automation and bot accounts excluded). One of them holds 87% of the history; the other 150 hold 0.1% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: it declares a published package (composer.json), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (25838 LoC, 403 module-visible types across 46 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `src/Analyzers/DominantPaletteAnalyzer.php`, `src/AnimationFactory.php`, `src/Colors/Hsl/Decoders/StringColorDecoder.php`, `src/Colors/Hsv/Decoders/StringColorDecoder.php`, `src/Colors/Rgb/Decoders/HexColorDecoder.php`, … (+9 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (docker-compose.yml). compose up failed (exit 17 — an image could not be built) — \"https://download.imagemagick.org/archive/releases/ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz\" && cd /tmp && tar xf ImageMagick.tar.xz && cd \"ImageMagick-${IMAGEMAGICK_VERSION}\" && ./configure && make -j$(nproc) && make install && ldconfig && cd / && rm -rf /tmp/ImageMagick*" did not complete successfully: exit code: 56; runtime evidence skipped.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's PHP is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's PHP is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's PHP is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript (Vue and Svelte components included), Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity9.4 / 10Stronggated by 2 serious findings✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Prevented

2 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Definition.isColorInCategory at 22. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being NamedColor.toHex at 141 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: src/Colors/Rgb/NamedColor.php (NamedColor.toHex at 141). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

Definition.isColorInCategory (cyclomatic 22)src/Colors/Themes/VibrantMuted/Definition.php:153
OrientModifier.apply (cyclomatic 16)src/Drivers/Imagick/Modifiers/OrientModifier.php:19

What to do

  1. Bring the 2 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with Definition.isColorInCategory (cyclomatic 22), OrientModifier.apply (cyclomatic 16). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 9.4 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity9.8 / 10Stronggated by 2 serious findings✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Prevented

2 method(s) exceeded the cognitive complexity threshold of 15; the worst was Definition.isColorInCategory at 16.

Definition.isColorInCategory (cognitive 16)src/Colors/Themes/VibrantMuted/Definition.php:153
NativeObjectDecoder.decode (cognitive 16)src/Drivers/Imagick/Decoders/NativeObjectDecoder.php:52

What to do

  1. Bring the 2 bodies over 15 down to 15 or less in Cognitive Complexity — start with Definition.isColorInCategory (cognitive 16), NativeObjectDecoder.decode (cognitive 16). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cognitive Complexity from 9.8 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes9.3 / 10Stronggated by 4 serious findings✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Prevented

4 god class(es) detected.

TooManyMethods: Image · ×3src/Image.php:105
MethodTooLong: NamedColor.toHexsrc/Colors/Rgb/NamedColor.php:207

What to do

  1. Resolve the 3 TooManyMethods finding(s) in God Classes — start with Image.php, Size.php, Polygon.php. — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 1 MethodTooLong finding(s) in God Classes — start with NamedColor.php. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication6.5 / 10Adequate✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

Maturity: Documented → Verified → Prevented · effective 6.5 / 10 · rule-coverage 100% · ceiling Verified

53 duplicated block group(s) detected. 8.8 % of the production lines (2,267 of 25,838) are in a reported copy. A further 38 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (8 lines × 2) · ×8src/Geometry/Rectangle.php:304
Duplicated block (10 lines × 2) · ×7src/Colors/Hsl/Colorspace.php:131
Edited copy of a member (13 corresponding lines) · ×4src/Geometry/Tools/Resizer.php:279
Edited copy of a member (17 corresponding lines) · ×3src/Drivers/Gd/Modifiers/DrawBezierModifier.php:139
Edited copy of a member (10 corresponding lines) · ×3src/Drivers/Gd/Modifiers/DrawRectangleModifier.php:53

+ 51 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 8 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with Rectangle.php (8). — One of this dimension's main actionable groups (8 warning-level).
  2. Resolve the 7 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with Colorspace.php (3), AvifEncoder.php, Jpeg2000Encoder.php. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 4 Edited copy of a member (13 corresponding lines) finding(s) in Code Duplication — start with Resizer.php (2), ContainModifier.php, FillModifier.php. — One of this dimension's main actionable groups (4 warning-level).

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)9.0 / 10Stronggated by 3 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Verified

3 of 36 classes have LCOM4 above 3.

Low cohesion: Font (LCOM4 10) · ×3src/Typography/Font.php:19

What to do

  1. Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with Font.php, Core.php, Ellipse.php. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 11 tests.

✓ On the Gold path — maintain.

Detailed fixes: d10_recommendation.md.

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D15 · Churn × Complexity Hotspots10.0 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: src/Drivers/Imagick/Modifiers/OrientModifier.php (2×16=32)

Hotspot: src/Drivers/Imagick/Modifiers/OrientModifier.phpsrc/Drivers/Imagick/Modifiers/OrientModifier.php:19

What to do

  1. Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots — start with OrientModifier.php. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

0 deducted task-comment markers across 25838 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 documentation facets pass in full. 2 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D27 · Navigability9.4 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Documented

32 % of calls cross a namespace and 12 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)8.4 / 10Adequategated by 6 critical findings✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 8.4 / 10 · rule-coverage 100% · ceiling Documented

6 finding(s): 0 critical, 6 high, 0 medium, 0 low. 5 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 14 file(s) — `src/Analyzers/DominantPaletteAnalyzer.php` (line 25, line 30, line 35, …), `src/AnimationFactory.php` (line 107), `src/Colors/Hsl/Decoders/StringColorDecoder.php` (line 18), `src/Colors/Hsv/Decoders/StringColorDecoder.php` (line 18), `src/Colors/Rgb/Decoders/HexColorDecoder.php` (line 19), … (+9 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. No action in Static Analysis (SAST) — all 5 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (5 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security9.0 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Documented

5 finding(s): 0 critical, 2 high, 3 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 2 High IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 3 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 104 of the 403 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling9.4 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: DrawEllipseModifier.php↔DrawRectangleModifier.php 87%; DrawEllipseModifier.php↔DrawRectangleModifier.php 77%; DrawEllipseModifier.php↔DrawLineModifier.php 69%

Boundary-crossing change coupling: Color.php ↔ ColorInterface.phpsrc/Colors/Rgb/Color.php:1
Change coupling: FileExtensionEncoder.php ↔ MediaTypeEncoder.php · ×6src/Encoders/FileExtensionEncoder.php:1
Change coupling clique: DrawEllipseModifier.php, DrawLineModifier.php, DrawPixelModifier.php, DrawPolygonModifier.php, DrawRectangleModifier.php · ×2src/Drivers/Imagick/Modifiers/DrawEllipseModifier.php

What to do

  1. Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with Color.php. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 6 Change coupling finding(s) in Change Coupling — start with ContainModifier.php (3), FileExtensionEncoder.php, BinaryImageDecoder.php. — One of this dimension's main actionable groups (6 warning-level).
  3. Resolve the 2 Change coupling clique finding(s) in Change Coupling — start with DrawEllipseModifier.php (2). — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 1 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

M1 · Documentation (README)6.7 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
  • No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P3 · Security & performance tooling4.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X3 · Exception handling7.6 / 10Strong✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×3) — src/EncodedImage.php:85, src/Image.php:1255, src/Drivers/Gd/Analyzers/ResolutionAnalyzer.php:48
  • `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — src/Drivers/AbstractDecoder.php:61

What to do

  • Swallowed exception (caught, then discarded)
X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether PHP's static analysis checks null and is not undermined by a nullness baseline — PHPStan from level 8 (`checkNullables`) or Psalm at `errorLevel` 3 or stricter is what makes `?User` a type whose method call is an error, and the null entries of a baseline, `@psalm-suppress PossiblyNull…` and `@phpstan-ignore *.nonObject` are what silence it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • 0/1 of this repository's PHPStan/Psalm configuration(s) run at a level that checks null — PHPStan level 8 or above (`max` included), or Psalm `errorLevel` 3 or below (Psalm's default, with none stated, is 1). A PHPStan level written neither in the file nor in an include inside the repository is 0, PHPStan's own default. Below those levels the checker removes `null` from a union before any rule looks, so `$order->customer()->name()` on a `?Customer` passes, and the first null reaching it is an `Error: Call to a member function name() on null` in production.

What to do

  • Raise PHPStan to level 8 (`level: 8` in `phpstan.neon.dist`, or `max`) or Psalm to `errorLevel="3"` or stricter, so `?Type` is a type the checker holds you to; generate a baseline for what that surfaces only to pay it down, not to keep it. Then resolve the baselined nullness errors rather than adding to them: each is a call on a value the checker showed could be null — narrow it (`if ($x === null) { … }`, `?->`, an early return), make the property non-nullable and initialise it in the constructor, or change the return type so the null cannot arrive.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health61%Adequate — gated by X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture97%ExemplaryStrongest area.
Maturity54%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness62%AdequateAcceptable, with room to improve.
Security94%ExemplarySolid.
Unscored — 1 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 82 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: this repository's PHP imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — Not applicable: PHP builds its object graph per request and shares none of it between requests.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — compose up failed (exit 17 — an image could not be built) — \"https://download.imagemagick.org/archive/releases/ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz\" && cd /tmp && tar xf ImageMagick.tar.xz && cd \"ImageMagick-${IMAGEMAGICK_VERSION}\" && ./configure && make -j$(nproc) && make install && ldconfig && cd / && rm -rf /tmp/ImageMagick*" did not complete successfully: exit code: 56; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Laravel migration, an Eloquent $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository registers no route (no Laravel Route::…, no Symfony #[Route], no Filament panel, no WordPress REST route or AJAX action). Access control is therefore N/A here — a Composer library is authorized by the application that mounts it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone_number, …) or stored credential in a Laravel migration, an Eloquent model's $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Laravel migration, an Eloquent $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Laravel migration, an Eloquent $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D11 Test Reliability — Test reliability not included — no .php test runner
  • D12 Dependency Hygiene — Not scored — 1 direct Composer requirement(s) were read, but the outdated signal needs Packagist, and no committed composer.lock resolves them to releases, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D14 License Compliance — Composer package licences not graded — this repository commits no composer.lock and this pass does not run Composer's solver
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D21 Naming Consistency — Naming consistency does not read PHP yet; not measured.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .php, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (composer.json — not scanned yet).
  • D32 Data Compliance (PII/GDPR) — 14 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D36 Supply-chain Provenance & Signing — The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (composer.json — not scanned yet).
  • D5 Coupling — Not applicable — this Composer build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (10 value object(s))
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • M4 Documentation accuracy — Not applicable: the 2 current-state document(s) make no claim of a kind M4 checks.
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P2 Observability — This repository's PHP source (1 module(s), 403 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the PHP source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for PHPBench subjects (`bench*` methods, or `@Subject`/`#[Subject]` ones) in a file importing PhpBench or carrying its annotations, `bench*` methods in a `*Bench.php` file where PHPBench is installed, or phpbench/phpbench in a composer.json or a phpbench.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • PF3 Async & latency hygiene — Not applicable: PHP has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X12 Unreachable branch — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X13 Undrained process stream — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no C# was loaded; this repository's PHP was read and makes no request a caller can cancel (amphp's HttpClient or connect) — synchronous PHP offers its callers no cancellation to take
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. PHP gives a request one thread of its own; the event-loop libraries (ReactPHP, Amp) run callbacks one at a time, and ext-parallel copies every value across its channels, so no array or collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X27 Collection changed while being enumerated — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 9 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×1
  • Boundary-crossing change coupling: Color.php ↔ ColorInterface.php src/Colors/Rgb/Color.php:1 — `src/Colors/Rgb/Color.php` (context Colors) and `src/Interfaces/ColorInterface.php` (context Interfaces) sit in DIFFERENT parts of the tree yet change together 50% of the time (17 of the 34 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `38b8544f` Refactor ColorInterface; `715b8136` Refactor Colors; `6afacbe4` Implement ColorInterface::withBrightnessDelta() — run `git show` on any of them.
Serious — 118 finding(s)
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×8
  • Duplicated block (8 lines × 2) src/Geometry/Rectangle.php:304 — src/Geometry/Rectangle.php:304-311 | src/Size.php:207-214 — before extracting anything, compare `src/Geometry/Rectangle.php` and `src/Size.php` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) src/Geometry/Rectangle.php:338 — src/Geometry/Rectangle.php:338-345 | src/Size.php:301-308 — before extracting anything, compare `src/Geometry/Rectangle.php` and `src/Size.php` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) src/Geometry/Rectangle.php:358 — src/Geometry/Rectangle.php:358-365 | src/Size.php:320-327 — before extracting anything, compare `src/Geometry/Rectangle.php` and `src/Size.php` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) src/Geometry/Rectangle.php:378 — src/Geometry/Rectangle.php:378-385 | src/Size.php:339-346 — before extracting anything, compare `src/Geometry/Rectangle.php` and `src/Size.php` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) src/Geometry/Rectangle.php:398 — src/Geometry/Rectangle.php:398-405 | src/Size.php:358-365 — before extracting anything, compare `src/Geometry/Rectangle.php` and `src/Size.php` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) src/Geometry/Rectangle.php:418 — src/Geometry/Rectangle.php:418-425 | src/Size.php:377-384 — before extracting anything, compare `src/Geometry/Rectangle.php` and `src/Size.php` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) src/Geometry/Rectangle.php:438 — src/Geometry/Rectangle.php:438-445 | src/Size.php:396-403 — before extracting anything, compare `src/Geometry/Rectangle.php` and `src/Size.php` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) src/Geometry/Rectangle.php:458 — src/Geometry/Rectangle.php:458-465 | src/Size.php:415-422 — before extracting anything, compare `src/Geometry/Rectangle.php` and `src/Size.php` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×7
  • Duplicated block (10 lines × 2) src/Colors/Hsl/Colorspace.php:131 — src/Colors/Hsl/Colorspace.php:131-140 | src/Colors/Hsl/Colorspace.php:170-179 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Colors/Hsl/Colorspace.php:131` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) src/Colors/Oklab/Colorspace.php:164 — src/Colors/Oklab/Colorspace.php:164-173 | src/Colors/Oklch/Colorspace.php:128-137 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Colors/Oklab/Colorspace.php:164` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/Colors/Oklch/Colorspace.php:126 — src/Colors/Oklch/Colorspace.php:126-135 | src/Colors/Rgb/Colorspace.php:249-259 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Colors/Oklch/Colorspace.php:126` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) src/Drivers/Imagick/Encoders/AvifEncoder.php:31 — src/Drivers/Imagick/Encoders/AvifEncoder.php:31-40 | src/Drivers/Imagick/Encoders/WebpEncoder.php:36-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Drivers/Imagick/Encoders/AvifEncoder.php:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/Drivers/Imagick/Encoders/Jpeg2000Encoder.php:46 — src/Drivers/Imagick/Encoders/Jpeg2000Encoder.php:46-55 | src/Drivers/Imagick/Encoders/TiffEncoder.php:46-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Drivers/Imagick/Encoders/Jpeg2000Encoder.php:46` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) src/Geometry/Bezier.php:233 — src/Geometry/Bezier.php:233-242 | src/Geometry/Polygon.php:426-435 — before extracting anything, compare `src/Geometry/Bezier.php` and `src/Geometry/Polygon.php` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) src/Drivers/Gd/Analyzers/PixelColorsAnalyzer.php:19 — src/Drivers/Gd/Analyzers/PixelColorsAnalyzer.php:19-28 | src/Drivers/Imagick/Analyzers/PixelColorsAnalyzer.php:20-29 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D35 · Change Coupling · Change coupling · ×6
  • Change coupling: FileExtensionEncoder.php ↔ MediaTypeEncoder.php src/Encoders/FileExtensionEncoder.php:1 — `src/Encoders/FileExtensionEncoder.php` and `src/Encoders/MediaTypeEncoder.php` change together 67% of the time (8 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `fdb116f9` Adapt type descriptions; `ba39c13d` Rework; `793e67a6` Implement HeicEncoder — run `git show` on any of them.
  • Change coupling: ContainModifier.php ↔ ReduceColorsModifier.php src/Drivers/Gd/Modifiers/ContainModifier.php:1 — `src/Drivers/Gd/Modifiers/ContainModifier.php` and `src/Drivers/Gd/Modifiers/ReduceColorsModifier.php` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `3fc814ed` Optimize code (at that commit the file was still `src/Drivers/Gd/Modifiers/QuantizeColorsModifier.php`); `2e499225` Change default value of background argument (at that commit the file was still `src/Drivers/Gd/Modifiers/QuantizeColorsModifier.php`); `a20c9833` Rename Image::blendTransparency() to Image::background() (at that commit the file was still `src/Drivers/Gd/Modifiers/QuantizeColorsModifier.php`) — run `git show` on any of them.
  • Change coupling: BinaryImageDecoder.php ↔ FilePathImageDecoder.php src/Drivers/Gd/Decoders/BinaryImageDecoder.php:1 — `src/Drivers/Gd/Decoders/BinaryImageDecoder.php` and `src/Drivers/Gd/Decoders/FilePathImageDecoder.php` change together 62% of the time (15 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `60bb1575` Rename modifier class; `f711244b` Rename methods; `d5db89ac` Create reusable trait for decoder support detector methods — run `git show` on any of them.
  • Change coupling: ContainModifier.php ↔ CropModifier.php src/Drivers/Gd/Modifiers/ContainModifier.php:1 — `src/Drivers/Gd/Modifiers/ContainModifier.php` and `src/Drivers/Gd/Modifiers/CropModifier.php` change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `77659fa6` Edit exception messages; `1f1f9006` Restrict colors in Cloner::class to rgb only; `3fc814ed` Optimize code — run `git show` on any of them.
  • Change coupling: CoverModifier.php ↔ ResizeModifier.php src/Drivers/Gd/Modifiers/CoverModifier.php:1 — `src/Drivers/Gd/Modifiers/CoverModifier.php` and `src/Drivers/Gd/Modifiers/ResizeModifier.php` change together 52% of the time (14 of the 27 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `3fc814ed` Optimize code; `56b9f505` Add more exception annotation (#1308); `a0013840` Fix merging diffs — run `git show` on any of them.
  • Change coupling: ContainModifier.php ↔ ResizeCanvasModifier.php src/Modifiers/ContainModifier.php:1 — `src/Modifiers/ContainModifier.php` and `src/Modifiers/ResizeCanvasModifier.php` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `5d2c9bfd` Rename DriverInterface::handleColorInput() to decodeColor(); `9bca7b2d` Add DriverInterface::handleImageInput() & handleColorInput(); `7c62d984` Implement Alignment enum — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×4
  • Edited copy of a member (13 corresponding lines) src/Geometry/Tools/Resizer.php:279 — src/Geometry/Tools/Resizer.php:279-291 | src/Geometry/Tools/Resizer.php:303-315 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/Drivers/Gd/Modifiers/ContainModifier.php:34 — src/Drivers/Gd/Modifiers/ContainModifier.php:34-46 | src/Drivers/Gd/Modifiers/CropModifier.php:34-46 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/Geometry/Tools/Resizer.php:157 — src/Geometry/Tools/Resizer.php:157-169 | src/Geometry/Tools/Resizer.php:179-195 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/Drivers/Gd/Modifiers/FillModifier.php:28 — src/Drivers/Gd/Modifiers/FillModifier.php:28-40 | src/Drivers/Imagick/Modifiers/FillModifier.php:29-41 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×4
  • Swallowed exception (caught, then discarded) src/EncodedImage.php:85 — `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/Image.php:1255 — `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/Drivers/AbstractDecoder.php:61 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/Drivers/Gd/Analyzers/ResolutionAnalyzer.php:48 — `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D3 · God Classes · TooManyMethods · ×3
  • TooManyMethods: Image src/Image.php:105 — TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.57× the bar. Most of these members implement Interfaces.ImageInterface (70 of 77 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: Size src/Size.php:24 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Polygon src/Geometry/Polygon.php:27 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D31 · IaC & Container Security · Medium IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×3
  • Edited copy of a member (17 corresponding lines) src/Drivers/Gd/Modifiers/DrawBezierModifier.php:139 — src/Drivers/Gd/Modifiers/DrawBezierModifier.php:139-155 | src/Drivers/Gd/Modifiers/DrawBezierModifier.php:165-186 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) src/Drivers/AbstractDriver.php:56 — src/Drivers/AbstractDriver.php:56-73 | src/Drivers/AbstractDriver.php:87-103 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) src/Drivers/Imagick/Modifiers/BrightnessModifier.php:20 — src/Drivers/Imagick/Modifiers/BrightnessModifier.php:20-36 | src/Drivers/Imagick/Modifiers/SharpenModifier.php:20-36 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×3
  • Edited copy of a member (10 corresponding lines) src/Drivers/Gd/Modifiers/DrawRectangleModifier.php:53 — src/Drivers/Gd/Modifiers/DrawRectangleModifier.php:53-62 | src/Drivers/Gd/Modifiers/DrawRectangleModifier.php:72-81 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/Drivers/Gd/Modifiers/BrightnessModifier.php:23 — src/Drivers/Gd/Modifiers/BrightnessModifier.php:23-37 | src/Drivers/Gd/Modifiers/PixelateModifier.php:23-32 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/Drivers/Gd/Modifiers/GrayscaleModifier.php:23 — src/Drivers/Gd/Modifiers/GrayscaleModifier.php:23-32 | src/Drivers/Gd/Modifiers/SharpenModifier.php:23-33 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×3
  • Duplicated block (9 lines × 3) src/Colors/Hsl/Decoders/StringColorDecoder.php:59 — src/Colors/Hsl/Decoders/StringColorDecoder.php:59-67 | src/Colors/Hsv/Decoders/StringColorDecoder.php:59-67 | src/Colors/Rgb/Decoders/StringColorDecoder.php:62-70 — before extracting anything, compare `src/Colors/Hsl/Decoders/StringColorDecoder.php` and `src/Colors/Hsv/Decoders/StringColorDecoder.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Colors/Hsl/Decoders/StringColorDecoder.php:59` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) src/Drivers/Imagick/Encoders/HeicEncoder.php:30 — src/Drivers/Imagick/Encoders/HeicEncoder.php:30-38 | src/Drivers/Imagick/Encoders/JxlEncoder.php:30-38 | src/Drivers/Imagick/Encoders/TiffEncoder.php:33-41 — before extracting anything, compare `src/Drivers/Imagick/Encoders/HeicEncoder.php` and `src/Drivers/Imagick/Encoders/JxlEncoder.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Drivers/Imagick/Encoders/HeicEncoder.php:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) src/Drivers/Gd/Modifiers/ContainDownModifier.php:17 — src/Drivers/Gd/Modifiers/ContainDownModifier.php:17-25 | src/Drivers/Imagick/Modifiers/ContainDownModifier.php:17-25 | src/Modifiers/ContainDownModifier.php:20-28 — before extracting anything, compare `src/Drivers/Gd/Modifiers/ContainDownModifier.php` and `src/Drivers/Imagick/Modifiers/ContainDownModifier.php` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×3
  • Duplicated block (7 lines × 2) src/Drivers/Gd/Modifiers/DrawBezierModifier.php:264 — src/Drivers/Gd/Modifiers/DrawBezierModifier.php:264-270 | src/Drivers/Gd/Modifiers/DrawBezierModifier.php:273-279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) src/Drivers/Gd/Modifiers/SliceAnimationModifier.php:23 — src/Drivers/Gd/Modifiers/SliceAnimationModifier.php:23-29 | src/Drivers/Imagick/Modifiers/SliceAnimationModifier.php:19-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) src/Geometry/Bezier.php:196 — src/Geometry/Bezier.php:196-202 | src/Geometry/Polygon.php:389-395 — before extracting anything, compare `src/Geometry/Bezier.php` and `src/Geometry/Polygon.php` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×3
  • Duplicated block (5 lines × 2) src/Colors/Oklab/Decoders/StringColorDecoder.php:78 — src/Colors/Oklab/Decoders/StringColorDecoder.php:78-82 | src/Colors/Oklch/Decoders/StringColorDecoder.php:78-82 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) src/Colors/Oklab/Decoders/StringColorDecoder.php:87 — src/Colors/Oklab/Decoders/StringColorDecoder.php:87-91 | src/Colors/Oklch/Decoders/StringColorDecoder.php:87-91 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) src/Drivers/Imagick/Analyzers/HeightAnalyzer.php:20 — src/Drivers/Imagick/Analyzers/HeightAnalyzer.php:20-24 | src/Drivers/Imagick/Analyzers/WidthAnalyzer.php:20-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D6 · Cohesion (LCOM4) · Low cohesion · ×3
  • Low cohesion: Font (LCOM4 10) src/Typography/Font.php:19 — Font's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Core (LCOM4 5) src/Drivers/Gd/Core.php:13 — Core's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Ellipse (LCOM4 4) src/Geometry/Ellipse.php:15 — Ellipse's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D35 · Change Coupling · Change coupling clique · ×2
  • Change coupling clique: DrawEllipseModifier.php, DrawLineModifier.php, DrawPixelModifier.php, DrawPolygonModifier.php, DrawRectangleModifier.php src/Drivers/Imagick/Modifiers/DrawEllipseModifier.php — 5 files — `src/Drivers/Imagick/Modifiers/DrawEllipseModifier.php`, `src/Drivers/Imagick/Modifiers/DrawLineModifier.php`, `src/Drivers/Imagick/Modifiers/DrawPixelModifier.php`, `src/Drivers/Imagick/Modifiers/DrawPolygonModifier.php`, `src/Drivers/Imagick/Modifiers/DrawRectangleModifier.php` — all change together with no explicit dependency: a fully-connected co-change clique, not 10 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
  • Change coupling clique: DrawEllipseModifier.php, DrawLineModifier.php, DrawPolygonModifier.php, DrawRectangleModifier.php src/Drivers/Gd/Modifiers/DrawEllipseModifier.php — 4 files — `src/Drivers/Gd/Modifiers/DrawEllipseModifier.php`, `src/Drivers/Gd/Modifiers/DrawLineModifier.php`, `src/Drivers/Gd/Modifiers/DrawPolygonModifier.php`, `src/Drivers/Gd/Modifiers/DrawRectangleModifier.php` — all change together with no explicit dependency: a fully-connected co-change clique, not 6 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (6 members, 50+ identical tokens) src/Colors/Cmyk/Color.php:61 — src/Colors/Cmyk/Color.php:61-76 | src/Colors/Hsl/Color.php:59-74 | src/Colors/Hsv/Color.php:59-74 | src/Colors/Oklab/Color.php:59-74 | src/Colors/Oklch/Color.php:59-74 | src/Colors/Rgb/Color.php:60-77 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) src/Colors/Cmyk/Colorspace.php:45 — src/Colors/Cmyk/Colorspace.php:45-65 | src/Colors/Hsl/Colorspace.php:45-65 | src/Colors/Hsv/Colorspace.php:45-65 | src/Colors/Oklab/Colorspace.php:44-64 | src/Colors/Oklch/Colorspace.php:49-69 | src/Colors/Rgb/Colorspace.php:48-68 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×2
  • Edited copy of a member (20 corresponding lines) src/Geometry/Tools/Resizer.php:205 — src/Geometry/Tools/Resizer.php:205-224 | src/Geometry/Tools/Resizer.php:234-267 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/Traits/CanDetectImageSources.php:47 — src/Traits/CanDetectImageSources.php:47-68 | src/Traits/CanDetectImageSources.php:94-113 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×2
  • Edited copy of a member (8 corresponding lines) src/Drivers/Gd/Modifiers/DrawEllipseModifier.php:28 — src/Drivers/Gd/Modifiers/DrawEllipseModifier.php:28-35 | src/Drivers/Gd/Modifiers/DrawLineModifier.php:24-34 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/Drivers/Gd/Modifiers/ContrastModifier.php:23 — src/Drivers/Gd/Modifiers/ContrastModifier.php:23-30 | src/Drivers/Gd/Modifiers/InvertModifier.php:23-30 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×2
  • Edited copy of a member (9 corresponding lines) src/Drivers/Imagick/Modifiers/DrawLineModifier.php:30 — src/Drivers/Imagick/Modifiers/DrawLineModifier.php:30-38 | src/Drivers/Imagick/Modifiers/DrawPixelModifier.php:30-38 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/Geometry/Ellipse.php:133 — src/Geometry/Ellipse.php:133-141 | src/Geometry/Line.php:157-166 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×2
  • Duplicated block (15 lines × 2) src/Drivers/Gd/Modifiers/ContainModifier.php:87 — src/Drivers/Gd/Modifiers/ContainModifier.php:87-101 | src/Drivers/Gd/Modifiers/ResizeModifier.php:49-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) src/Drivers/Imagick/Encoders/HeicEncoder.php:34 — src/Drivers/Imagick/Encoders/HeicEncoder.php:34-48 | src/Drivers/Imagick/Encoders/JxlEncoder.php:34-48 — before extracting anything, compare `src/Drivers/Imagick/Encoders/HeicEncoder.php` and `src/Drivers/Imagick/Encoders/JxlEncoder.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Drivers/Imagick/Encoders/HeicEncoder.php:34` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×2
  • Duplicated block (14 lines × 2) src/Drivers/Gd/Decoders/HttpResponseImageDecoder.php:44 — src/Drivers/Gd/Decoders/HttpResponseImageDecoder.php:44-57 | src/Drivers/Imagick/Decoders/HttpResponseImageDecoder.php:44-57 — before extracting anything, compare `src/Drivers/Gd/Decoders/HttpResponseImageDecoder.php` and `src/Drivers/Imagick/Decoders/HttpResponseImageDecoder.php` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) src/Drivers/Imagick/Encoders/BmpEncoder.php:30 — src/Drivers/Imagick/Encoders/BmpEncoder.php:30-43 | src/Drivers/Imagick/Encoders/IcoEncoder.php:29-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Drivers/Imagick/Encoders/BmpEncoder.php:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×2
  • Duplicated block (11 lines × 2) src/Drivers/Gd/Modifiers/ResizeCanvasModifier.php:25 — src/Drivers/Gd/Modifiers/ResizeCanvasModifier.php:25-35 | src/Drivers/Imagick/Modifiers/ResizeCanvasModifier.php:23-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) src/Drivers/Imagick/Encoders/AvifEncoder.php:41 — src/Drivers/Imagick/Encoders/AvifEncoder.php:41-51 | src/Drivers/Imagick/Encoders/Jpeg2000Encoder.php:42-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Drivers/Imagick/Encoders/Jpeg2000Encoder.php:40` calls `setImageBackgroundColor`, `setBackgroundColor` and `src/Drivers/Imagick/Encoders/AvifEncoder.php:40` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×2
  • Duplicated block (9 lines × 4) src/Drivers/Imagick/Modifiers/DrawBezierModifier.php:32 — src/Drivers/Imagick/Modifiers/DrawBezierModifier.php:32-40 | src/Drivers/Imagick/Modifiers/DrawEllipseModifier.php:31-39 | src/Drivers/Imagick/Modifiers/DrawPolygonModifier.php:31-39 | src/Drivers/Imagick/Modifiers/DrawRectangleModifier.php:31-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Drivers/Imagick/Modifiers/DrawBezierModifier.php:32` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 4) src/Colors/Cmyk/Decoders/StringColorDecoder.php:29 — src/Colors/Cmyk/Decoders/StringColorDecoder.php:29-37 | src/Colors/Hsl/Decoders/StringColorDecoder.php:34-42 | src/Colors/Oklab/Decoders/StringColorDecoder.php:37-45 | src/Colors/Oklch/Decoders/StringColorDecoder.php:37-45 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×2
  • Duplicated block (9 lines × 2) src/Colors/Hsv/Decoders/StringColorDecoder.php:34 — src/Colors/Hsv/Decoders/StringColorDecoder.php:34-42 | src/Colors/Rgb/Decoders/StringColorDecoder.php:35-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) src/Geometry/Rectangle.php:192 — src/Geometry/Rectangle.php:192-200 | src/Size.php:253-261 — before extracting anything, compare `src/Geometry/Rectangle.php` and `src/Size.php` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D1 · Cyclomatic Complexity · Definition.isColorInCategory (cyclomatic 22) · ×1
  • Definition.isColorInCategory (cyclomatic 22) src/Colors/Themes/VibrantMuted/Definition.php:153 — Definition.isColorInCategory has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · OrientModifier.apply (cyclomatic 16) · ×1
  • OrientModifier.apply (cyclomatic 16) src/Drivers/Imagick/Modifiers/OrientModifier.php:19 — OrientModifier.apply has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D15 · Churn × Complexity Hotspots · Hotspot · ×1
  • Hotspot: src/Drivers/Imagick/Modifiers/OrientModifier.php src/Drivers/Imagick/Modifiers/OrientModifier.php:19 — src/Drivers/Imagick/Modifiers/OrientModifier.php changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in OrientModifier.apply at line 19. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-01..2026-10-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-01 14:38:01 +01:00' --until='2026-10-30 14:38:01 +01:00' --full-history --no-merges -- src/Drivers/Imagick/Modifiers/OrientModifier.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · Definition.isColorInCategory (cognitive 16) · ×1
  • Definition.isColorInCategory (cognitive 16) src/Colors/Themes/VibrantMuted/Definition.php:153 — Definition.isColorInCategory has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 15, match/switch 1. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NativeObjectDecoder.decode (cognitive 16) · ×1
  • NativeObjectDecoder.decode (cognitive 16) src/Drivers/Imagick/Decoders/NativeObjectDecoder.php:52 — NativeObjectDecoder.decode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), error handling 4 (5 pts), ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D3 · God Classes · MethodTooLong · ×1
  • MethodTooLong: NamedColor.toHex src/Colors/Rgb/NamedColor.php:207 — MethodTooLong — toHex runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (7 members, 50+ identical tokens) src/Drivers/Imagick/Encoders/AvifEncoder.php:31 — src/Drivers/Imagick/Encoders/AvifEncoder.php:31-54 | src/Drivers/Imagick/Encoders/HeicEncoder.php:30-50 | src/Drivers/Imagick/Encoders/Jpeg2000Encoder.php:30-55 | src/Drivers/Imagick/Encoders/JpegEncoder.php:30-72 | src/Drivers/Imagick/Encoders/JxlEncoder.php:30-50 | src/Drivers/Imagick/Encoders/TiffEncoder.php:33-55 | src/Drivers/Imagick/Encoders/WebpEncoder.php:36-75 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/Drivers/Imagick/Modifiers/DrawBezierModifier.php:31 — src/Drivers/Imagick/Modifiers/DrawBezierModifier.php:31-40 | src/Drivers/Imagick/Modifiers/DrawEllipseModifier.php:30-39 | src/Drivers/Imagick/Modifiers/DrawPolygonModifier.php:30-39 | src/Drivers/Imagick/Modifiers/DrawRectangleModifier.php:30-39 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×1
  • Edited copy of a member (33 corresponding lines) src/Alignment.php:150 — src/Alignment.php:150-182 | src/Alignment.php:190-222 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) src/Colors/Rgb/Colorspace.php:121 — src/Colors/Rgb/Colorspace.php:121-150 | src/Colors/Rgb/Colorspace.php:161-191 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) src/FileExtension.php:45 — src/FileExtension.php:45-81 | src/MediaType.php:53-89 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) src/Drivers/Imagick/Modifiers/ContainModifier.php:134 — src/Drivers/Imagick/Modifiers/ContainModifier.php:134-158 | src/Drivers/Imagick/Modifiers/ContainModifier.php:172-196 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×1
  • Edited copy of a member (16 corresponding lines) src/Geometry/Polygon.php:282 — src/Geometry/Polygon.php:282-297 | src/Geometry/Polygon.php:307-322 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) src/Drivers/Imagick/Modifiers/DrawEllipseModifier.php:51 — src/Drivers/Imagick/Modifiers/DrawEllipseModifier.php:51-75 | src/Drivers/Imagick/Modifiers/DrawRectangleModifier.php:49-71 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×1
  • Edited copy of a member (14 corresponding lines) src/Drivers/Gd/Modifiers/DrawPolygonModifier.php:28 — src/Drivers/Gd/Modifiers/DrawPolygonModifier.php:28-41 | src/Drivers/Gd/Modifiers/DrawRectangleModifier.php:29-43 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 17+ corresponding lines) src/Drivers/Imagick/Encoders/BmpEncoder.php:30 — src/Drivers/Imagick/Encoders/BmpEncoder.php:30-46 | src/Drivers/Imagick/Encoders/GifEncoder.php:30-50 | src/Drivers/Imagick/Encoders/IcoEncoder.php:29-45 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 16+ corresponding lines) src/Colors/Cmyk/Color.php:152 — src/Colors/Cmyk/Color.php:152-169 | src/Colors/Hsl/Color.php:143-158 | src/Colors/Hsv/Color.php:141-156 | src/Colors/Oklab/Color.php:141-156 | src/Colors/Oklch/Color.php:141-156 | src/Colors/Rgb/Color.php:160-175 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×1
  • Edited copy of a member (18 corresponding lines) src/Drivers/Gd/Modifiers/CoverModifier.php:48 — src/Drivers/Gd/Modifiers/CoverModifier.php:48-65 | src/Drivers/Gd/Modifiers/ResizeModifier.php:46-63 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 14+ corresponding lines) src/Colors/Cmyk/Colorspace.php:124 — src/Colors/Cmyk/Colorspace.php:124-137 | src/Colors/Hsl/Colorspace.php:189-202 | src/Colors/Hsv/Colorspace.php:184-197 | src/Colors/Oklab/Colorspace.php:162-175 | src/Colors/Oklch/Colorspace.php:126-139 | src/Colors/Oklch/Colorspace.php:149-162 | src/Colors/Rgb/Colorspace.php:249-264 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 17+ corresponding lines) src/Drivers/Imagick/Modifiers/ContrastModifier.php:23 — src/Drivers/Imagick/Modifiers/ContrastModifier.php:23-41 | src/Drivers/Imagick/Modifiers/InvertModifier.php:22-40 | src/Drivers/Imagick/Modifiers/ProfileModifier.php:20-38 | src/Drivers/Imagick/Modifiers/StripMetaModifier.php:128-144 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 12+ corresponding lines) src/Colors/Cmyk/Colorspace.php:77 — src/Colors/Cmyk/Colorspace.php:77-88 | src/Colors/Hsl/Colorspace.php:77-88 | src/Colors/Hsv/Colorspace.php:78-89 | src/Colors/Oklab/Colorspace.php:76-87 | src/Colors/Oklch/Colorspace.php:81-92 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×1
  • Edited copy of a member (11 corresponding lines) src/Drivers/Imagick/Modifiers/TextModifier.php:67 — src/Drivers/Imagick/Modifiers/TextModifier.php:67-77 | src/Drivers/Imagick/Modifiers/TextModifier.php:89-103 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×1
  • Edited copy of a member (4 corresponding lines) src/Geometry/Rectangle.php:322 — src/Geometry/Rectangle.php:322-325 | src/Size.php:224-227 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 11+ corresponding lines) src/Geometry/Rectangle.php:33 — src/Geometry/Rectangle.php:33-50 | src/Resolution.php:30-40 | src/Size.php:36-46 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×1
  • Edited copy of a member (7 corresponding lines) src/Colors/FloatColorChannel.php:28 — src/Colors/FloatColorChannel.php:28-34 | src/Colors/IntegerColorChannel.php:28-34 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×1
  • Edited copy of a member (5 corresponding lines) src/Geometry/Factories/EllipseFactory.php:22 — src/Geometry/Factories/EllipseFactory.php:22-26 | src/Geometry/Factories/RectangleFactory.php:24-28 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×1
  • Duplicated block (44 lines × 2) src/Geometry/Rectangle.php:248 — src/Geometry/Rectangle.php:248-291 | src/Size.php:152-195 — before extracting anything, compare `src/Geometry/Rectangle.php` and `src/Size.php` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) src/Drivers/Gd/Decoders/StreamImageDecoder.php:42 — src/Drivers/Gd/Decoders/StreamImageDecoder.php:42-68 | src/Drivers/Imagick/Decoders/StreamImageDecoder.php:39-64 — before extracting anything, compare `src/Drivers/Gd/Decoders/StreamImageDecoder.php` and `src/Drivers/Imagick/Decoders/StreamImageDecoder.php` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (21 lines × 6) · ×1
  • Duplicated block (21 lines × 6) src/Colors/Cmyk/Colorspace.php:45 — src/Colors/Cmyk/Colorspace.php:45-65 | src/Colors/Hsl/Colorspace.php:45-65 | src/Colors/Hsv/Colorspace.php:45-65 | src/Colors/Oklab/Colorspace.php:44-64 | src/Colors/Oklch/Colorspace.php:49-69 | src/Colors/Rgb/Colorspace.php:48-68 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) src/Drivers/Gd/Decoders/DataUriImageDecoder.php:42 — src/Drivers/Gd/Decoders/DataUriImageDecoder.php:42-60 | src/Drivers/Imagick/Decoders/DataUriImageDecoder.php:42-60 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (16–18 lines × 6) · ×1
  • Duplicated block (16–18 lines × 6) src/Colors/Cmyk/Color.php:61 — src/Colors/Cmyk/Color.php:61-76 | src/Colors/Hsl/Color.php:59-74 | src/Colors/Hsv/Color.php:59-74 | src/Colors/Oklab/Color.php:59-74 | src/Colors/Oklch/Color.php:59-74 | src/Colors/Rgb/Color.php:60-77 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. Note first that the copies are not typed on the same thing: `Alpha` names `Intervention\Image\Colors\Cmyk\Channels\Alpha` in one and `Intervention\Image\Colors\Hsl\Channels\Alpha` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) src/Colors/Hsl/Decoders/StringColorDecoder.php:53 — src/Colors/Hsl/Decoders/StringColorDecoder.php:53-69 | src/Colors/Hsv/Decoders/StringColorDecoder.php:53-69 — before extracting anything, compare `src/Colors/Hsl/Decoders/StringColorDecoder.php` and `src/Colors/Hsv/Decoders/StringColorDecoder.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Colors/Hsl/Decoders/StringColorDecoder.php:53` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `Color` names `Intervention\Image\Colors\Hsl\Color` in one and `Intervention\Image\Colors\Hsv\Color` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) src/Drivers/Imagick/Modifiers/ColorspaceModifier.php:35 — src/Drivers/Imagick/Modifiers/ColorspaceModifier.php:35-50 | src/Drivers/Imagick/Modifiers/GrayscaleModifier.php:34-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Drivers/Imagick/Modifiers/ColorspaceModifier.php:35` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×1
  • Duplicated block (13 lines × 2) src/Drivers/Imagick/Modifiers/ContainModifier.php:146 — src/Drivers/Imagick/Modifiers/ContainModifier.php:146-158 | src/Drivers/Imagick/Modifiers/ContainModifier.php:184-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Drivers/Imagick/Modifiers/ContainModifier.php:146` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) src/Colors/Cmyk/Colorspace.php:126 — src/Colors/Cmyk/Colorspace.php:126-137 | src/Colors/Hsl/Colorspace.php:191-202 | src/Colors/Hsv/Colorspace.php:186-197 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Colors/Cmyk/Colorspace.php:126` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) src/Drivers/Imagick/Encoders/AvifEncoder.php:45 — src/Drivers/Imagick/Encoders/AvifEncoder.php:45-54 | src/Drivers/Imagick/Encoders/HeicEncoder.php:41-50 | src/Drivers/Imagick/Encoders/JxlEncoder.php:41-50 — before extracting anything, compare `src/Drivers/Imagick/Encoders/HeicEncoder.php` and `src/Drivers/Imagick/Encoders/JxlEncoder.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Drivers/Imagick/Encoders/AvifEncoder.php:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Drivers/Imagick/Encoders/AvifEncoder.php:43` calls `setCompression`, `setImageCompression` and `src/Drivers/Imagick/Encoders/HeicEncoder.php:40` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) src/Drivers/Imagick/Encoders/AvifEncoder.php:35 — src/Drivers/Imagick/Encoders/AvifEncoder.php:35-42 | src/Drivers/Imagick/Encoders/HeicEncoder.php:33-40 | src/Drivers/Imagick/Encoders/JxlEncoder.php:33-40 | src/Drivers/Imagick/Encoders/TiffEncoder.php:36-43 — before extracting anything, compare `src/Drivers/Imagick/Encoders/HeicEncoder.php` and `src/Drivers/Imagick/Encoders/JxlEncoder.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Drivers/Imagick/Encoders/AvifEncoder.php:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Drivers/Imagick/Encoders/AvifEncoder.php:43` calls `setCompression`, `setImageCompression` and `src/Drivers/Imagick/Encoders/HeicEncoder.php:41` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6 lines × 6) · ×1
  • Duplicated block (6 lines × 6) src/Drivers/Imagick/Encoders/AvifEncoder.php:35 — src/Drivers/Imagick/Encoders/AvifEncoder.php:35-40 | src/Drivers/Imagick/Encoders/HeicEncoder.php:33-38 | src/Drivers/Imagick/Encoders/Jpeg2000Encoder.php:34-39 | src/Drivers/Imagick/Encoders/JpegEncoder.php:46-51 | src/Drivers/Imagick/Encoders/JxlEncoder.php:33-38 | src/Drivers/Imagick/Encoders/TiffEncoder.php:36-41 — before extracting anything, compare `src/Drivers/Imagick/Encoders/HeicEncoder.php` and `src/Drivers/Imagick/Encoders/JxlEncoder.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Drivers/Imagick/Encoders/AvifEncoder.php:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Drivers/Imagick/Encoders/Jpeg2000Encoder.php:40` calls `setImageBackgroundColor`, `setBackgroundColor` and `src/Drivers/Imagick/Encoders/AvifEncoder.php:41` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) src/Colors/Hsl/Decoders/StringColorDecoder.php:52 — src/Colors/Hsl/Decoders/StringColorDecoder.php:52-57 | src/Colors/Hsv/Decoders/StringColorDecoder.php:52-57 | src/Colors/Rgb/Decoders/StringColorDecoder.php:54-60 — before extracting anything, compare `src/Colors/Hsl/Decoders/StringColorDecoder.php` and `src/Colors/Hsv/Decoders/StringColorDecoder.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Colors/Hsl/Decoders/StringColorDecoder.php:52` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) src/Drivers/Gd/Decoders/Base64ImageDecoder.php:21 — src/Drivers/Gd/Decoders/Base64ImageDecoder.php:21-41 | src/Drivers/Imagick/Decoders/Base64ImageDecoder.php:23-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Drivers/Gd/Decoders/Base64ImageDecoder.php:21` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) src/Drivers/Gd/Decoders/EncodedImageObjectDecoder.php:26 — src/Drivers/Gd/Decoders/EncodedImageObjectDecoder.php:26-50 | src/Drivers/Imagick/Decoders/EncodedImageObjectDecoder.php:25-48 — before extracting anything, compare `src/Drivers/Gd/Decoders/EncodedImageObjectDecoder.php` and `src/Drivers/Imagick/Decoders/EncodedImageObjectDecoder.php` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Drivers/Gd/Decoders/EncodedImageObjectDecoder.php:26` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) src/Drivers/Gd/Decoders/Psr7StreamImageDecoder.php:27 — src/Drivers/Gd/Decoders/Psr7StreamImageDecoder.php:27-62 | src/Drivers/Imagick/Decoders/Psr7StreamImageDecoder.php:27-62 — before extracting anything, compare `src/Drivers/Gd/Decoders/Psr7StreamImageDecoder.php` and `src/Drivers/Imagick/Decoders/Psr7StreamImageDecoder.php` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Drivers/Gd/Decoders/Psr7StreamImageDecoder.php:27` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) src/Drivers/Gd/Decoders/SplFileInfoImageDecoder.php:28 — src/Drivers/Gd/Decoders/SplFileInfoImageDecoder.php:28-54 | src/Drivers/Imagick/Decoders/SplFileInfoImageDecoder.php:30-56 — before extracting anything, compare `src/Drivers/Gd/Decoders/SplFileInfoImageDecoder.php` and `src/Drivers/Imagick/Decoders/SplFileInfoImageDecoder.php` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Drivers/Gd/Decoders/SplFileInfoImageDecoder.php:28` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) src/Drivers/AbstractEncoder.php:35 — src/Drivers/AbstractEncoder.php:35-41 | src/Drivers/SpecializableAnalyzer.php:23-29 | src/Drivers/SpecializableModifier.php:23-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) src/Drivers/Imagick/Core.php:223 — src/Drivers/Imagick/Core.php:223-227 | src/Drivers/Imagick/Core.php:355-359 | src/Drivers/Imagick/Frame.php:172-176 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Minor — 10 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×5
  • Duplicated predicate src/Drivers/Gd/Decoders/StreamImageDecoder.php:42 — `!is_resource($input) || !in_array(get_resource_type($input), ['file', 'stream'])` appears character-identically in 2 files — src/Drivers/Gd/Decoders/StreamImageDecoder.php, src/Drivers/Imagick/Decoders/StreamImageDecoder.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Drivers/AbstractDecoder.php:80 — `!is_string($input) && !$input instanceof Stringable` appears character-identically in 4 files — src/Drivers/AbstractDecoder.php, src/Drivers/Gd/Decoders/BinaryImageDecoder.php, src/Drivers/Imagick/Decoders/BinaryImageDecoder.php, src/Traits/CanDetectImageSources.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Drivers/Gd/Cloner.php:63 — `is_array($resolution) && array_key_exists(0, $resolution) && array_key_exists(1, $resolution)` appears character-identically in 2 files — src/Drivers/Gd/Cloner.php, src/Drivers/Gd/Modifiers/TrimModifier.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Drivers/Gd/Decoders/HttpResponseImageDecoder.php:65 — `is_object($input) && is_a($input, self::DECODABLE_CLASSNAME)` appears character-identically in 4 files — src/Drivers/Gd/Decoders/HttpResponseImageDecoder.php, src/Drivers/Gd/Decoders/Psr7StreamImageDecoder.php, src/Drivers/Imagick/Decoders/HttpResponseImageDecoder.php, src/Drivers/Imagick/Decoders/Psr7StreamImageDecoder.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Drivers/Imagick/Encoders/AvifEncoder.php:35 — `strip === true || ($this->strip === null && $this->driver()->config()->strip === true)` appears character-identically in 8 files — src/Drivers/Imagick/Encoders/AvifEncoder.php, src/Drivers/Imagick/Encoders/HeicEncoder.php, src/Drivers/Imagick/Encoders/Jpeg2000Encoder.php, src/Drivers/Imagick/Encoders/JpegEncoder.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
X5 · Nullable reference types · PHP static analysis does not check null everywhere · ×1
  • PHP static analysis does not check null everywhere — 0/1 of this repository's PHPStan/Psalm configuration(s) run at a level that checks null — PHPStan level 8 or above (`max` included), or Psalm `errorLevel` 3 or below (Psalm's default, with none stated, is 1). A PHPStan level written neither in the file nor in an include inside the repository is 0, PHPStan's own default. Below those levels the checker removes `null` from a union before any rule looks, so `$order->customer()->name()` on a `?Customer` passes, and the first null reaching it is an `Error: Call to a member function name() on null` in production.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-d841649281294e0f8967c173b3064cd1/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-d841649281294e0f8967c173b3064cd1/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .6artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnone (dependency manifest found, not scanned for vulnerabilities here)—none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (composer.json — not scanned yet).0—
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .5artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 14 file(s) — `src/Analyzers/DominantPaletteAnalyzer.php`, `src/AnimationFactory.php`, `src/Colors/Hsl/Decoders/StringColorDecoder.php`, `src/Colors/Hsv/Decoders/StringColorDecoder.php`, `src/Colors/Rgb/Decoders/HexColorDecoder.php`, … (+9 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesnone (dependency manifest found, not scanned for vulnerabilities here)—none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (composer.json — not scanned yet).0—

Run 01a1d6c8-c7e0-7774-a9c7-de6a4ba20611 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md