Public report of getgrav/grav, published 23 October 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 reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog 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, 23 October 2026, 01:38 UTC · Survey ID cd_5c342c8a91284a3cba4034eb3da95a5f
getgrav/grav
Measured 23 October 2026, 01:33 UTC, at code version 412350a
No regression since the last survey
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
CAI scoreAt riskDown 2 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 large codebase: 106,674 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 0.9 person-years · Weakest lens: Maturity, 46
Findings by how serious they are
34 critical715 serious181 minor
13 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
23 October 2026, 01:33 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 Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. Watchdog works 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 ▸
57of 60 dimensions measured by tools. The other 3 are advisory notes from an AI model, which explain the code but don't count towards the score.
905of 930 findings point to an exact file and line, so you can open each one in the code. The other 25 concern the repository as a whole, such as missing documentation.
60dimensions across 5 lenses, read from 106,674 lines of product code in 1 project.
getgrav/grav scores 54 out of 100, but it is rated At risk while a critical security finding is open; the score itself is unchanged.
The weakest lens counts most in the score, and here that is Maturity, which scores 46 and is rated Weak. Its Architecture documentation dimension scores 0 out of 10, and until that reaches 4, Maturity can't be rated higher than Adequate. The first actions are to resolve the 1 No ADRs found finding(s) in ADR Quality and to record your significant design decisions, and if Maturity rose to 70, the score would rise from 54 to about 60.
34 findings are critical: 27 in Static Analysis (SAST), three in Knowledge Freshness, two in Secrets (history), one in Dependency Vulnerabilities and one in IaC & Container Security.
Watchdog couldn't measure 12 dimensions in this code, among them Code Coverage, Test Reliability and Data Protection, so they are left out of the score. The product code is 106,674 lines, which would take an estimated 0.9 person-years, around €130,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 forThe 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.
Exception handling · Swallowed exception (caught, then discarded) system/src/Grav/Common/Scheduler/Scheduler.php
Outbound HTTP resilience · Outbound HTTP without resilience system/src/Grav/Common/HTTP/Client.php
Outbound HTTP resilience · Outbound HTTP without resilience system/src/Grav/Common/HTTP/Client.php
Outbound HTTP resilience · Outbound HTTP without resilience system/src/Grav/Common/HTTP/Client.php
Watchdog compares 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: 8 findings
These 8 critical or serious findings were in the previous survey, on 9 October 2026, and are gone from this one.
Outbound HTTP resilience · Outbound HTTP without resilience system/src/Grav/Common/HTTP/Client.php
Rebuild cost: about €130,000 · Estimate
Cost to rebuild
€42,000 to €210,000, for 707 to 2,242 hours of work, about 0.9 person-years for 1 to 2 engineers
Difficulty of the problem
Standard, 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.7 at a score of 54. 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.
Size
Large: 106,674 lines of product code
How the estimate is made: Watchdog prices 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
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 7 points · Low effort · ADR Quality
2
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.
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 €130,000 to build again, about 0.9 person-years of work. Its weakest lens is Maturity, at 46 (Weak). 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
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 7 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.9 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 3% to 6% on every change. The history of the code shows how much it changes: about 31,607 lines over the last 90 days, which is about 128,184 lines a year. At that pace, the extra work comes to an estimated 8.8 to 52.5 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
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.
123 modules, with 178 dependencies between them. 3 loops run through 22 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 83 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 a module listed above itPart of a loopThe module itself
5→32 Grav.Common.Language uses Grav.Commonpart of a loop✕
Connections
1 pair of types, where a type in Grav.Common.Language uses a type in Grav.Common.
The types involved
Grav.Common.Language.Language → Grav.Common.Grav
Direction
Grav.Common.Language uses Grav.Common, so a change to Grav.Common can break Grav.Common.Language, while a change to Grav.Common.Language can't break Grav.Common.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Grav.Framework.Contracts.Relationships uses Grav.Framework.Contracts.Object, so a change to Grav.Framework.Contracts.Object can break Grav.Framework.Contracts.Relationships, while a change to Grav.Framework.Contracts.Relationships can't break Grav.Framework.Contracts.Object.
Position
Below the diagonal: Grav.Framework.Contracts.Relationships uses a module listed above it, which is the healthy direction.
7→12 Grav.Framework.Media.Interfaces uses Grav.Common.Media.Interfacespart of a loop✕
Connections
1 pair of types, where a type in Grav.Framework.Media.Interfaces uses a type in Grav.Common.Media.Interfaces.
Grav.Framework.Media.Interfaces uses Grav.Common.Media.Interfaces, so a change to Grav.Common.Media.Interfaces can break Grav.Framework.Media.Interfaces, while a change to Grav.Framework.Media.Interfaces can't break Grav.Common.Media.Interfaces.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Grav.Framework.Object uses Grav.Framework.Object.Interfaces, so a change to Grav.Framework.Object.Interfaces can break Grav.Framework.Object, while a change to Grav.Framework.Object can't break Grav.Framework.Object.Interfaces.
Position
Below the diagonal: Grav.Framework.Object uses a module listed above it, which is the healthy direction.
9→32 Grav.Framework.Route uses Grav.Commonpart of a loop✕
Connections
1 pair of types, where a type in Grav.Framework.Route uses a type in Grav.Common.
Grav.Framework.Route uses Grav.Common, so a change to Grav.Common can break Grav.Framework.Route, while a change to Grav.Framework.Route can't break Grav.Common.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Grav.Common.Page.Medium uses Grav.Common.Language, so a change to Grav.Common.Language can break Grav.Common.Page.Medium, while a change to Grav.Common.Page.Medium can't break Grav.Common.Language.
Position
Below the diagonal: Grav.Common.Page.Medium uses a module listed above it, which is the healthy direction.
10→12 Grav.Common.Page.Medium uses Grav.Common.Media.Interfacespart of a loop✕
Connections
11 pairs of types, where a type in Grav.Common.Page.Medium uses a type in Grav.Common.Media.Interfaces.
Grav.Common.Page.Medium uses Grav.Common.Media.Interfaces, so a change to Grav.Common.Media.Interfaces can break Grav.Common.Page.Medium, while a change to Grav.Common.Page.Medium can't break Grav.Common.Media.Interfaces.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→15 Grav.Common.Page.Medium uses Grav.Common.Datapart of a loop✕
Connections
6 pairs of types, where a type in Grav.Common.Page.Medium uses a type in Grav.Common.Data.
Grav.Common.Page.Medium uses Grav.Common.Data, so a change to Grav.Common.Data can break Grav.Common.Page.Medium, while a change to Grav.Common.Page.Medium can't break Grav.Common.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→16 Grav.Common.Page.Medium uses Grav.Common.Configpart of a loop✕
Connections
1 pair of types, where a type in Grav.Common.Page.Medium uses a type in Grav.Common.Config.
Grav.Common.Page.Medium uses Grav.Common.Config, so a change to Grav.Common.Config can break Grav.Common.Page.Medium, while a change to Grav.Common.Page.Medium can't break Grav.Common.Config.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→32 Grav.Common.Page.Medium uses Grav.Commonpart of a loop✕
Connections
2 pairs of types, where a type in Grav.Common.Page.Medium uses a type in Grav.Common.
Grav.Common.Page.Medium uses Grav.Common, so a change to Grav.Common can break Grav.Common.Page.Medium, while a change to Grav.Common.Page.Medium can't break Grav.Common.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Grav.Common.Processors.Events uses RocketTheme.Toolbox.Event, so a change to RocketTheme.Toolbox.Event can break Grav.Common.Processors.Events, while a change to Grav.Common.Processors.Events can't break RocketTheme.Toolbox.Event.
Position
Below the diagonal: Grav.Common.Processors.Events uses a module listed above it, which is the healthy direction.
Grav.Common.Processors.Events uses Grav.Framework.Route, so a change to Grav.Framework.Route can break Grav.Common.Processors.Events, while a change to Grav.Common.Processors.Events can't break Grav.Framework.Route.
Position
Below the diagonal: Grav.Common.Processors.Events uses a module listed above it, which is the healthy direction.
Grav.Common.Media.Interfaces uses Grav.Framework.Media.Interfaces, so a change to Grav.Framework.Media.Interfaces can break Grav.Common.Media.Interfaces, while a change to Grav.Common.Media.Interfaces can't break Grav.Framework.Media.Interfaces.
Position
Below the diagonal: Grav.Common.Media.Interfaces uses a module listed above it, which is the healthy direction.
Grav.Common.Media.Interfaces uses Grav.Common.Page.Medium, so a change to Grav.Common.Page.Medium can break Grav.Common.Media.Interfaces, while a change to Grav.Common.Media.Interfaces can't break Grav.Common.Page.Medium.
Position
Below the diagonal: Grav.Common.Media.Interfaces uses a module listed above it, which is the healthy direction.
12→15 Grav.Common.Media.Interfaces uses Grav.Common.Datapart of a loop✕
Connections
1 pair of types, where a type in Grav.Common.Media.Interfaces uses a type in Grav.Common.Data.
Grav.Common.Media.Interfaces uses Grav.Common.Data, so a change to Grav.Common.Data can break Grav.Common.Media.Interfaces, while a change to Grav.Common.Media.Interfaces can't break Grav.Common.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Grav.Common.Page.Interfaces uses Grav.Common.Media.Interfaces, so a change to Grav.Common.Media.Interfaces can break Grav.Common.Page.Interfaces, while a change to Grav.Common.Page.Interfaces can't break Grav.Common.Media.Interfaces.
Position
Below the diagonal: Grav.Common.Page.Interfaces uses a module listed above it, which is the healthy direction.
Grav.Common.User.Interfaces uses Grav.Common.Page.Medium, so a change to Grav.Common.Page.Medium can break Grav.Common.User.Interfaces, while a change to Grav.Common.User.Interfaces can't break Grav.Common.Page.Medium.
Position
Below the diagonal: Grav.Common.User.Interfaces uses a module listed above it, which is the healthy direction.
Grav.Common.User.Interfaces uses Grav.Common.Media.Interfaces, so a change to Grav.Common.Media.Interfaces can break Grav.Common.User.Interfaces, while a change to Grav.Common.User.Interfaces can't break Grav.Common.Media.Interfaces.
Position
Below the diagonal: Grav.Common.User.Interfaces uses a module listed above it, which is the healthy direction.
14→15 Grav.Common.User.Interfaces uses Grav.Common.Datapart of a loop✕
Connections
1 pair of types, where a type in Grav.Common.User.Interfaces uses a type in Grav.Common.Data.
Grav.Common.User.Interfaces uses Grav.Common.Data, so a change to Grav.Common.Data can break Grav.Common.User.Interfaces, while a change to Grav.Common.User.Interfaces can't break Grav.Common.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Grav.Common.Data uses Grav.Common.User.Interfaces, so a change to Grav.Common.User.Interfaces can break Grav.Common.Data, while a change to Grav.Common.Data can't break Grav.Common.User.Interfaces.
Position
Below the diagonal: Grav.Common.Data uses a module listed above it, which is the healthy direction.
Grav.Common.Config uses Grav.Common.Data, so a change to Grav.Common.Data can break Grav.Common.Config, while a change to Grav.Common.Config can't break Grav.Common.Data.
Position
Below the diagonal: Grav.Common.Config uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in Grav.Common.User uses a type in Grav.Common.Data.
The types involved
Grav.Common.User.Group → Grav.Common.Data.Data
Direction
Grav.Common.User uses Grav.Common.Data, so a change to Grav.Common.Data can break Grav.Common.User, while a change to Grav.Common.User can't break Grav.Common.Data.
Position
Below the diagonal: Grav.Common.User uses a module listed above it, which is the healthy direction.
Grav.Framework.Form.Interfaces uses Grav.Common.Data, so a change to Grav.Common.Data can break Grav.Framework.Form.Interfaces, while a change to Grav.Framework.Form.Interfaces can't break Grav.Common.Data.
Position
Below the diagonal: Grav.Framework.Form.Interfaces uses a module listed above it, which is the healthy direction.
18→31 Grav.Framework.Form.Interfaces uses Grav.Common.Pagepart of a loop✕
Connections
1 pair of types, where a type in Grav.Framework.Form.Interfaces uses a type in Grav.Common.Page.
Grav.Framework.Form.Interfaces uses Grav.Common.Page, so a change to Grav.Common.Page can break Grav.Framework.Form.Interfaces, while a change to Grav.Framework.Form.Interfaces can't break Grav.Common.Page.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Grav.Common.Twig.Sandbox uses Grav.Common.Config, so a change to Grav.Common.Config can break Grav.Common.Twig.Sandbox, while a change to Grav.Common.Twig.Sandbox can't break Grav.Common.Config.
Position
Below the diagonal: Grav.Common.Twig.Sandbox uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex.Interfaces uses Grav.Framework.Object.Interfaces, so a change to Grav.Framework.Object.Interfaces can break Grav.Framework.Flex.Interfaces, while a change to Grav.Framework.Flex.Interfaces can't break Grav.Framework.Object.Interfaces.
Position
Below the diagonal: Grav.Framework.Flex.Interfaces uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex.Interfaces uses Grav.Common.User.Interfaces, so a change to Grav.Common.User.Interfaces can break Grav.Framework.Flex.Interfaces, while a change to Grav.Framework.Flex.Interfaces can't break Grav.Common.User.Interfaces.
Position
Below the diagonal: Grav.Framework.Flex.Interfaces uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex.Interfaces uses Grav.Framework.Form.Interfaces, so a change to Grav.Framework.Form.Interfaces can break Grav.Framework.Flex.Interfaces, while a change to Grav.Framework.Flex.Interfaces can't break Grav.Framework.Form.Interfaces.
Position
Below the diagonal: Grav.Framework.Flex.Interfaces uses a module listed above it, which is the healthy direction.
20→23 Grav.Framework.Flex.Interfaces uses Grav.Framework.Flexpart of a loop✕
Connections
5 pairs of types, where a type in Grav.Framework.Flex.Interfaces uses a type in Grav.Framework.Flex.
Grav.Framework.Flex.Interfaces uses Grav.Framework.Flex, so a change to Grav.Framework.Flex can break Grav.Framework.Flex.Interfaces, while a change to Grav.Framework.Flex.Interfaces can't break Grav.Framework.Flex.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Grav.Framework.Form uses Grav.Common.User.Interfaces, so a change to Grav.Common.User.Interfaces can break Grav.Framework.Form, while a change to Grav.Framework.Form can't break Grav.Common.User.Interfaces.
Position
Below the diagonal: Grav.Framework.Form uses a module listed above it, which is the healthy direction.
Grav.Framework.Form uses Grav.Framework.Form.Interfaces, so a change to Grav.Framework.Form.Interfaces can break Grav.Framework.Form, while a change to Grav.Framework.Form can't break Grav.Framework.Form.Interfaces.
Position
Below the diagonal: Grav.Framework.Form uses a module listed above it, which is the healthy direction.
Grav.Common.Twig.Extension uses Grav.Common.Page.Interfaces, so a change to Grav.Common.Page.Interfaces can break Grav.Common.Twig.Extension, while a change to Grav.Common.Twig.Extension can't break Grav.Common.Page.Interfaces.
Position
Below the diagonal: Grav.Common.Twig.Extension uses a module listed above it, which is the healthy direction.
Grav.Common.Twig.Extension uses Grav.Common.Twig.Sandbox, so a change to Grav.Common.Twig.Sandbox can break Grav.Common.Twig.Extension, while a change to Grav.Common.Twig.Extension can't break Grav.Common.Twig.Sandbox.
Position
Below the diagonal: Grav.Common.Twig.Extension uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex uses Grav.Framework.Object.Interfaces, so a change to Grav.Framework.Object.Interfaces can break Grav.Framework.Flex, while a change to Grav.Framework.Flex can't break Grav.Framework.Object.Interfaces.
Position
Below the diagonal: Grav.Framework.Flex uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex uses Grav.Framework.Object, so a change to Grav.Framework.Object can break Grav.Framework.Flex, while a change to Grav.Framework.Flex can't break Grav.Framework.Object.
Position
Below the diagonal: Grav.Framework.Flex uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex uses Grav.Framework.Route, so a change to Grav.Framework.Route can break Grav.Framework.Flex, while a change to Grav.Framework.Flex can't break Grav.Framework.Route.
Position
Below the diagonal: Grav.Framework.Flex uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex uses Grav.Common.User.Interfaces, so a change to Grav.Common.User.Interfaces can break Grav.Framework.Flex, while a change to Grav.Framework.Flex can't break Grav.Common.User.Interfaces.
Position
Below the diagonal: Grav.Framework.Flex uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex uses Grav.Common.Data, so a change to Grav.Common.Data can break Grav.Framework.Flex, while a change to Grav.Framework.Flex can't break Grav.Common.Data.
Position
Below the diagonal: Grav.Framework.Flex uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex uses Grav.Framework.Flex.Interfaces, so a change to Grav.Framework.Flex.Interfaces can break Grav.Framework.Flex, while a change to Grav.Framework.Flex can't break Grav.Framework.Flex.Interfaces.
Position
Below the diagonal: Grav.Framework.Flex uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex uses Grav.Framework.Form, so a change to Grav.Framework.Form can break Grav.Framework.Flex, while a change to Grav.Framework.Flex can't break Grav.Framework.Form.
Position
Below the diagonal: Grav.Framework.Flex uses a module listed above it, which is the healthy direction.
Grav.Common.Flex uses Grav.Common.Media.Interfaces, so a change to Grav.Common.Media.Interfaces can break Grav.Common.Flex, while a change to Grav.Common.Flex can't break Grav.Common.Media.Interfaces.
Position
Below the diagonal: Grav.Common.Flex uses a module listed above it, which is the healthy direction.
Grav.Common.Flex uses Grav.Framework.Flex, so a change to Grav.Framework.Flex can break Grav.Common.Flex, while a change to Grav.Common.Flex can't break Grav.Framework.Flex.
Position
Below the diagonal: Grav.Common.Flex uses a module listed above it, which is the healthy direction.
Grav.Common.Twig uses Grav.Common.Page.Interfaces, so a change to Grav.Common.Page.Interfaces can break Grav.Common.Twig, while a change to Grav.Common.Twig can't break Grav.Common.Page.Interfaces.
Position
Below the diagonal: Grav.Common.Twig uses a module listed above it, which is the healthy direction.
Grav.Common.Twig uses Grav.Common.Twig.Sandbox, so a change to Grav.Common.Twig.Sandbox can break Grav.Common.Twig, while a change to Grav.Common.Twig can't break Grav.Common.Twig.Sandbox.
Position
Below the diagonal: Grav.Common.Twig uses a module listed above it, which is the healthy direction.
Grav.Common.Twig uses Grav.Common.Twig.Extension, so a change to Grav.Common.Twig.Extension can break Grav.Common.Twig, while a change to Grav.Common.Twig can't break Grav.Common.Twig.Extension.
Position
Below the diagonal: Grav.Common.Twig uses a module listed above it, which is the healthy direction.
25→32 Grav.Common.Twig uses Grav.Commonpart of a loop✕
Connections
1 pair of types, where a type in Grav.Common.Twig uses a type in Grav.Common.
The types involved
Grav.Common.Twig.Twig → Grav.Common.Grav
Direction
Grav.Common.Twig uses Grav.Common, so a change to Grav.Common can break Grav.Common.Twig, while a change to Grav.Common.Twig can't break Grav.Common.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Grav.Framework.Flex.Pages uses Grav.Common.Page.Interfaces, so a change to Grav.Common.Page.Interfaces can break Grav.Framework.Flex.Pages, while a change to Grav.Framework.Flex.Pages can't break Grav.Common.Page.Interfaces.
Position
Below the diagonal: Grav.Framework.Flex.Pages uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex.Pages uses Grav.Framework.Flex.Interfaces, so a change to Grav.Framework.Flex.Interfaces can break Grav.Framework.Flex.Pages, while a change to Grav.Framework.Flex.Pages can't break Grav.Framework.Flex.Interfaces.
Position
Below the diagonal: Grav.Framework.Flex.Pages uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex.Pages uses Grav.Framework.Flex, so a change to Grav.Framework.Flex can break Grav.Framework.Flex.Pages, while a change to Grav.Framework.Flex.Pages can't break Grav.Framework.Flex.
Position
Below the diagonal: Grav.Framework.Flex.Pages uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex.Traits uses Grav.Framework.Contracts.Relationships, so a change to Grav.Framework.Contracts.Relationships can break Grav.Framework.Flex.Traits, while a change to Grav.Framework.Flex.Traits can't break Grav.Framework.Contracts.Relationships.
Position
Below the diagonal: Grav.Framework.Flex.Traits uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex.Traits uses Grav.Framework.Media.Interfaces, so a change to Grav.Framework.Media.Interfaces can break Grav.Framework.Flex.Traits, while a change to Grav.Framework.Flex.Traits can't break Grav.Framework.Media.Interfaces.
Position
Below the diagonal: Grav.Framework.Flex.Traits uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex.Traits uses Grav.Common.Media.Interfaces, so a change to Grav.Common.Media.Interfaces can break Grav.Framework.Flex.Traits, while a change to Grav.Framework.Flex.Traits can't break Grav.Common.Media.Interfaces.
Position
Below the diagonal: Grav.Framework.Flex.Traits uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex.Traits uses Grav.Common.User.Interfaces, so a change to Grav.Common.User.Interfaces can break Grav.Framework.Flex.Traits, while a change to Grav.Framework.Flex.Traits can't break Grav.Common.User.Interfaces.
Position
Below the diagonal: Grav.Framework.Flex.Traits uses a module listed above it, which is the healthy direction.
Grav.Framework.Flex.Traits uses Grav.Framework.Flex, so a change to Grav.Framework.Flex can break Grav.Framework.Flex.Traits, while a change to Grav.Framework.Flex.Traits can't break Grav.Framework.Flex.
Position
Below the diagonal: Grav.Framework.Flex.Traits uses a module listed above it, which is the healthy direction.
Grav.Framework.Media uses Grav.Framework.Media.Interfaces, so a change to Grav.Framework.Media.Interfaces can break Grav.Framework.Media, while a change to Grav.Framework.Media can't break Grav.Framework.Media.Interfaces.
Position
Below the diagonal: Grav.Framework.Media uses a module listed above it, which is the healthy direction.
Grav.Framework.Media uses Grav.Framework.Flex.Interfaces, so a change to Grav.Framework.Flex.Interfaces can break Grav.Framework.Media, while a change to Grav.Framework.Media can't break Grav.Framework.Flex.Interfaces.
Position
Below the diagonal: Grav.Framework.Media uses a module listed above it, which is the healthy direction.
Grav.Framework.Media uses Grav.Framework.Flex, so a change to Grav.Framework.Flex can break Grav.Framework.Media, while a change to Grav.Framework.Media can't break Grav.Framework.Flex.
Position
Below the diagonal: Grav.Framework.Media uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.Pages uses Grav.Framework.Route, so a change to Grav.Framework.Route can break Grav.Common.Flex.Types.Pages, while a change to Grav.Common.Flex.Types.Pages can't break Grav.Framework.Route.
Position
Below the diagonal: Grav.Common.Flex.Types.Pages uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.Pages uses Grav.Common.Page.Interfaces, so a change to Grav.Common.Page.Interfaces can break Grav.Common.Flex.Types.Pages, while a change to Grav.Common.Flex.Types.Pages can't break Grav.Common.Page.Interfaces.
Position
Below the diagonal: Grav.Common.Flex.Types.Pages uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.Pages uses Grav.Common.User.Interfaces, so a change to Grav.Common.User.Interfaces can break Grav.Common.Flex.Types.Pages, while a change to Grav.Common.Flex.Types.Pages can't break Grav.Common.User.Interfaces.
Position
Below the diagonal: Grav.Common.Flex.Types.Pages uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.Pages uses Grav.Common.Data, so a change to Grav.Common.Data can break Grav.Common.Flex.Types.Pages, while a change to Grav.Common.Flex.Types.Pages can't break Grav.Common.Data.
Position
Below the diagonal: Grav.Common.Flex.Types.Pages uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.Pages uses Grav.Framework.Flex.Interfaces, so a change to Grav.Framework.Flex.Interfaces can break Grav.Common.Flex.Types.Pages, while a change to Grav.Common.Flex.Types.Pages can't break Grav.Framework.Flex.Interfaces.
Position
Below the diagonal: Grav.Common.Flex.Types.Pages uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.Pages uses Grav.Framework.Flex, so a change to Grav.Framework.Flex can break Grav.Common.Flex.Types.Pages, while a change to Grav.Common.Flex.Types.Pages can't break Grav.Framework.Flex.
Position
Below the diagonal: Grav.Common.Flex.Types.Pages uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.Pages uses Grav.Framework.Flex.Pages, so a change to Grav.Framework.Flex.Pages can break Grav.Common.Flex.Types.Pages, while a change to Grav.Common.Flex.Types.Pages can't break Grav.Framework.Flex.Pages.
Position
Below the diagonal: Grav.Common.Flex.Types.Pages uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.UserGroups uses Grav.Common.User.Interfaces, so a change to Grav.Common.User.Interfaces can break Grav.Common.Flex.Types.UserGroups, while a change to Grav.Common.Flex.Types.UserGroups can't break Grav.Common.User.Interfaces.
Position
Below the diagonal: Grav.Common.Flex.Types.UserGroups uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.UserGroups uses Grav.Common.User, so a change to Grav.Common.User can break Grav.Common.Flex.Types.UserGroups, while a change to Grav.Common.Flex.Types.UserGroups can't break Grav.Common.User.
Position
Below the diagonal: Grav.Common.Flex.Types.UserGroups uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.UserGroups uses Grav.Common.Flex, so a change to Grav.Common.Flex can break Grav.Common.Flex.Types.UserGroups, while a change to Grav.Common.Flex.Types.UserGroups can't break Grav.Common.Flex.
Position
Below the diagonal: Grav.Common.Flex.Types.UserGroups uses a module listed above it, which is the healthy direction.
Grav.Common.Page uses Grav.Common.Page.Medium, so a change to Grav.Common.Page.Medium can break Grav.Common.Page, while a change to Grav.Common.Page can't break Grav.Common.Page.Medium.
Position
Below the diagonal: Grav.Common.Page uses a module listed above it, which is the healthy direction.
Grav.Common.Page uses Grav.Common.Page.Interfaces, so a change to Grav.Common.Page.Interfaces can break Grav.Common.Page, while a change to Grav.Common.Page can't break Grav.Common.Page.Interfaces.
Position
Below the diagonal: Grav.Common.Page uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in Grav.Common.Page uses a type in Grav.Common.Config.
The types involved
Grav.Common.Page.Page → Grav.Common.Config.Config
Direction
Grav.Common.Page uses Grav.Common.Config, so a change to Grav.Common.Config can break Grav.Common.Page, while a change to Grav.Common.Page can't break Grav.Common.Config.
Position
Below the diagonal: Grav.Common.Page uses a module listed above it, which is the healthy direction.
Grav.Common.Page uses Grav.Framework.Flex, so a change to Grav.Framework.Flex can break Grav.Common.Page, while a change to Grav.Common.Page can't break Grav.Framework.Flex.
Position
Below the diagonal: Grav.Common.Page uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in Grav.Common.Page uses a type in Grav.Common.Twig.
The types involved
Grav.Common.Page.Page → Grav.Common.Twig.Twig
Direction
Grav.Common.Page uses Grav.Common.Twig, so a change to Grav.Common.Twig can break Grav.Common.Page, while a change to Grav.Common.Page can't break Grav.Common.Twig.
Position
Below the diagonal: Grav.Common.Page uses a module listed above it, which is the healthy direction.
31→32 Grav.Common.Page uses Grav.Commonpart of a loop✕
Connections
3 pairs of types, where a type in Grav.Common.Page uses a type in Grav.Common.
Grav.Common uses RocketTheme.Toolbox.Event, so a change to RocketTheme.Toolbox.Event can break Grav.Common, while a change to Grav.Common can't break RocketTheme.Toolbox.Event.
Position
Below the diagonal: Grav.Common uses a module listed above it, which is the healthy direction.
Grav.Common uses Grav.Framework.Object, so a change to Grav.Framework.Object can break Grav.Common, while a change to Grav.Common can't break Grav.Framework.Object.
Position
Below the diagonal: Grav.Common uses a module listed above it, which is the healthy direction.
Grav.Common uses Grav.Common.Page.Interfaces, so a change to Grav.Common.Page.Interfaces can break Grav.Common, while a change to Grav.Common can't break Grav.Common.Page.Interfaces.
Position
Below the diagonal: Grav.Common uses a module listed above it, which is the healthy direction.
4 pairs of types, where a type in Grav.Common uses a type in Grav.Common.Config.
The types involved
Grav.Common.Plugin → Grav.Common.Config.Config
Grav.Common.Security → Grav.Common.Config.Config
Grav.Common.Theme → Grav.Common.Config.Config
Grav.Common.Themes → Grav.Common.Config.Config
Direction
Grav.Common uses Grav.Common.Config, so a change to Grav.Common.Config can break Grav.Common, while a change to Grav.Common can't break Grav.Common.Config.
Position
Below the diagonal: Grav.Common uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.Users uses Grav.Framework.Contracts.Relationships, so a change to Grav.Framework.Contracts.Relationships can break Grav.Common.Flex.Types.Users, while a change to Grav.Common.Flex.Types.Users can't break Grav.Framework.Contracts.Relationships.
Position
Below the diagonal: Grav.Common.Flex.Types.Users uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.Users uses Grav.Common.User.Interfaces, so a change to Grav.Common.User.Interfaces can break Grav.Common.Flex.Types.Users, while a change to Grav.Common.Flex.Types.Users can't break Grav.Common.User.Interfaces.
Position
Below the diagonal: Grav.Common.Flex.Types.Users uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.Users uses Grav.Common.Data, so a change to Grav.Common.Data can break Grav.Common.Flex.Types.Users, while a change to Grav.Common.Flex.Types.Users can't break Grav.Common.Data.
Position
Below the diagonal: Grav.Common.Flex.Types.Users uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.Users uses Grav.Common.User, so a change to Grav.Common.User can break Grav.Common.Flex.Types.Users, while a change to Grav.Common.Flex.Types.Users can't break Grav.Common.User.
Position
Below the diagonal: Grav.Common.Flex.Types.Users uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.Users uses Grav.Framework.Flex.Interfaces, so a change to Grav.Framework.Flex.Interfaces can break Grav.Common.Flex.Types.Users, while a change to Grav.Common.Flex.Types.Users can't break Grav.Framework.Flex.Interfaces.
Position
Below the diagonal: Grav.Common.Flex.Types.Users uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.Users uses Grav.Framework.Flex, so a change to Grav.Framework.Flex can break Grav.Common.Flex.Types.Users, while a change to Grav.Common.Flex.Types.Users can't break Grav.Framework.Flex.
Position
Below the diagonal: Grav.Common.Flex.Types.Users uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.Users uses Grav.Common.Flex, so a change to Grav.Common.Flex can break Grav.Common.Flex.Types.Users, while a change to Grav.Common.Flex.Types.Users can't break Grav.Common.Flex.
Position
Below the diagonal: Grav.Common.Flex.Types.Users uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Types.Users uses Grav.Common.Flex.Types.UserGroups, so a change to Grav.Common.Flex.Types.UserGroups can break Grav.Common.Flex.Types.Users, while a change to Grav.Common.Flex.Types.Users can't break Grav.Common.Flex.Types.UserGroups.
Position
Below the diagonal: Grav.Common.Flex.Types.Users uses a module listed above it, which is the healthy direction.
Grav.Common.Assets uses Grav.Framework.Object, so a change to Grav.Framework.Object can break Grav.Common.Assets, while a change to Grav.Common.Assets can't break Grav.Framework.Object.
Position
Below the diagonal: Grav.Common.Assets uses a module listed above it, which is the healthy direction.
Grav.Common.Assets uses Grav.Common, so a change to Grav.Common can break Grav.Common.Assets, while a change to Grav.Common.Assets can't break Grav.Common.
Position
Below the diagonal: Grav.Common.Assets uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Traits uses Grav.Common.User.Interfaces, so a change to Grav.Common.User.Interfaces can break Grav.Common.Flex.Traits, while a change to Grav.Common.Flex.Traits can't break Grav.Common.User.Interfaces.
Position
Below the diagonal: Grav.Common.Flex.Traits uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Traits uses Grav.Framework.Flex, so a change to Grav.Framework.Flex can break Grav.Common.Flex.Traits, while a change to Grav.Common.Flex.Traits can't break Grav.Framework.Flex.
Position
Below the diagonal: Grav.Common.Flex.Traits uses a module listed above it, which is the healthy direction.
Grav.Common.Flex.Traits uses Grav.Common, so a change to Grav.Common can break Grav.Common.Flex.Traits, while a change to Grav.Common.Flex.Traits can't break Grav.Common.
Position
Below the diagonal: Grav.Common.Flex.Traits uses a module listed above it, which is the healthy direction.
Grav.Common.GPM.Common uses Grav.Common.Data, so a change to Grav.Common.Data can break Grav.Common.GPM.Common, while a change to Grav.Common.GPM.Common can't break Grav.Common.Data.
Position
Below the diagonal: Grav.Common.GPM.Common uses a module listed above it, which is the healthy direction.
Grav.Common.GPM.Common uses Grav.Common, so a change to Grav.Common can break Grav.Common.GPM.Common, while a change to Grav.Common.GPM.Common can't break Grav.Common.
Position
Below the diagonal: Grav.Common.GPM.Common uses a module listed above it, which is the healthy direction.
Grav.Common.Media.Traits uses Grav.Common.Language, so a change to Grav.Common.Language can break Grav.Common.Media.Traits, while a change to Grav.Common.Media.Traits can't break Grav.Common.Language.
Position
Below the diagonal: Grav.Common.Media.Traits uses a module listed above it, which is the healthy direction.
Grav.Common.Media.Traits uses Grav.Common.Media.Interfaces, so a change to Grav.Common.Media.Interfaces can break Grav.Common.Media.Traits, while a change to Grav.Common.Media.Traits can't break Grav.Common.Media.Interfaces.
Position
Below the diagonal: Grav.Common.Media.Traits uses a module listed above it, which is the healthy direction.
Grav.Common.Media.Traits uses Grav.Common.Config, so a change to Grav.Common.Config can break Grav.Common.Media.Traits, while a change to Grav.Common.Media.Traits can't break Grav.Common.Config.
Position
Below the diagonal: Grav.Common.Media.Traits uses a module listed above it, which is the healthy direction.
Grav.Common.Media.Traits uses Grav.Common, so a change to Grav.Common can break Grav.Common.Media.Traits, while a change to Grav.Common.Media.Traits can't break Grav.Common.
Position
Below the diagonal: Grav.Common.Media.Traits uses a module listed above it, which is the healthy direction.
Grav.Common.Processors uses Grav.Common.Config, so a change to Grav.Common.Config can break Grav.Common.Processors, while a change to Grav.Common.Processors can't break Grav.Common.Config.
Position
Below the diagonal: Grav.Common.Processors uses a module listed above it, which is the healthy direction.
Grav.Common.Processors uses Grav.Common.Page, so a change to Grav.Common.Page can break Grav.Common.Processors, while a change to Grav.Common.Processors can't break Grav.Common.Page.
Position
Below the diagonal: Grav.Common.Processors uses a module listed above it, which is the healthy direction.
Grav.Common.Processors uses Grav.Common, so a change to Grav.Common can break Grav.Common.Processors, while a change to Grav.Common.Processors can't break Grav.Common.
Position
Below the diagonal: Grav.Common.Processors uses a module listed above it, which is the healthy direction.
Grav.Common.Service uses Grav.Common.Config, so a change to Grav.Common.Config can break Grav.Common.Service, while a change to Grav.Common.Service can't break Grav.Common.Config.
Position
Below the diagonal: Grav.Common.Service uses a module listed above it, which is the healthy direction.
Grav.Common.Service uses Grav.Common, so a change to Grav.Common can break Grav.Common.Service, while a change to Grav.Common.Service can't break Grav.Common.
Position
Below the diagonal: Grav.Common.Service uses a module listed above it, which is the healthy direction.
Grav.Events uses RocketTheme.Toolbox.Event, so a change to RocketTheme.Toolbox.Event can break Grav.Events, while a change to Grav.Events can't break RocketTheme.Toolbox.Event.
Position
Below the diagonal: Grav.Events uses a module listed above it, which is the healthy direction.
Grav.Events uses Grav.Framework.Flex, so a change to Grav.Framework.Flex can break Grav.Events, while a change to Grav.Events can't break Grav.Framework.Flex.
Position
Below the diagonal: Grav.Events uses a module listed above it, which is the healthy direction.
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 category
Findings
Severity
A05:2025 — Injection
28
High / Critical
A03:2025 — Software Supply Chain Failures
8
High / Critical
A02:2025 — Security Misconfiguration
4
High / Critical
A07:2025 — Authentication Failures
3
High / Critical
Roadmap
Begin by addressing the 117 orphaned files in Knowledge Freshness, prioritizing PageTranslateTrait.php, Uri.php, and FlexForm.php, while simultaneously resolving the single gap in ADR Quality. Strengthen code reliability by raising static analysis to level 8 or stricter to enforce nullable reference types, generating a baseline to systematically fix existing nullness errors rather than silencing them. Finally, complete the architecture documentation by recording significant design decisions in the docs/adr folder and adding a high-level 'How it works' section to the root README.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.
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.
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 — 34
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 — 715
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 — 181
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 13
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
Watchdog 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. 57 of 60 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 60 dimensions across the health lenses
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
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, 905 of 930 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.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
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 — Watchdog 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. To have real coverage read, produce a coverage report in a standard format (Clover XML — with Xdebug (`XDEBUG_MODE=coverage`) or PCOV installed, `vendor/bin/phpunit --coverage-clover coverage.xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (Clover XML — with Xdebug (`XDEBUG_MODE=coverage`) or PCOV installed, `vendor/bin/phpunit --coverage-clover coverage.xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
D11 Test Reliability — not measured this run — Watchdog 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.
D22 Internal API Consistency — 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. This repository's source is written only in languages whose packages are published through a manifest, and no manifest in the tree makes a publication act: either there is no package manifest of any ecosystem (no package.json, pyproject.toml, setup.py, gemspec, Cargo.toml, pom.xml, build.gradle, composer.json, pubspec.yaml or mix.exs), or every one present declares in its package manager's own terms that it is not published (an npm package marked "private": true, a Cargo package with publish = false, a pubspec with publish_to: none, a Composer "project", a Poetry project with package-mode = false, or the "Private :: Do Not Upload" classifier). With no publication act there is no intentionally-exposed surface for API consistency to be judged over.
D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog 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. `system/src/Grav/Common/Assets.php`, `system/src/Grav/Common/Backup/Backups.php`, `system/src/Grav/Common/Cache.php`, `system/src/Grav/Common/Debugger.php`, `system/src/Grav/Common/File/CompiledFile.php`, … (+26 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.
AX1 Captive dependencies — not measured this run — Watchdog 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 Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository's container is Pimple and a PSR-11 container (Psr\Container) and an unrecognised PHP container, whose lifetimes are not modelled 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.
AX6 Interface segregation — not measured this run — Watchdog 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 — Watchdog 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 REDACTED (REDACTED). docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/bui…; runtime evidence skipped.
C1 Data Protection — not measured this run — Watchdog 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. 'PDO' is imported (system/src/Grav/Common/Page/PageIndexStore.php:135), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
C3 Audit Trail — not measured this run — Watchdog 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. 'PDO' is imported (system/src/Grav/Common/Page/PageIndexStore.php:135), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
C4 Data Retention — not measured this run — Watchdog 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. 'PDO' is imported (system/src/Grav/Common/Page/PageIndexStore.php:135), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
C5 Data-Subject Rights — not measured this run — Watchdog 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. 'PDO' is imported (system/src/Grav/Common/Page/PageIndexStore.php:135), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
GD1 Unfinished & placeholder code — not measured this run — Watchdog 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 this repository's PHP is most of its product and 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 — Watchdog 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 this repository's PHP is most of its product and 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.
X27 Collection changed while being enumerated — not measured this run — Watchdog 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.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED 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").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
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.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
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 is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
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").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
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.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
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.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
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.
The LLM boundary
LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
109 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Debugger.deprecatedErrorHandler at 54. 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 Installer.lastErrorMsg at 21 — they are counted neither in the figure above nor in this dimension's score.
+ 104 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 16 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with Debugger.deprecatedErrorHandler (cyclomatic 54), Pages.getCollection (cyclomatic 50), Page.header (cyclomatic 47). — 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 16 together lifts Cyclomatic Complexity from 6.6 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 224 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 17 bodies over 60 down to 60 or less in Cognitive Complexity — start with Scheduler.processJobsWithWorkers (cognitive 118), Debugger.deprecatedErrorHandler (cognitive 113), Page.header (cognitive 98). — 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 17 together lifts Cognitive Complexity from 3.3 to about 4.9/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.2 / 10Strong✓ 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.
Resolve the 32 TooManyMethods finding(s) in God Classes — start with Page.php, GravExtension.php, Pages.php. — One of this dimension's main actionable groups (32 warning-level).
Resolve the 17 ClassTooLong finding(s) in God Classes — start with Pages.php, Page.php, Utils.php. — One of this dimension's main actionable groups (17 warning-level).
Resolve the 13 MethodTooLong finding(s) in God Classes — start with Pages.php (2), SelfupgradeCommand.php (2), PageIndex.php. — One of this dimension's main actionable groups (13 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
124 duplicated block group(s) detected. A further 3 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 48 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 10 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with FlexDirectoryForm.php (3), ObjectCollectionTrait.php (2), Parsedown.php. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 9 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with GPM.php, TaskServiceProvider.php, Twig3CompatibilityTransformer.php. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 8 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with HtmlBlock.php (2), UserCollection.php, Grav.php. — One of this dimension's main actionable groups (8 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 20 Low cohesion finding(s) in Cohesion (LCOM4) — start with FlexPageObject.php, UserObject.php, ParsedownExtra.php. — One of this dimension's main actionable groups (20 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
8 outdated, 0 abandoned direct Composer dependencies. PLATFORM requirements (php, ext-*, lib-*) are deliberately not graded here: they name the runtime rather than a Packagist package, so there is no release for them to be behind — whether that runtime is still supported is a separate question with a separate remedy. Development requirements are excluded, because a consumer never installs them. A newer release is reported only where this repository's OWN constraint already admits it, so the remedy is `composer update` and never a manifest edit. Known CVEs in this dependency graph are D30's question.
Outdated: composer/ca-bundle · ×8
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 62 locked Composer package(s) use a banned license. Licences were read from this repository's REDACTED, which records the `license` each package declares, over every package in its production `packages` list, direct and transitive, at the locked version; the 48 package(s) under `packages-dev` are not installed for a consumer and are excluded.
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.
Top hotspots: system/src/Grav/Common/Page/Page.php (15×27=405); system/src/Grav/Common/Security.php (12×26=312); system/src/Grav/Common/Twig/Twig.php (9×34=306) Repeated repair below the complexity floor: system/src/Grav/Common/Processors/InitializeProcessor.php (3 of 5 changes were fixes); system/src/Grav/Common/Assets/BaseAsset.php (3 of 3 changes were fixes)
Resolve the 17 Hotspot finding(s) in Churn × Complexity Hotspots — start with Page.php, Security.php, Twig.php. — One of this dimension's main actionable groups (17 warning-level).
Resolve the 2 Repeated repair finding(s) in Churn × Complexity Hotspots — start with InitializeProcessor.php, BaseAsset.php. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor6.6 / 10Adequate✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
97 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is system/src/Grav/Common/Page/Pages.php. Counted over 287 of the 529 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
What to do
Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
76 deducted task-comment markers across 106674 LoC (0.1/KLoC) → score 9.9. 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.
Resolve the 55 TodoComment finding(s) in Explicit Debt — start with MediaUploadTrait.php (11), PageLegacyTrait.php (6), PageRoutableTrait.php (5). — One of this dimension's main actionable groups (55 warning-level).
Resolve the 19 FixmeComment finding(s) in Explicit Debt — start with UriTest.php (4), PageIndex.php (3), PageTranslateTrait.php (3). — One of this dimension's main actionable groups (19 warning-level).
Resolve the 2 HackComment finding(s) in Explicit Debt — start with PageTranslateTrait.php, UserObject.php. — One of this dimension's main actionable groups (2 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The repository's root README is clear and complete: it introduces Grav as a fast, simple, flexible file-based web platform with zero installation required, explains the package management system, and lists all the key technologies (Twig, Markdown, YAML, Parsedown, Symfony Cache, Pimple DI). The tests/conformance/README documents that directory's purpose without referencing the root README — it is an internal tier but does not contradict or depend on the root overview. Both are strong.
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
1 of 1 build units (Composer) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
21 % of calls cross a namespace and 0 % go through an interface, but 79 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED 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.
2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
28 finding(s): 0 critical, 27 high, 1 medium, 0 low. 13 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 49 file(s) — `system/languages/cs.yaml`, `system/languages/da.yaml`, `system/languages/eo.yaml`, `system/languages/fr.yaml`, `system/languages/he.yaml`, … (+44 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 4 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
REDACTED
REDACTED
REDACTED
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4), REDACTED, REDACTED. — One of this dimension's main actionable groups (7 issue-level).
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
No action in Static Analysis (SAST) — all 13 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 (13 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
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.
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.
120 of 287 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is system/src/Grav/Framework/Flex/FlexIndex.php. Counted over 287 of the 529 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 117 Orphaned file finding(s) in Knowledge Freshness — start with PageTranslateTrait.php (2), Uri.php (2), FlexForm.php. — One of this dimension's main actionable groups (117 recommendation-level).
Resolve the 3 Orphaned knowledge finding(s) in Knowledge Freshness — start with FlexIndex.php, FormTrait.php, FolderStorage.php. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 2 Change coupling finding(s) in Change Coupling — start with PageCollection.php, InfoCommand.php. — 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.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.
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.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 42 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.
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.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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.
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.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
177 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
What to do
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Review the README against recent changes; refresh the parts that drifted.
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.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
Consider OpenTelemetry tracing/metrics (opentelemetry-php) and a health-check endpoint (Laravel's /up health route or a /health route) for operability.
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
Your ecosystem's static analyzer is declared as a dependency but is not wired into CI — run it as a required step on push/PR (e.g. `composer phpstan` / `mix sobelow` / `bundle exec brakeman` / the spotbugs Gradle task / `sbt scalafixAll --check` / `golangci-lint run` / `rebar3 lint`) so a regression fails the build instead of relying on someone running it locally.
Dependabot is configured but does not watch `composer` — add that `package-ecosystem` entry to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
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.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`new CurlHttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — system/src/Grav/Common/HTTP/Client.php:47
`new NativeHttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — system/src/Grav/Common/HTTP/Client.php:48
`HttpClient::create(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — system/src/Grav/Common/HTTP/Client.php:49
`->request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — system/src/Grav/Common/HTTP/Response.php:80
What to do
Give every client an explicit bound: `new Client(['timeout' => 10, 'connect_timeout' => 3])` for Guzzle (whose default is to wait forever), `CURLOPT_TIMEOUT`/`CURLOPT_CONNECTTIMEOUT` before `curl_exec`, `timeout`/`max_duration` on Symfony HttpClient (or `framework.http_client.default_options`), and a stream-context `timeout` or `connection_timeout` for `file_get_contents`/`SoapClient`. In Drupal, use the `http_client` service, which carries core's site-wide timeout, rather than `new Client()`. Add retries with back-off (Guzzle `Middleware::retry`, Symfony `RetryableHttpClient`, Laravel `->retry()`) around dependencies that fail.
Other · Security — Only what this repository's own non-C# files could be read for was assessed — and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `nginx.conf` is committed to this repository and declares the server that serves it, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.) — webserver-configs/nginx.conf:1
What to do
Set security response headers on the surface this repository serves: an `add_header` directive per header in the nginx/Caddy/Apache config, a `_headers` / `vercel.json` / `netlify.toml` entry for a static host, or `helmet()` in the HTTP server. `Content-Security-Policy` is the one that pays for itself first — it is what contains an injected script once one reaches the page — followed by `X-Content-Type-Options: nosniff` and a frame policy (`X-Frame-Options: DENY`, or CSP `frame-ancestors`). Where the app is served from a build container, the header configuration belongs in the image beside the built assets, so it ships with them rather than depending on where it lands.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. 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 `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
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.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
`backup` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `max_execution_time` ini setting (changed at line 246, put back at line 300) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path. — system/src/Grav/Common/Backup/Backups.php:221
`getExcerptFromHtml` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — libxml's internal-error mode (changed at line 90, put back at line 92) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path. — system/src/Grav/Common/Helpers/Excerpts.php:87
`processTag` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — libxml's internal-error mode (changed at line 287, put back at line 291) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path. — system/src/Grav/Common/Markdown/ParsedownExtra.php:280
`mainRegion` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — libxml's internal-error mode (changed at line 402, put back at line 405) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path. — system/src/Grav/Common/Page/Markdown/MarkdownOutput.php:395
`writeCacheFile` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the process umask (changed at line 46, put back at line 48) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path. — system/src/Grav/Common/Twig/WriteCacheFileTrait.php:33
`decode` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `yaml.decode_php` ini setting (changed at line 108, put back at line 111) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path. — system/src/Grav/Framework/File/Formatter/YamlFormatter.php:102
What to do
Each finding names the statement that changes the process-global value and the statement that puts it back. Confirm from the two that nothing between them is protected — then prefer removing the mutation over widening the restore: a working directory or an environment variable passed to the operation that needs it (the `cwd` and `env` options of `child_process`, or of `Deno.Command`) is scoped to that operation, which is what the save-and-restore was trying to approximate. Where the global genuinely must move, a `try`/`finally` is the least that makes the restore unconditional. In PHP the same holds for `chdir`, `putenv`, `setlocale`, `date_default_timezone_set`, `ini_set` and the error-handler stack: pass the value to the operation (`Process` with `cwd`/`env`, an explicit `DateTimeZone`) or restore in a `finally`.
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.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. 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 `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped3.5 / 10Weak✓ Tool-verified
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
`route` carries text this program read out of a document — an attribute or a text node, which the DOM hands back already decoded, so an entity its author wrote is a live character again — and it is written straight into the `href` attribute of markup built here with nothing escaping it on the way. The value is chosen by whoever authored that document, not by this program, so it can close the attribute or element it sits in and open another — a crafted document becomes markup in what this code renders. Escape `route` at this site, or validate it against the shape the position accepts before interpolating it. — system/assets/debugger/clockwork.js:31
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
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.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
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 (\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. (×5) — system/src/Grav/Common/Utils.php:917, system/src/Grav/Common/Scheduler/Scheduler.php:538, system/src/Grav/Common/Scheduler/Scheduler.php:574, …
`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. (×8) — system/src/Grav/Common/Utils.php:1521, system/src/Grav/Common/Security.php:183, system/src/Grav/Common/Security.php:806, …
`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. (×9) — system/src/Grav/Common/Session.php:347, system/src/Grav/Common/Security.php:587, system/src/Grav/Common/Security.php:1205, …
`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. (×14) — system/src/Grav/Common/Debugger.php:415, system/src/Grav/Common/GPM/Licenses.php:268, system/src/Grav/Common/Page/PageIndexStore.php:142, …
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×4) — system/src/Grav/Common/GPM/GPM.php:641, system/src/Grav/Common/GPM/GPM.php:657, system/src/Grav/Common/HTTP/Response.php:76, …
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. 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 `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`debug` at line 390 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->debug('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::debug('order moved', ['order_id' => $orderId])` with Laravel's facade. — system/src/Grav/Common/Scheduler/Scheduler.php:390
`debug` at line 408 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->debug('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::debug('order moved', ['order_id' => $orderId])` with Laravel's facade. — system/src/Grav/Common/Scheduler/Scheduler.php:408
`warning` at line 462 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->warning('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::warning('order moved', ['order_id' => $orderId])` with Laravel's facade. — system/src/Grav/Common/Scheduler/Scheduler.php:462
`info` at line 464 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->info('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::info('order moved', ['order_id' => $orderId])` with Laravel's facade. — system/src/Grav/Common/Scheduler/Scheduler.php:464
`info` at line 1276 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->info('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::info('order moved', ['order_id' => $orderId])` with Laravel's facade. — system/src/Grav/Common/Scheduler/Scheduler.php:1276
`error` at line 1282 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->error('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::error('order moved', ['order_id' => $orderId])` with Laravel's facade. — system/src/Grav/Common/Scheduler/Scheduler.php:1282
`info` at line 1384 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->info('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::info('order moved', ['order_id' => $orderId])` with Laravel's facade. — system/src/Grav/Common/Scheduler/Scheduler.php:1384
`error` at line 1389 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->error('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::error('order moved', ['order_id' => $orderId])` with Laravel's facade. — system/src/Grav/Common/Scheduler/Scheduler.php:1389
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.
This repository commits no PHPStan or Psalm configuration (`phpstan.neon[.dist]`, `phpstan.dist.neon`, `psalm.xml[.dist]`, or one a composer.json script names with `--configuration`), so nothing checks null: a `?Customer` reaches `->name()` silently and throws `Error: Call to a member function name() on null` the first time it is null. If the build passes a level on a command line instead, put it in a committed configuration — this check reads configuration, and configuration is all it can read.
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.
Do you agree with this assessment?
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.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 2 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 — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 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.
C3 Audit Trail — Not assessed: this repository stores data through 'PDO' (system/src/Grav/Common/Page/PageIndexStore.php:135) but declares no persisted model this check reads (Laravel migration columns, Eloquent $fillable/$hidden lists, Doctrine #[ORM\Column] properties). Personal data may be written through raw SQL or a hosted backend, so whether its changes need an audit trail could not be established, and the trail's absence is not scored.
C4 Data Retention — Not assessed: this repository stores data through 'PDO' (system/src/Grav/Common/Page/PageIndexStore.php:135) but declares no persisted model this check reads (Laravel migration columns, Eloquent $fillable/$hidden lists, Doctrine #[ORM\Column] properties). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
C5 Data-Subject Rights — Not assessed: this repository stores data through 'PDO' (system/src/Grav/Common/Page/PageIndexStore.php:135) but declares no persisted model this check reads (Laravel migration columns, Eloquent $fillable/$hidden lists, Doctrine #[ORM\Column] properties). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 53 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 — Frontend below the scale floor (23 DOM element(s) < 25) — too little surface to assess accessibility.
AC2 Forms & labels — Frontend below the scale floor (23 DOM element(s) < 25) — too little surface to assess accessibility.
AC3 Page structure — Frontend below the scale floor (23 DOM element(s) < 25) — too little surface to assess accessibility.
AC4 Keyboard semantics — Frontend below the scale floor (23 DOM element(s) < 25) — too little surface to assess accessibility.
AC5 ARIA correctness — Frontend below the scale floor (23 DOM element(s) < 25) — too little surface to assess accessibility.
AC6 Visual & motion safety — Frontend below the scale floor (23 DOM element(s) < 25) — too little surface to assess accessibility.
AC7 A11y enforcement — Frontend below the scale floor (23 DOM element(s) < 25) — too little surface to assess accessibility.
AX1 Captive dependencies — 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
AX2 Stateful singletons — Not applicable: PHP builds its object graph per request and shares none of it between requests. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
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 — docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/bui…; 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 — Not assessed: this repository stores data through 'PDO' (system/src/Grav/Common/Page/PageIndexStore.php:135) but declares no persisted model this check reads (Laravel migration columns, Eloquent $fillable/$hidden lists, Doctrine #[ORM\Column] properties). Personal data may be written through raw SQL or a hosted backend, so the absence of a personal-data field here is not evidence that none is stored, and encryption at rest is not scored over a subject that could not be established.
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.
D10 Test Quality — ~23583 lines of test source are present (.php) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — no .php test runner
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.
D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
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+ projects each declaring an entity of their own. 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 — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D32 Data Compliance (PII/GDPR) — 31 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
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.
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
D9 Test Distribution — Test source is present (.php) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 5 value object(s); 4 domain event(s); its domain events are published by services or handlers — no domain entity raises one
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
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'.
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 — no coverage report found on disk — produce a coverage report in a standard format (Clover XML — with Xdebug (`XDEBUG_MODE=coverage`) or PCOV installed, `vendor/bin/phpunit --coverage-clover coverage.xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
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 applicable: PHP runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
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.
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.
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. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no 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
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.
X6 Hand-rolled structured-format parsing — 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.
Orphaned knowledge system/src/Grav/Framework/Flex/FlexIndex.php:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge system/src/Grav/Framework/Form/Traits/FormTrait.php:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge system/src/Grav/Framework/Flex/Storage/FolderStorage.php:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
TodoComment system/src/Grav/Common/Debugger.php:1144— // TODO: remove when upgrading to Twig 2+ — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Data/BlueprintSchema.php:381— // TODO: Add support to collections. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Data/BlueprintSchema.php:448— // TODO: We need better overridable support, which is not just ignoring required values but also looking if defaults are good. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Flex/Types/Pages/PageObject.php:144— // TODO: this should not be template! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Flex/Types/Pages/PageObject.php:227— // TODO: make sure that the page doesn't exist yet if moved/copied. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Flex/Types/Pages/PageObject.php:536— // TODO: We need to move raw blueprint logic to Grav itself to remove admin dependency here. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:92— // TODO: Following check flex index to be out of sync after some saves, disabled until better solution is found. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Flex/Types/Users/UserIndex.php:47— // TODO: Following check flex index to be out of sync after some saves, disabled until better solution is found. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:652— // TODO: all these features are independent from each other, we cannot just have one icon/color to catch all. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:653— // TODO: maybe icon by home/modular/page/folder (or even from blueprints) and color by visibility etc.. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:663— // TODO: add support — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Flex/Types/Users/UserObject.php:610— // TODO: We may want to handle this in the storage layer in the future. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:177— // TODO: use own language string — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:215— // TODO: translate — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:224— // TODO: translate — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:303— // TODO: This overrides metadata if used with multiple retina image sizes. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:318— // TODO: This overrides existing media sizes if used with multiple retina image sizes. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:394— // TODO: translate error message — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:400— // TODO: translate error message — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:534— // TODO: translate error message — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:540— // TODO: translate error message — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:548— // TODO: translate error message — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:544— // TODO: Add missing logic to handle retina files. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Page/Pages.php:1962— // TODO: right now we are just emulating normal pages, it is inefficient and bad... but works! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment system/src/Grav/Common/Page/Pages.php:2019— // TODO: Deprecated, only used in 1.7 betas. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Swallowed exception (caught, then discarded) system/src/Grav/Common/Utils.php:917— `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) system/src/Grav/Common/Utils.php:1521— `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) system/src/Grav/Common/Session.php:347— `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) system/src/Grav/Common/Security.php:183— `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) system/src/Grav/Common/Security.php:587— `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) system/src/Grav/Common/Security.php:806— `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) system/src/Grav/Common/Security.php:842— `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) system/src/Grav/Common/Security.php:984— `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) system/src/Grav/Common/Security.php:1205— `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) system/src/Grav/Common/Security.php:1321— `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) system/src/Grav/Common/Security.php:1530— `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) system/src/Grav/Common/Security.php:1556— `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) system/src/Grav/Common/Security.php:1648— `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) system/src/Grav/Common/Security.php:1701— `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) system/src/Grav/Common/Security.php:1942— `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) system/src/Grav/Common/Debugger.php:415— `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) system/src/Grav/Common/Data/Blueprint.php:400— `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) system/src/Grav/Common/GPM/Licenses.php:268— `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) system/src/Grav/Common/Page/PageIndexStore.php:142— `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) system/src/Grav/Common/Page/PageIndexStore.php:199— `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) system/src/Grav/Common/Page/PageIndexStore.php:286— `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) system/src/Grav/Common/Page/PageIndexStore.php:305— `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) system/src/Grav/Common/Page/PageIndexStore.php:326— `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) system/src/Grav/Common/Page/PageIndexStore.php:374— `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) system/src/Grav/Common/Page/PageIndexStore.php:400— `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.
TooManyMethods: Page system/src/Grav/Common/Page/Page.php:56— TooManyMethods — 136 methods. The bar is 30 methods; this is 106 over it, 4.53× 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: GravExtension system/src/Grav/Common/Twig/Extension/GravExtension.php:77— TooManyMethods — 102 methods. The bar is 30 methods; this is 72 over it, 3.40× 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: Pages system/src/Grav/Common/Page/Pages.php:59— TooManyMethods — 87 methods. The bar is 30 methods; this is 57 over it, 2.90× 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: Utils system/src/Grav/Common/Utils.php:52— TooManyMethods — 80 methods. The bar is 30 methods; this is 50 over it, 2.67× 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: Validation system/src/Grav/Common/Data/Validation.php:37— TooManyMethods — 69 methods. The bar is 30 methods; this is 39 over it, 2.30× 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: Job system/src/Grav/Common/Scheduler/Job.php:33— TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× 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: FlexObject system/src/Grav/Framework/Flex/FlexObject.php:54— TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× 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: GPM system/src/Grav/Common/GPM/GPM.php:34— TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.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: Uri system/src/Grav/Common/Uri.php:33— TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.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.
TooManyMethods: FormTrait system/src/Grav/Framework/Form/Traits/FormTrait.php:46— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× 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: PageLegacyTrait system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php:44— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× 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: Scheduler system/src/Grav/Common/Scheduler/Scheduler.php:33— TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× 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: PageIndex system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:51— TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× 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: FlexIndex system/src/Grav/Framework/Flex/FlexIndex.php:44— TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× 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: FlexDirectory system/src/Grav/Framework/Flex/FlexDirectory.php:51— TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× 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: AbstractIndexCollection system/src/Grav/Framework/Collection/AbstractIndexCollection.php:29— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× 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: UserObject system/src/Grav/Common/Flex/Types/Users/UserObject.php:73— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× 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: Security system/src/Grav/Common/Security.php:75— TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× 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: Collection system/src/Grav/Common/Page/Collection.php:32— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. Most of these members implement Interfaces.PageCollectionInterface (30 of 42 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: Install system/src/Grav/Installer/Install.php:50— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× 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: Debugger system/src/Grav/Common/Debugger.php:66— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× 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: PageCollection system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:53— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× 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: FlexCollection system/src/Grav/Framework/Flex/FlexCollection.php:45— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× 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: PageContentTrait system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php:35— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× 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: MediaObjectTrait system/src/Grav/Common/Media/Traits/MediaObjectTrait.php:31— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× 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.
Low cohesion: FlexPageObject (LCOM4 15) system/src/Grav/Framework/Flex/Pages/FlexPageObject.php:37— FlexPageObject's methods fall into 15 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 15 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: UserObject (LCOM4 9) system/src/Grav/Common/Flex/Types/Users/UserObject.php:73— UserObject's methods fall into 9 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 9 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: ParsedownExtra (LCOM4 9) system/src/Grav/Common/Markdown/ParsedownExtra.php:22— ParsedownExtra's methods fall into 9 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 9 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: Blueprint (LCOM4 8) system/src/Grav/Common/Data/Blueprint.php:36— Blueprint's methods fall into 8 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 8 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: Grav (LCOM4 8) system/src/Grav/Common/Grav.php:81— Grav's methods fall into 8 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 8 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: FlexObject (LCOM4 8) system/src/Grav/Framework/Flex/FlexObject.php:54— FlexObject's methods fall into 8 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 8 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: Parsedown (LCOM4 6) system/src/Grav/Common/Markdown/Parsedown.php:19— Parsedown's methods fall into 6 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 6 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: AbstractFilesystemStorage (LCOM4 6) system/src/Grav/Framework/Flex/Storage/AbstractFilesystemStorage.php:31— AbstractFilesystemStorage's methods fall into 6 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 6 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: PageStorage (LCOM4 5) system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php:33— PageStorage'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: Page (LCOM4 5) system/src/Grav/Common/Page/Page.php:56— Page'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: Plugins (LCOM4 5) system/src/Grav/Common/Plugins.php:30— Plugins'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: LazyObject (LCOM4 5) system/src/Grav/Framework/Object/LazyObject.php:27— LazyObject'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: Languages (LCOM4 4) system/src/Grav/Common/Config/Languages.php:30— Languages'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.
Low cohesion: Scheduler (LCOM4 4) system/src/Grav/Common/Scheduler/Scheduler.php:33— Scheduler'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.
Low cohesion: Uri (LCOM4 4) system/src/Grav/Common/Uri.php:33— Uri'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.
Low cohesion: ConsoleCommand (LCOM4 4) system/src/Grav/Console/ConsoleCommand.php:20— ConsoleCommand'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.
Low cohesion: GpmCommand (LCOM4 4) system/src/Grav/Console/GpmCommand.php:22— GpmCommand'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.
Low cohesion: GravCommand (LCOM4 4) system/src/Grav/Console/GravCommand.php:20— GravCommand'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.
Low cohesion: FlexDirectoryForm (LCOM4 4) system/src/Grav/Framework/Flex/FlexDirectoryForm.php:36— FlexDirectoryForm'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.
Low cohesion: FlexForm (LCOM4 4) system/src/Grav/Framework/Flex/FlexForm.php:37— FlexForm'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.
FixmeComment system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:584— // FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:586— // FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:599— // FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:162— // FIXME: support other keys. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:209— // FIXME: this method does not rewind the internal pointer! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment system/src/Grav/Common/Flex/Types/Pages/Traits/PageTranslateTrait.php:77— // FIXME: use flex, also rawRoute() does not fully work? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment system/src/Grav/Common/Flex/Types/Pages/Traits/PageRoutableTrait.php:54— // FIXME: this does not work, needs to use $pages->get() with cached parent id! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment system/src/Grav/Common/Page/Pages.php:2042— // FIXME: ... better... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment system/src/Grav/Common/Processors/InitializeProcessor.php:548— // FIXME: Initialize session should happen later after plugins have been loaded. This is a workaround to fix session issues in AWS. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment system/src/Grav/Framework/Flex/FlexObject.php:778— // FIXME: For some reason locator caching isn't cleared for the file, investigate! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment system/src/Grav/Framework/Flex/Pages/Traits/PageTranslateTrait.php:159— // FIXME: only published is not implemented... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment system/src/Grav/Framework/Flex/Pages/Traits/PageTranslateTrait.php:181— // FIXME: only published is not implemented... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment system/src/Grav/Framework/Media/MediaObject.php:123— // FIXME: This only works for images — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/unit/Grav/Common/UtilsTest.php:505— // FIXME <- — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/unit/Grav/Common/UriTest.php:294— // FIXME <- — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/unit/Grav/Common/UriTest.php:719— // FIXME <- — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/unit/Grav/Common/UtilsTest.php:581— // self::assertSame('mailto:joe@domain.com', Utils::url('mailto:joe@domain.com', true)); // FIXME <- — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/unit/Grav/Common/UriTest.php:718— //'addNonce' => '%22%3E%3Cscript%3Ealert%3C/localhost/script%3E:/nonce:{{nonce}}', // FIXME <- — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Hotspot: system/src/Grav/Common/Page/Page.php system/src/Grav/Common/Page/Page.php:943— system/src/Grav/Common/Page/Page.php changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in Page.content at line 943. 4 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/Page/Page.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.
Hotspot: system/src/Grav/Common/Security.php system/src/Grav/Common/Security.php:239— system/src/Grav/Common/Security.php changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in Security.detectXss at line 239. 5 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/Security.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.
Hotspot: system/src/Grav/Common/Twig/Twig.php system/src/Grav/Common/Twig/Twig.php:129— system/src/Grav/Common/Twig/Twig.php changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in Twig.init at line 129. 1 of those changes was a fix/bug commit, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/Twig/Twig.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.
Hotspot: system/src/Grav/Common/Grav.php system/src/Grav/Common/Grav.php:962— system/src/Grav/Common/Grav.php changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in Grav.fallbackUrl at line 962. 3 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/Grav.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.
Hotspot: system/src/Grav/Common/Page/Pages.php system/src/Grav/Common/Page/Pages.php:2518— system/src/Grav/Common/Page/Pages.php changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in Pages.recurse at line 2518. 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-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/Page/Pages.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.
Hotspot: system/src/Grav/Common/Scheduler/Scheduler.php system/src/Grav/Common/Scheduler/Scheduler.php:369— system/src/Grav/Common/Scheduler/Scheduler.php changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in Scheduler.runJobs at line 369. 3 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/Scheduler/Scheduler.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.
Hotspot: system/src/Grav/Common/Debugger.php system/src/Grav/Common/Debugger.php:353— system/src/Grav/Common/Debugger.php changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in Debugger.debuggerRequest at line 353. 3 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/Debugger.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.
Hotspot: system/src/Grav/Common/File/CompiledFile.php system/src/Grav/Common/File/CompiledFile.php:34— system/src/Grav/Common/File/CompiledFile.php changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in CompiledFile.content at line 34. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/File/CompiledFile.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.
Hotspot: system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php:675— system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in PageContentTrait.processContent at line 675. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.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.
Hotspot: system/src/Grav/Common/Media/Traits/ImageMediaTrait.php system/src/Grav/Common/Media/Traits/ImageMediaTrait.php:551— system/src/Grav/Common/Media/Traits/ImageMediaTrait.php changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in ImageMediaTrait.saveImage at line 551. 3 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/Media/Traits/ImageMediaTrait.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.
Hotspot: system/src/Grav/Common/GPM/GPM.php system/src/Grav/Common/GPM/GPM.php:1150— system/src/Grav/Common/GPM/GPM.php changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in GPM.getDependencies at line 1150. 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-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/GPM/GPM.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.
Hotspot: system/src/Grav/Common/Service/PagesServiceProvider.php system/src/Grav/Common/Service/PagesServiceProvider.php:34— system/src/Grav/Common/Service/PagesServiceProvider.php changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in PagesServiceProvider.register at line 34. 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-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/Service/PagesServiceProvider.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.
Hotspot: system/src/Grav/Common/Uri.php system/src/Grav/Common/Uri.php:707— system/src/Grav/Common/Uri.php changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in Uri.ip at line 707. 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-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/Uri.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.
Hotspot: system/src/Grav/Common/GPM/Installer.php system/src/Grav/Common/GPM/Installer.php:186— system/src/Grav/Common/GPM/Installer.php changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in Installer.unZip at line 186. 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-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/GPM/Installer.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.
Hotspot: system/src/Grav/Console/Cli/SchedulerCommand.php system/src/Grav/Console/Cli/SchedulerCommand.php:78— system/src/Grav/Console/Cli/SchedulerCommand.php changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in SchedulerCommand.serve at line 78. 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-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Console/Cli/SchedulerCommand.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.
Hotspot: system/src/Grav/Common/Service/SessionServiceProvider.php system/src/Grav/Common/Service/SessionServiceProvider.php:33— system/src/Grav/Common/Service/SessionServiceProvider.php changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in SessionServiceProvider.register at line 33. 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-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/Service/SessionServiceProvider.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.
Hotspot: system/src/Grav/Framework/Flex/Pages/Traits/PageRoutableTrait.php system/src/Grav/Framework/Flex/Pages/Traits/PageRoutableTrait.php:126— system/src/Grav/Framework/Flex/Pages/Traits/PageRoutableTrait.php changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in PageRoutableTrait.url at line 126. 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-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Framework/Flex/Pages/Traits/PageRoutableTrait.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.
ClassTooLong: Pages system/src/Grav/Common/Page/Pages.php:59— ClassTooLong — 1437 significant lines (blank, comment-only and punctuation-only lines excluded), 87 methods. The bar is 400 significant lines; this is 1037 over it, 3.59× 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.
ClassTooLong: Page system/src/Grav/Common/Page/Page.php:56— ClassTooLong — 1253 significant lines (blank, comment-only and punctuation-only lines excluded), 136 methods. The bar is 400 significant lines; this is 853 over it, 3.13× 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.
ClassTooLong: Utils system/src/Grav/Common/Utils.php:52— ClassTooLong — 996 significant lines (blank, comment-only and punctuation-only lines excluded), 80 methods. The bar is 400 significant lines; this is 596 over it, 2.49× 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.
ClassTooLong: GravExtension system/src/Grav/Common/Twig/Extension/GravExtension.php:77— ClassTooLong — 767 significant lines (blank, comment-only and punctuation-only lines excluded), 102 methods. The bar is 400 significant lines; this is 367 over it, 1.92× 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.
ClassTooLong: Uri system/src/Grav/Common/Uri.php:33— ClassTooLong — 647 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. The bar is 400 significant lines; this is 247 over it, 1.62× 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.
ClassTooLong: Scheduler system/src/Grav/Common/Scheduler/Scheduler.php:33— ClassTooLong — 635 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods. The bar is 400 significant lines; this is 235 over it, 1.59× 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.
ClassTooLong: Debugger system/src/Grav/Common/Debugger.php:66— ClassTooLong — 630 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 230 over it, 1.58× 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.
ClassTooLong: Install system/src/Grav/Installer/Install.php:50— ClassTooLong — 625 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 225 over it, 1.56× 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.
ClassTooLong: GPM system/src/Grav/Common/GPM/GPM.php:34— ClassTooLong — 573 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 400 significant lines; this is 173 over it, 1.43× 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.
ClassTooLong: FlexDirectory system/src/Grav/Framework/Flex/FlexDirectory.php:51— ClassTooLong — 501 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 400 significant lines; this is 101 over it, 1.25× 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.
ClassTooLong: FlexObject system/src/Grav/Framework/Flex/FlexObject.php:54— ClassTooLong — 487 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods. The bar is 400 significant lines; this is 87 over it, 1.22× 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.
ClassTooLong: Validation system/src/Grav/Common/Data/Validation.php:37— ClassTooLong — 476 significant lines (blank, comment-only and punctuation-only lines excluded), 69 methods. The bar is 400 significant lines; this is 76 over it, 1.19× 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.
ClassTooLong: SelfupgradeCommand system/src/Grav/Console/Gpm/SelfupgradeCommand.php:36— ClassTooLong — 464 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 64 over it, 1.16× 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.
ClassTooLong: PageIndex system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:51— ClassTooLong — 454 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 400 significant lines; this is 54 over it, 1.14× 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.
ClassTooLong: Job system/src/Grav/Common/Scheduler/Job.php:33— ClassTooLong — 452 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods. The bar is 400 significant lines; this is 52 over it, 1.13× 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.
ClassTooLong: Installer system/src/Grav/Common/GPM/Installer.php:26— ClassTooLong — 447 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 47 over it, 1.12× 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.
ClassTooLong: InstallCommand system/src/Grav/Console/Gpm/InstallCommand.php:36— ClassTooLong — 404 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 4 over it, 1.01× 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.
MethodTooLong: PageIndex.getLevelListingRecurse system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:518— MethodTooLong — getLevelListingRecurse runs 149 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× 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.
MethodTooLong: DirectInstallCommand.serve system/src/Grav/Console/Gpm/DirectInstallCommand.php:71— MethodTooLong — serve runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× 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.
MethodTooLong: SchedulerCommand.serve system/src/Grav/Console/Cli/SchedulerCommand.php:78— MethodTooLong — serve runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× 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.
MethodTooLong: Debugger.deprecatedErrorHandler system/src/Grav/Common/Debugger.php:1124— MethodTooLong — deprecatedErrorHandler runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× 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.
MethodTooLong: Pages.getCollection system/src/Grav/Common/Page/Pages.php:686— MethodTooLong — getCollection runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× 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.
MethodTooLong: SelfupgradeCommand.handlePreflightReport system/src/Grav/Console/Gpm/SelfupgradeCommand.php:297— MethodTooLong — handlePreflightReport runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× 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.
MethodTooLong: Pages.buildSort system/src/Grav/Common/Page/Pages.php:2793— MethodTooLong — buildSort runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× 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.
MethodTooLong: Utils.isDangerousFunction system/src/Grav/Common/Utils.php:2160— MethodTooLong — isDangerousFunction runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× 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.
MethodTooLong: UpdateCommand.serve system/src/Grav/Console/Gpm/UpdateCommand.php:104— MethodTooLong — serve runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× 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.
MethodTooLong: InfoCommand.serve system/src/Grav/Console/Gpm/InfoCommand.php:63— MethodTooLong — serve runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× 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.
MethodTooLong: Page.header system/src/Grav/Common/Page/Page.php:566— MethodTooLong — header runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× 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.
MethodTooLong: SelfupgradeCommand.serve system/src/Grav/Console/Gpm/SelfupgradeCommand.php:108— MethodTooLong — serve runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× 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.
MethodTooLong: Twig.init system/src/Grav/Common/Twig/Twig.php:129— MethodTooLong — init runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× 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.
FileTooLong: Page/Pages.php system/src/Grav/Common/Page/Pages.php— FileTooLong — 1481 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Pages (59-3239). The bar is 500 significant lines; this is 981 over it, 2.96× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Page/Page.php system/src/Grav/Common/Page/Page.php— FileTooLong — 1293 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Page (56-3403). The bar is 500 significant lines; this is 793 over it, 2.59× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Common/Utils.php system/src/Grav/Common/Utils.php— FileTooLong — 1033 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: Utils (52-2417). The bar is 500 significant lines; this is 533 over it, 2.07× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Common/Security.php system/src/Grav/Common/Security.php— FileTooLong — 852 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 352 over it, 1.70× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Extension/GravExtension.php system/src/Grav/Common/Twig/Extension/GravExtension.php— FileTooLong — 829 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: GravExtension (77-2351). The bar is 500 significant lines; this is 329 over it, 1.66× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Common/Debugger.php system/src/Grav/Common/Debugger.php— FileTooLong — 681 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: Debugger (66-1454). The bar is 500 significant lines; this is 181 over it, 1.36× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Common/Uri.php system/src/Grav/Common/Uri.php— FileTooLong — 665 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Uri (33-1606). The bar is 500 significant lines; this is 165 over it, 1.33× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Installer/Install.php system/src/Grav/Installer/Install.php— FileTooLong — 659 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: Install (50-1252). The bar is 500 significant lines; this is 159 over it, 1.32× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Scheduler/Scheduler.php system/src/Grav/Common/Scheduler/Scheduler.php— FileTooLong — 653 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Scheduler (33-1659). The bar is 500 significant lines; this is 153 over it, 1.31× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: GPM/GPM.php system/src/Grav/Common/GPM/GPM.php— FileTooLong — 592 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: GPM (34-1591). The bar is 500 significant lines; this is 92 over it, 1.18× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Flex/FlexDirectory.php system/src/Grav/Framework/Flex/FlexDirectory.php— FileTooLong — 537 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: FlexDirectory (51-1265). The bar is 500 significant lines; this is 37 over it, 1.07× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Flex/FlexObject.php system/src/Grav/Framework/Flex/FlexObject.php— FileTooLong — 526 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: FlexObject (54-1277). The bar is 500 significant lines; this is 26 over it, 1.05× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
Duplicated block (8 lines × 2) system/src/Grav/Common/Markdown/Parsedown.php:32— system/src/Grav/Common/Markdown/Parsedown.php:32-39 | system/src/Grav/Common/Markdown/ParsedownExtra.php:72-79 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `system/src/Grav/Common/Markdown/ParsedownExtra.php:81` calls `__construct` and `system/src/Grav/Common/Markdown/Parsedown.php:41` does not — after which the two agree again for 2 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.
Duplicated block (8 lines × 2) system/src/Grav/Common/Flex/Types/Users/UserCollection.php:112— system/src/Grav/Common/Flex/Types/Users/UserCollection.php:112-119 | system/src/Grav/Common/Flex/Types/Users/UserIndex.php:117-124 — 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.
Duplicated block (8 lines × 2) system/src/Grav/Common/Flex/Types/Users/UserObject.php:368— system/src/Grav/Common/Flex/Types/Users/UserObject.php:368-375 | system/src/Grav/Common/User/DataUser/User.php:325-332 — 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 `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.
Duplicated block (8 lines × 2) system/src/Grav/Common/Page/Page.php:1730— system/src/Grav/Common/Page/Page.php:1730-1737 | system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php:372-379 — before extracting anything, compare `system/src/Grav/Common/Page/Page.php` and `system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 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.
Duplicated block (8 lines × 2) system/src/Grav/Framework/Flex/FlexDirectoryForm.php:183— system/src/Grav/Framework/Flex/FlexDirectoryForm.php:183-190 | system/src/Grav/Framework/Flex/FlexForm.php:226-233 — before extracting anything, compare `system/src/Grav/Framework/Flex/FlexDirectoryForm.php` and `system/src/Grav/Framework/Flex/FlexForm.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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. 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 (8 lines × 2) system/src/Grav/Framework/Flex/FlexDirectoryForm.php:363— system/src/Grav/Framework/Flex/FlexDirectoryForm.php:363-370 | system/src/Grav/Framework/Flex/FlexForm.php:449-456 — before extracting anything, compare `system/src/Grav/Framework/Flex/FlexDirectoryForm.php` and `system/src/Grav/Framework/Flex/FlexForm.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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.
Duplicated block (8 lines × 2) system/src/Grav/Framework/Flex/FlexDirectoryForm.php:393— system/src/Grav/Framework/Flex/FlexDirectoryForm.php:393-400 | system/src/Grav/Framework/Flex/FlexForm.php:479-486 — before extracting anything, compare `system/src/Grav/Framework/Flex/FlexDirectoryForm.php` and `system/src/Grav/Framework/Flex/FlexForm.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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.
Duplicated block (8 lines × 2) system/src/Grav/Framework/Object/Base/ObjectCollectionTrait.php:51— system/src/Grav/Framework/Object/Base/ObjectCollectionTrait.php:51-59 | system/src/Grav/Framework/Object/Base/ObjectTrait.php:45-52 — before extracting anything, compare `system/src/Grav/Framework/Object/Base/ObjectCollectionTrait.php` and `system/src/Grav/Framework/Object/Base/ObjectTrait.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 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 (8 lines × 2) system/src/Grav/Framework/Object/Base/ObjectCollectionTrait.php:222— system/src/Grav/Framework/Object/Base/ObjectCollectionTrait.php:222-229 | system/src/Grav/Framework/Object/ObjectIndex.php:190-197 — 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 (8 lines × 2) system/src/Grav/Framework/Object/Access/NestedPropertyCollectionTrait.php:27— system/src/Grav/Framework/Object/Access/NestedPropertyCollectionTrait.php:27-34 | system/src/Grav/Framework/Object/Base/ObjectCollectionTrait.php:264-271 — 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 (12 lines × 2) system/src/Grav/Common/GPM/GPM.php:119— system/src/Grav/Common/GPM/GPM.php:119-130 | system/src/Grav/Common/GPM/GPM.php:279-290 — 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 (12 lines × 2) system/src/Grav/Common/Service/TaskServiceProvider.php:29— system/src/Grav/Common/Service/TaskServiceProvider.php:29-40 | system/src/Grav/Common/Service/TaskServiceProvider.php:42-53 — 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 (12 lines × 2) system/src/Grav/Common/Twig/Compatibility/Twig3CompatibilityTransformer.php:96— system/src/Grav/Common/Twig/Compatibility/Twig3CompatibilityTransformer.php:96-107 | system/src/Grav/Common/Twig/Compatibility/Twig3CompatibilityTransformer.php:177-188 — 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 `system/src/Grav/Common/Twig/Compatibility/Twig3CompatibilityTransformer.php:96` 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 (12 lines × 2) system/src/Grav/Console/Gpm/InfoCommand.php:144— system/src/Grav/Console/Gpm/InfoCommand.php:144-155 | system/src/Grav/Console/Gpm/UpdateCommand.php:210-221 — 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 `system/src/Grav/Console/Gpm/InfoCommand.php:144` 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 (12 lines × 2) system/src/Grav/Framework/Flex/FlexCollection.php:371— system/src/Grav/Framework/Flex/FlexCollection.php:371-382 | system/src/Grav/Framework/Flex/FlexObject.php:545-556 — before extracting anything, compare `system/src/Grav/Framework/Flex/FlexCollection.php` and `system/src/Grav/Framework/Flex/FlexObject.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 121 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.
Duplicated block (12 lines × 2) system/src/Grav/Framework/Flex/FlexDirectory.php:975— system/src/Grav/Framework/Flex/FlexDirectory.php:975-986 | system/src/Grav/Framework/Flex/FlexDirectory.php:1019-1030 — 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 (12 lines × 2) system/src/Grav/Framework/Flex/Storage/FolderStorage.php:426— system/src/Grav/Framework/Flex/Storage/FolderStorage.php:426-437 | system/src/Grav/Framework/Flex/Storage/SimpleStorage.php:363-374 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `system/src/Grav/Framework/Flex/Storage/FolderStorage.php:420` calls `normalizeKey`, `assertValidKey` and `system/src/Grav/Framework/Flex/Storage/SimpleStorage.php:360` 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.
Duplicated block (12 lines × 2) system/src/Grav/Framework/Media/MediaObject.php:185— system/src/Grav/Framework/Media/MediaObject.php:185-196 | system/src/Grav/Framework/Media/UploadedMediaObject.php:127-138 — 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 (12 lines × 2) system/src/Grav/Installer/Versions.php:253— system/src/Grav/Installer/Versions.php:253-264 | system/src/Grav/Installer/YamlUpdater.php:404-415 — 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 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) system/src/Grav/Common/Flex/Types/Users/UserCollection.php:82— system/src/Grav/Common/Flex/Types/Users/UserCollection.php:82-90 | system/src/Grav/Common/Flex/Types/Users/UserIndex.php:136-144 — 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 `system/src/Grav/Common/Flex/Types/Users/UserCollection.php:82` 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 × 2) system/src/Grav/Common/Grav.php:323— system/src/Grav/Common/Grav.php:323-331 | system/src/Grav/Common/Grav.php:551-559 — 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 `system/src/Grav/Common/Grav.php:323` 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, `system/src/Grav/Common/Grav.php:564` calls `registerShutdown` and `system/src/Grav/Common/Grav.php:334` does not — after which the two agree again for 4 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.
Duplicated block (9 lines × 2) system/src/Grav/Framework/ContentBlock/HtmlBlock.php:161— system/src/Grav/Framework/ContentBlock/HtmlBlock.php:161-169 | system/src/Grav/Framework/ContentBlock/HtmlBlock.php:205-213 — 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 (9 lines × 2) system/src/Grav/Framework/ContentBlock/HtmlBlock.php:239— system/src/Grav/Framework/ContentBlock/HtmlBlock.php:239-247 | system/src/Grav/Framework/ContentBlock/HtmlBlock.php:281-289 — 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 (9 lines × 2) system/src/Grav/Framework/Flex/Storage/FolderStorage.php:496— system/src/Grav/Framework/Flex/Storage/FolderStorage.php:496-504 | system/src/Grav/Framework/Flex/Storage/FolderStorage.php:516-524 — 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 `system/src/Grav/Framework/Flex/Storage/FolderStorage.php:496` 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.
Duplicated block (9 lines × 2) system/src/DOMLettersIterator.php:42— system/src/DOMLettersIterator.php:42-50 | system/src/DOMWordsIterator.php:41-49 — 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 (9 lines × 2) system/src/Grav/Common/Page/Page.php:468— system/src/Grav/Common/Page/Page.php:468-476 | system/src/Grav/Framework/Flex/Pages/Traits/PageTranslateTrait.php:212-220 — 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 `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.
Duplicated block (9 lines × 2) system/src/Grav/Console/Gpm/InstallCommand.php:792— system/src/Grav/Console/Gpm/InstallCommand.php:792-800 | system/src/Grav/Console/Gpm/SelfupgradeCommand.php:591-599 — 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 (5 lines × 2) system/src/Grav/Common/Filesystem/ZipArchiver.php:127— system/src/Grav/Common/Filesystem/ZipArchiver.php:127-131 | system/src/Grav/Common/GPM/Installer.php:353-357 — 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 `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.
Duplicated block (5 lines × 2) system/src/Twig/DeferredExtension/DeferredNodeVisitor.php:37— system/src/Twig/DeferredExtension/DeferredNodeVisitor.php:37-41 | system/src/Twig/DeferredExtension/DeferredNodeVisitorCompat.php:49-53 — 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 `system/src/Twig/DeferredExtension/DeferredNodeVisitor.php:37` 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 (5 lines × 2) system/src/Grav/Common/Processors/ThemesProcessor.php:34— system/src/Grav/Common/Processors/ThemesProcessor.php:34-38 | system/src/Grav/Common/Processors/TwigProcessor.php:34-38 — 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.
Duplicated block (5 lines × 2) system/src/Grav/Framework/Flex/FlexCollection.php:601— system/src/Grav/Framework/Flex/FlexCollection.php:601-605 | system/src/Grav/Framework/Flex/FlexObject.php:1036-1040 — before extracting anything, compare `system/src/Grav/Framework/Flex/FlexCollection.php` and `system/src/Grav/Framework/Flex/FlexObject.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 121 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.
Duplicated block (5 lines × 2) system/src/Grav/Framework/Flex/FlexCollection.php:691— system/src/Grav/Framework/Flex/FlexCollection.php:691-695 | system/src/Grav/Framework/Flex/FlexIndex.php:920-924 — 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 (5 lines × 2) system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php:418— system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php:418-422 | system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php:699-703 — 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 (5 lines × 2) system/src/Grav/Common/Page/Page.php:1759— system/src/Grav/Common/Page/Page.php:1759-1763 | system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php:401-405 — before extracting anything, compare `system/src/Grav/Common/Page/Page.php` and `system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 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 (5 lines × 2) system/src/Grav/Common/Flex/Types/Pages/Traits/PageRoutableTrait.php:85— system/src/Grav/Common/Flex/Types/Pages/Traits/PageRoutableTrait.php:85-89 | system/src/Grav/Framework/Flex/Pages/Traits/PageRoutableTrait.php:503-507 — 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 `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.
Duplicated block (15 lines × 2) system/src/Grav/Common/Filesystem/Folder.php:39— system/src/Grav/Common/Filesystem/Folder.php:39-53 | system/src/Grav/Common/Filesystem/Folder.php:77-91 — 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 `system/src/Grav/Common/Filesystem/Folder.php:39` 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 (15 lines × 2) system/src/Grav/Common/Filesystem/ZipArchiver.php:289— system/src/Grav/Common/Filesystem/ZipArchiver.php:289-303 | system/src/Grav/Common/Filesystem/ZipArchiver.php:384-398 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `system/src/Grav/Common/Filesystem/ZipArchiver.php:305` calls `getArchiveFiles` and `system/src/Grav/Common/Filesystem/ZipArchiver.php:400` does not — after which the two agree again for 2 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.
Duplicated block (15 lines × 2) system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:350— system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:350-364 | system/src/Grav/Common/Page/Pages.php:2877-2891 — 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 `system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:350` 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 (15 lines × 2) system/src/Grav/Common/Flex/Types/Users/UserObject.php:996— system/src/Grav/Common/Flex/Types/Users/UserObject.php:996-1010 | system/src/Grav/Framework/Flex/Traits/FlexMediaTrait.php:490-504 — 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 (15 lines × 2) system/src/Grav/Common/Twig/Node/TwigNodeLink.php:98— system/src/Grav/Common/Twig/Node/TwigNodeLink.php:98-112 | system/src/Grav/Common/Twig/Node/TwigNodeStyle.php:98-112 — before extracting anything, compare `system/src/Grav/Common/Twig/Node/TwigNodeLink.php` and `system/src/Grav/Common/Twig/Node/TwigNodeStyle.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 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 `system/src/Grav/Common/Twig/Node/TwigNodeLink.php:98` 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 before the matched lines, `system/src/Grav/Common/Twig/Node/TwigNodeStyle.php:96` calls `hasNode` and `system/src/Grav/Common/Twig/Node/TwigNodeLink.php:96` does not — after which the two agree again for 4 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.
Duplicated block (15 lines × 2) system/src/Grav/Installer/Versions.php:275— system/src/Grav/Installer/Versions.php:275-289 | system/src/Grav/Installer/YamlUpdater.php:426-440 — 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) system/src/Grav/Common/Page/Page.php:3185— system/src/Grav/Common/Page/Page.php:3185-3199 | system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php:1066-1080 — before extracting anything, compare `system/src/Grav/Common/Page/Page.php` and `system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 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 (7 lines × 2) system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:713— system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:713-719 | system/src/Grav/Common/Page/Collection.php:725-731 — 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 `system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:713` 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 (7 lines × 2) system/src/Grav/Common/Page/Page.php:2225— system/src/Grav/Common/Page/Page.php:2225-2231 | system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php:660-666 — before extracting anything, compare `system/src/Grav/Common/Page/Page.php` and `system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 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 `system/src/Grav/Common/Page/Page.php:2225` 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 (7 lines × 2) system/src/Grav/Common/Scheduler/Cron.php:538— system/src/Grav/Common/Scheduler/Cron.php:538-544 | system/src/Grav/Common/Scheduler/Cron.php:546-552 — 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 `system/src/Grav/Common/Scheduler/Cron.php:538` 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 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 (7 lines × 2) system/src/Grav/Common/Config/Env.php:71— system/src/Grav/Common/Config/Env.php:71-77 | system/src/Grav/Common/Config/Setup.php:183-189 — 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 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 (7 lines × 2) system/src/Grav/Common/Flex/Types/Users/Storage/UserFileStorage.php:39— system/src/Grav/Common/Flex/Types/Users/Storage/UserFileStorage.php:39-45 | system/src/Grav/Common/Flex/Types/Users/Storage/UserFolderStorage.php:29-35 — 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 (7 lines × 2) system/src/Grav/Common/GPM/AbstractCollection.php:33— system/src/Grav/Common/GPM/AbstractCollection.php:33-39 | system/src/Grav/Common/GPM/Common/AbstractPackageCollection.php:42-48 — 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) system/src/Grav/Common/Flex/Types/Users/UserObject.php:852— system/src/Grav/Common/Flex/Types/Users/UserObject.php:852-859 | system/src/Grav/Common/User/DataUser/User.php:380-386 — 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 (16 lines × 2) system/src/Grav/Common/Data/Data.php:205— system/src/Grav/Common/Data/Data.php:205-220 | system/src/Grav/Common/Flex/Types/Users/UserObject.php:498-513 — 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 (16 lines × 2) system/src/Grav/Common/Form/FormFlash.php:54— system/src/Grav/Common/Form/FormFlash.php:54-69 | system/src/Grav/Common/Form/FormFlash.php:86-101 — 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 (16 lines × 2) system/src/Grav/Common/GPM/Remote/GravCore.php:83— system/src/Grav/Common/GPM/Remote/GravCore.php:83-98 | system/src/Grav/Common/GPM/Remote/Package.php:49-64 — 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 (16 lines × 2) system/src/Grav/Common/Service/ConfigServiceProvider.php:99— system/src/Grav/Common/Service/ConfigServiceProvider.php:99-114 | system/src/Grav/Common/Service/ConfigServiceProvider.php:141-156 — 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 `system/src/Grav/Common/Service/ConfigServiceProvider.php:99` 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 (16 lines × 2) system/src/Grav/Framework/Flex/FlexObject.php:786— system/src/Grav/Framework/Flex/FlexObject.php:786-801 | system/src/Grav/Framework/Flex/FlexObject.php:818-833 — 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 (16 lines × 2) system/src/Grav/Console/Cli/ComposerCommand.php:26— system/src/Grav/Console/Cli/ComposerCommand.php:26-41 | system/src/Grav/Console/Cli/LogViewerCommand.php:29-44 — 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. 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.
X19 · Unrestored process-global state· Process-global state is restored only on the happy path · ×6
Process-global state is restored only on the happy path system/src/Grav/Common/Backup/Backups.php:221— `backup` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `max_execution_time` ini setting (changed at line 246, put back at line 300) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path.
Process-global state is restored only on the happy path system/src/Grav/Common/Helpers/Excerpts.php:87— `getExcerptFromHtml` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — libxml's internal-error mode (changed at line 90, put back at line 92) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path.
Process-global state is restored only on the happy path system/src/Grav/Common/Markdown/ParsedownExtra.php:280— `processTag` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — libxml's internal-error mode (changed at line 287, put back at line 291) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path.
Process-global state is restored only on the happy path system/src/Grav/Common/Page/Markdown/MarkdownOutput.php:395— `mainRegion` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — libxml's internal-error mode (changed at line 402, put back at line 405) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path.
Process-global state is restored only on the happy path system/src/Grav/Common/Twig/WriteCacheFileTrait.php:33— `writeCacheFile` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the process umask (changed at line 46, put back at line 48) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path.
Process-global state is restored only on the happy path system/src/Grav/Framework/File/Formatter/YamlFormatter.php:102— `decode` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `yaml.decode_php` ini setting (changed at line 108, put back at line 111) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path.
Duplicated block (6 lines × 2) system/src/Grav/Common/Data/Blueprint.php:201— system/src/Grav/Common/Data/Blueprint.php:201-206 | system/src/Grav/Common/Page/Page.php:1510-1515 — 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 `system/src/Grav/Common/Data/Blueprint.php:201` 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 (6 lines × 2) system/src/Grav/Common/Uri.php:1070— system/src/Grav/Common/Uri.php:1070-1075 | system/src/Grav/Common/Uri.php:1592-1597 — 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 `system/src/Grav/Common/Uri.php:1070` 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 (6 lines × 2) system/src/Grav/Framework/Object/Base/ObjectCollectionTrait.php:174— system/src/Grav/Framework/Object/Base/ObjectCollectionTrait.php:174-179 | system/src/Grav/Framework/Object/Base/ObjectTrait.php:162-167 — before extracting anything, compare `system/src/Grav/Framework/Object/Base/ObjectCollectionTrait.php` and `system/src/Grav/Framework/Object/Base/ObjectTrait.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 (6 lines × 2) system/src/Grav/Framework/Relationships/ToManyRelationship.php:135— system/src/Grav/Framework/Relationships/ToManyRelationship.php:135-140 | system/src/Grav/Framework/Relationships/ToOneRelationship.php:110-115 — 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.
Duplicated block (6 lines × 2) system/src/Grav/Framework/Relationships/ToManyRelationship.php:252— system/src/Grav/Framework/Relationships/ToManyRelationship.php:252-257 | system/src/Grav/Framework/Relationships/ToOneRelationship.php:200-205 — 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 (17 lines × 2) system/src/Grav/Common/Page/Pages.php:1912— system/src/Grav/Common/Page/Pages.php:1912-1928 | system/src/Grav/Common/Service/AccountsServiceProvider.php:105-121 — 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 `system/src/Grav/Common/Page/Pages.php:1912` 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, `system/src/Grav/Common/Service/AccountsServiceProvider.php:122` calls `getFlexDirectory` and `system/src/Grav/Common/Page/Pages.php:1929` does not — after which the two agree again for 4 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.
Duplicated block (17 lines × 2) system/src/Grav/Common/Plugin.php:401— system/src/Grav/Common/Plugin.php:401-417 | system/src/Grav/Common/Theme.php:52-68 — 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 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 (17 lines × 2) system/src/Grav/Common/Twig/Node/TwigNodeScript.php:86— system/src/Grav/Common/Twig/Node/TwigNodeScript.php:86-102 | system/src/Grav/Common/Twig/Node/TwigNodeStyle.php:85-101 — before extracting anything, compare `system/src/Grav/Common/Twig/Node/TwigNodeScript.php` and `system/src/Grav/Common/Twig/Node/TwigNodeStyle.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 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 `system/src/Grav/Common/Twig/Node/TwigNodeScript.php:86` 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 (17 lines × 2) system/src/Grav/Installer/Versions.php:299— system/src/Grav/Installer/Versions.php:299-315 | system/src/Grav/Installer/YamlUpdater.php:450-466 — 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 (11 lines × 2) system/src/Grav/Common/Data/Data.php:108— system/src/Grav/Common/Data/Data.php:108-118 | system/src/Grav/Common/Flex/Types/Users/UserObject.php:431-441 — 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 `system/src/Grav/Common/Data/Data.php:108` 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 (11 lines × 2) system/src/Grav/Common/Flex/Traits/FlexCollectionTrait.php:39— system/src/Grav/Common/Flex/Traits/FlexCollectionTrait.php:39-49 | system/src/Grav/Common/Flex/Traits/FlexObjectTrait.php:50-60 — 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 `system/src/Grav/Common/Flex/Traits/FlexCollectionTrait.php:39` 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.
Duplicated block (11 lines × 2) system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:475— system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:475-485 | system/src/Grav/Framework/Flex/Pages/Traits/PageTranslateTrait.php:250-260 — 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) system/src/Grav/Console/Gpm/SelfupgradeCommand.php:110— system/src/Grav/Console/Gpm/SelfupgradeCommand.php:110-120 | system/src/Grav/Console/Gpm/UpdateCommand.php:106-116 — 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.
Outbound HTTP without resilience system/src/Grav/Common/HTTP/Client.php:47— `new CurlHttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience system/src/Grav/Common/HTTP/Client.php:48— `new NativeHttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience system/src/Grav/Common/HTTP/Client.php:49— `HttpClient::create(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience system/src/Grav/Common/HTTP/Response.php:80— `->request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Swallowed exception (empty catch) system/src/Grav/Common/GPM/GPM.php:641— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) system/src/Grav/Common/GPM/GPM.php:657— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) system/src/Grav/Common/HTTP/Response.php:76— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) system/src/Grav/Framework/Form/FormFlash.php:137— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Duplicated block (23 lines × 2) system/src/Grav/Common/Twig/Node/TwigNodeScript.php:55— system/src/Grav/Common/Twig/Node/TwigNodeScript.php:55-77 | system/src/Grav/Common/Twig/Node/TwigNodeStyle.php:54-76 — before extracting anything, compare `system/src/Grav/Common/Twig/Node/TwigNodeScript.php` and `system/src/Grav/Common/Twig/Node/TwigNodeStyle.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 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 `system/src/Grav/Common/Twig/Node/TwigNodeScript.php:55` 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 (23 lines × 2) system/src/Grav/Common/Uri.php:929— system/src/Grav/Common/Uri.php:929-951 | system/src/Grav/Common/Uri.php:1156-1178 — 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 `system/src/Grav/Common/Uri.php:929` 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 (23 lines × 2) system/src/Grav/Framework/Flex/FlexObject.php:875— system/src/Grav/Framework/Flex/FlexObject.php:875-897 | system/src/Grav/Framework/Form/Traits/FormTrait.php:226-248 — 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 (13 lines × 2) system/src/Grav/Common/Filesystem/Folder.php:467— system/src/Grav/Common/Filesystem/Folder.php:467-479 | system/src/Grav/Framework/Cache/Adapter/FileCache.php:260-272 — 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 (13 lines × 2) system/src/Grav/Common/Page/Medium/AbstractMedia.php:359— system/src/Grav/Common/Page/Medium/AbstractMedia.php:359-371 | system/src/Grav/Common/Page/Medium/AbstractMedia.php:467-479 — 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. 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 (13 lines × 2) system/src/Grav/Framework/Cache/CacheTrait.php:140— system/src/Grav/Framework/Cache/CacheTrait.php:140-152 | system/src/Grav/Framework/Cache/CacheTrait.php:216-228 — 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 `system/src/Grav/Framework/Cache/CacheTrait.php:140` 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 × 3) system/src/Grav/Common/Twig/Compatibility/Twig3CompatibilityTransformer.php:102— system/src/Grav/Common/Twig/Compatibility/Twig3CompatibilityTransformer.php:102-111 | system/src/Grav/Common/Twig/Compatibility/Twig3CompatibilityTransformer.php:127-136 | system/src/Grav/Common/Twig/Compatibility/Twig3CompatibilityTransformer.php:183-192 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `system/src/Grav/Common/Twig/Compatibility/Twig3CompatibilityTransformer.php:102` 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 × 3) system/src/Grav/Console/Gpm/IndexCommand.php:256— system/src/Grav/Console/Gpm/IndexCommand.php:256-265 | system/src/Grav/Console/Gpm/InfoCommand.php:146-155 | system/src/Grav/Console/Gpm/UpdateCommand.php:212-221 — 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.
Duplicated block (10 lines × 3) system/src/Grav/Framework/Flex/FlexCollection.php:131— system/src/Grav/Framework/Flex/FlexCollection.php:131-140 | system/src/Grav/Framework/Flex/FlexIndex.php:143-152 | system/src/Grav/Framework/Flex/FlexObject.php:164-173 — before extracting anything, compare `system/src/Grav/Framework/Flex/FlexCollection.php` and `system/src/Grav/Framework/Flex/FlexObject.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 121 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. 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.
Duplicated block (10 lines × 2) system/src/Grav/Common/Flex/Types/Pages/Traits/PageLegacyTrait.php:146— system/src/Grav/Common/Flex/Types/Pages/Traits/PageLegacyTrait.php:146-155 | system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php:999-1008 — 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 `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, `system/src/Grav/Common/Flex/Types/Pages/Traits/PageLegacyTrait.php:141` calls `isAdminPlugin`, `getInheritedParams` and `system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php:997` does not — after which the two agree again for 2 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.
Duplicated block (10 lines × 2) system/src/Grav/Installer/Install.php:1097— system/src/Grav/Installer/Install.php:1097-1106 | system/src/Grav/Installer/Install.php:1124-1133 — 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 `system/src/Grav/Installer/Install.php:1097` 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) system/src/Grav/Common/Media/Traits/ImageDecodingTrait.php:28— system/src/Grav/Common/Media/Traits/ImageDecodingTrait.php:28-37 | system/src/Grav/Common/Media/Traits/ImageFetchPriorityTrait.php:28-37 — 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.
Repeated repair: system/src/Grav/Common/Processors/InitializeProcessor.php system/src/Grav/Common/Processors/InitializeProcessor.php:168— system/src/Grav/Common/Processors/InitializeProcessor.php changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is InitializeProcessor.initializeConfig at line 168), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix GRAV_CONFIG env override gate to also check $_SERVER/$_ENV (#4286)”; “[bugfix] keep the custom base path when redirecting a trailing slash (#3822)”; “[bugfix] serve uncached instead of dying when a cache write fails (#4260)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/Processors/InitializeProcessor.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.
Repeated repair: system/src/Grav/Common/Assets/BaseAsset.php system/src/Grav/Common/Assets/BaseAsset.php:94— system/src/Grav/Common/Assets/BaseAsset.php changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is BaseAsset.init at line 94), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Follow-ups to the merged 2.0.20 bugfix PRs”; “fix: gate per-file mtime override on enable_asset_timestamp, correct pipeline comment (#4049)”; “fix: per-file mtime cache-busting for non-pipelined local assets (#4049)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 15:51:02 -06:00' --until='2026-10-22 15:51:02 -06:00' --full-history --no-merges -- system/src/Grav/Common/Assets/BaseAsset.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.
HackComment system/src/Grav/Common/Flex/Types/Pages/Traits/PageTranslateTrait.php:97— // Hack to get the same result as with old pages. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment system/src/Grav/Common/Flex/Types/Users/UserObject.php:802— // HACK: With folder storage we need to ignore the avatar destination. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
Change coupling: PageCollection.php ↔ PageIndex.php system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:1— `system/src/Grav/Common/Flex/Types/Pages/PageCollection.php` and `system/src/Grav/Common/Flex/Types/Pages/PageIndex.php` change together 66% of the time (19 of the 29 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 19 shared commits counted here, the most recent 3 are `3c83efd8` Add Collection::notOfType() to exclude page templates (#3910); `179dec4c` More phpstan fixes; `a57c18f6` Fixed some phpstan errors — run `git show` on any of them.
Change coupling: InfoCommand.php ↔ UpdateCommand.php system/src/Grav/Console/Gpm/InfoCommand.php:1— `system/src/Grav/Console/Gpm/InfoCommand.php` and `system/src/Grav/Console/Gpm/UpdateCommand.php` change together 50% of the time (8 of the 16 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 `31dc6831` Add 2.0 migration wizard, preflight, and compatibility flag extensions; `6324cca5` Recognize '2.0' in compatibility inference and CLI badges; `e460ed66` Add compatibility: blueprint support and preflight handling for 1.7→1… — run `git show` on any of them.
Duplicated block (24–25 lines × 2) system/src/DOMLettersIterator.php:103— system/src/DOMLettersIterator.php:103-127 | system/src/DOMWordsIterator.php:103-126 — 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 `system/src/DOMLettersIterator.php:103` 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 (24–25 lines × 2) system/src/Grav/Common/Filesystem/ZipArchiver.php:188— system/src/Grav/Common/Filesystem/ZipArchiver.php:188-212 | system/src/Grav/Common/GPM/Installer.php:379-402 — 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 `system/src/Grav/Common/Filesystem/ZipArchiver.php:188` 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 (25 lines × 2) system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:372— system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:372-396 | system/src/Grav/Common/Page/Pages.php:2903-2927 — 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 `system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:372` 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 (25 lines × 2) system/src/Grav/Common/Page/Medium/MediumFactory.php:59— system/src/Grav/Common/Page/Medium/MediumFactory.php:59-83 | system/src/Grav/Common/Page/Medium/MediumFactory.php:119-143 — 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 (24 lines × 2) system/src/Grav/Common/Flex/Types/Users/UserObject.php:903— system/src/Grav/Common/Flex/Types/Users/UserObject.php:903-926 | system/src/Grav/Framework/Flex/Traits/FlexMediaTrait.php:385-408 — 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 `system/src/Grav/Common/Flex/Types/Users/UserObject.php:903` 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 (24 lines × 2) system/src/Grav/Common/GPM/Installer.php:609— system/src/Grav/Common/GPM/Installer.php:609-632 | system/src/Grav/Installer/Install.php:450-473 — 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 (21 lines × 2) system/src/Grav/Framework/Flex/FlexCollection.php:614— system/src/Grav/Framework/Flex/FlexCollection.php:614-634 | system/src/Grav/Framework/Flex/FlexObject.php:1049-1069 — before extracting anything, compare `system/src/Grav/Framework/Flex/FlexCollection.php` and `system/src/Grav/Framework/Flex/FlexObject.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 121 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.
Duplicated block (21 lines × 2) system/src/Grav/Framework/Flex/FlexDirectoryForm.php:305— system/src/Grav/Framework/Flex/FlexDirectoryForm.php:305-325 | system/src/Grav/Framework/Flex/FlexForm.php:367-387 — before extracting anything, compare `system/src/Grav/Framework/Flex/FlexDirectoryForm.php` and `system/src/Grav/Framework/Flex/FlexForm.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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 `system/src/Grav/Framework/Flex/FlexDirectoryForm.php:305` 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 (20 lines × 2) system/src/Grav/Console/Gpm/InstallCommand.php:710— system/src/Grav/Console/Gpm/InstallCommand.php:710-729 | system/src/Grav/Console/Gpm/UninstallCommand.php:277-296 — 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 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 (20 lines × 2) system/src/Grav/Common/User/DataUser/User.php:353— system/src/Grav/Common/User/DataUser/User.php:353-372 | system/src/Grav/Framework/Flex/Storage/AbstractFilesystemStorage.php:224-243 — 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 (19 lines × 2) system/src/Grav/Common/Flex/Types/Users/UserObject.php:943— system/src/Grav/Common/Flex/Types/Users/UserObject.php:943-961 | system/src/Grav/Framework/Flex/Traits/FlexMediaTrait.php:412-430 — 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 `system/src/Grav/Common/Flex/Types/Users/UserObject.php:943` 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 (19 lines × 2) system/src/Grav/Common/Twig/TokenParser/TwigTokenParserScript.php:64— system/src/Grav/Common/Twig/TokenParser/TwigTokenParserScript.php:64-82 | system/src/Grav/Common/Twig/TokenParser/TwigTokenParserStyle.php:57-75 — before extracting anything, compare `system/src/Grav/Common/Twig/TokenParser/TwigTokenParserScript.php` and `system/src/Grav/Common/Twig/TokenParser/TwigTokenParserStyle.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 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.
Duplicated block (18 lines × 2) system/src/Grav/Framework/Flex/FlexDirectoryForm.php:156— system/src/Grav/Framework/Flex/FlexDirectoryForm.php:156-173 | system/src/Grav/Framework/Flex/FlexForm.php:199-216 — before extracting anything, compare `system/src/Grav/Framework/Flex/FlexDirectoryForm.php` and `system/src/Grav/Framework/Flex/FlexForm.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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. 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 (18 lines × 2) system/src/Grav/Framework/Flex/FlexDirectoryForm.php:269— system/src/Grav/Framework/Flex/FlexDirectoryForm.php:269-286 | system/src/Grav/Framework/Flex/FlexForm.php:320-337 — before extracting anything, compare `system/src/Grav/Framework/Flex/FlexDirectoryForm.php` and `system/src/Grav/Framework/Flex/FlexForm.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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.
Duplicated block (13–14 lines × 2) system/src/Grav/Common/Media/Traits/MediaObjectTrait.php:286— system/src/Grav/Common/Media/Traits/MediaObjectTrait.php:286-298 | system/src/Grav/Common/Media/Traits/MediaObjectTrait.php:306-319 — 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 `system/src/Grav/Common/Media/Traits/MediaObjectTrait.php:286` 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 (13–14 lines × 2) system/src/Grav/Common/Service/ConfigServiceProvider.php:355— system/src/Grav/Common/Service/ConfigServiceProvider.php:355-367 | system/src/Grav/Common/Service/ConfigServiceProvider.php:401-414 — 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 `system/src/Grav/Common/Service/ConfigServiceProvider.php:355` 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.
Debugger.deprecatedErrorHandler (cyclomatic 54) system/src/Grav/Common/Debugger.php:1124— Debugger.deprecatedErrorHandler has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Pages.getCollection (cyclomatic 50) system/src/Grav/Common/Page/Pages.php:686— Pages.getCollection has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Page.header (cyclomatic 47) system/src/Grav/Common/Page/Page.php:566— Page.header has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Pages.recurse (cyclomatic 44) system/src/Grav/Common/Page/Pages.php:2518— Pages.recurse has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Pages.buildSort (cyclomatic 44) system/src/Grav/Common/Page/Pages.php:2793— Pages.buildSort has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PageIndex.getLevelListingRecurse (cyclomatic 41) system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:518— PageIndex.getLevelListingRecurse has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Media.init (cyclomatic 38) system/src/Grav/Common/Page/Media.php:128— Media.init has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Pages.evaluate (cyclomatic 35) system/src/Grav/Common/Page/Pages.php:883— Pages.evaluate has cyclomatic complexity 35 (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.
Uri.convertUrl (cyclomatic 35) system/src/Grav/Common/Uri.php:874— Uri.convertUrl has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SchedulerCommand.serve (cyclomatic 35) system/src/Grav/Console/Cli/SchedulerCommand.php:78— SchedulerCommand.serve has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Scheduler.processJobsWithWorkers (cyclomatic 34) system/src/Grav/Common/Scheduler/Scheduler.php:1205— Scheduler.processJobsWithWorkers has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Twig.init (cyclomatic 34) system/src/Grav/Common/Twig/Twig.php:129— Twig.init has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cache.clearCache (cyclomatic 33) system/src/Grav/Common/Cache.php:585— Cache.clearCache has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PageCollection.buildSort (cyclomatic 32) system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:302— PageCollection.buildSort has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ConfigServiceProvider.saveCachedFileList (cyclomatic 32) system/src/Grav/Common/Service/ConfigServiceProvider.php:335— ConfigServiceProvider.saveCachedFileList has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SelfupgradeCommand.handlePreflightReport (cyclomatic 32) system/src/Grav/Console/Gpm/SelfupgradeCommand.php:297— SelfupgradeCommand.handlePreflightReport has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Utils.url (cyclomatic 30) system/src/Grav/Common/Utils.php:72— Utils.url has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Pages.resetPages (cyclomatic 29) system/src/Grav/Common/Page/Pages.php:2243— Pages.resetPages has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PageContentTrait.processContent (cyclomatic 29) system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php:675— PageContentTrait.processContent has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PageStorage.getObjectMeta (cyclomatic 28) system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php:539— PageStorage.getObjectMeta has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GPM.getDependencies (cyclomatic 28) system/src/Grav/Common/GPM/GPM.php:1150— GPM.getDependencies has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PagesServiceProvider.register (cyclomatic 28) system/src/Grav/Common/Service/PagesServiceProvider.php:34— PagesServiceProvider.register has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DirectInstallCommand.serve (cyclomatic 28) system/src/Grav/Console/Gpm/DirectInstallCommand.php:71— DirectInstallCommand.serve has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Page.content (cyclomatic 27) system/src/Grav/Common/Page/Page.php:943— Page.content has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UpdateCommand.serve (cyclomatic 27) system/src/Grav/Console/Gpm/UpdateCommand.php:104— UpdateCommand.serve has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cache.getCacheAdapter (cyclomatic 26) system/src/Grav/Common/Cache.php:296— Cache.getCacheAdapter has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BlueprintSchema.validateArray (cyclomatic 26) system/src/Grav/Common/Data/BlueprintSchema.php:190— BlueprintSchema.validateArray has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BlueprintSchema.filterArray (cyclomatic 26) system/src/Grav/Common/Data/BlueprintSchema.php:272— BlueprintSchema.filterArray has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Folder.all (cyclomatic 26) system/src/Grav/Common/Filesystem/Folder.php:226— Folder.all has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Security.detectXss (cyclomatic 26) system/src/Grav/Common/Security.php:239— Security.detectXss has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Uri.createFromEnvironment (cyclomatic 26) system/src/Grav/Common/Uri.php:1285— Uri.createFromEnvironment has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
InstallCommand.serve (cyclomatic 26) system/src/Grav/Console/Gpm/InstallCommand.php:105— InstallCommand.serve has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UninstallCommand.uninstallPackage (cyclomatic 26) system/src/Grav/Console/Gpm/UninstallCommand.php:157— UninstallCommand.uninstallPackage has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CompiledFile.content (cyclomatic 25) system/src/Grav/Common/File/CompiledFile.php:34— CompiledFile.content has cyclomatic complexity 25 (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.
Installer.install (cyclomatic 25) system/src/Grav/Common/GPM/Installer.php:82— Installer.install has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Grav.fallbackUrl (cyclomatic 25) system/src/Grav/Common/Grav.php:962— Grav.fallbackUrl has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Installer.unZip (cyclomatic 24) system/src/Grav/Common/GPM/Installer.php:186— Installer.unZip has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MediaUploadTrait.checkFileMetadata (cyclomatic 24) system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:118— MediaUploadTrait.checkFileMetadata has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Page.value (cyclomatic 24) system/src/Grav/Common/Page/Page.php:1449— Page.value has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
InfoCommand.serve (cyclomatic 24) system/src/Grav/Console/Gpm/InfoCommand.php:63— InfoCommand.serve has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Flex.getObjects (cyclomatic 24) system/src/Grav/Framework/Flex/Flex.php:165— Flex.getObjects has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Installer.getDestinationIssue (cyclomatic 23) system/src/Grav/Common/GPM/Installer.php:743— Installer.getDestinationIssue has cyclomatic complexity 23 (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.
FileReader.read (cyclomatic 23) system/src/Grav/Common/Helpers/FileReader.php:62— FileReader.read has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MediaObjectTrait.parsedownElement (cyclomatic 23) system/src/Grav/Common/Media/Traits/MediaObjectTrait.php:262— MediaObjectTrait.parsedownElement has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SessionServiceProvider.register (cyclomatic 23) system/src/Grav/Common/Service/SessionServiceProvider.php:33— SessionServiceProvider.register has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Session.start (cyclomatic 23) system/src/Grav/Framework/Session/Session.php:189— Session.start has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Validation.arrayFilterRecurse (cyclomatic 22) system/src/Grav/Common/Data/Validation.php:1144— Validation.arrayFilterRecurse has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MarkdownOutput.mainRegion (cyclomatic 22) system/src/Grav/Common/Page/Markdown/MarkdownOutput.php:395— MarkdownOutput.mainRegion has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Pages.buildRoutes (cyclomatic 22) system/src/Grav/Common/Page/Pages.php:2707— Pages.buildRoutes has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Scheduler.runJobs (cyclomatic 22) system/src/Grav/Common/Scheduler/Scheduler.php:369— Scheduler.runJobs has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Security.resolveTwigContentEvents (cyclomatic 22) system/src/Grav/Common/Security.php:1573— Security.resolveTwigContentEvents has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Install.detectPendingPackageUpdates (cyclomatic 22) system/src/Grav/Installer/Install.php:755— Install.detectPendingPackageUpdates has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Validation.validate (cyclomatic 21) system/src/Grav/Common/Data/Validation.php:65— Validation.validate has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Language.setActiveFromUri (cyclomatic 21) system/src/Grav/Common/Language/Language.php:246— Language.setActiveFromUri has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Pages.allItems (cyclomatic 21) system/src/Grav/Common/Page/Pages.php:1494— Pages.allItems has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Security.extractTwigTokens (cyclomatic 21) system/src/Grav/Common/Security.php:1791— Security.extractTwigTokens has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Security.scanContentTwigUsage (cyclomatic 21) system/src/Grav/Common/Security.php:1879— Security.scanContentTwigUsage has cyclomatic complexity 21 (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.
Setup.__construct (cyclomatic 20) system/src/Grav/Common/Config/Setup.php:195— Setup.__construct has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Validation.typeArray (cyclomatic 20) system/src/Grav/Common/Data/Validation.php:1017— Validation.typeArray has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PageStorage.saveRow (cyclomatic 20) system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php:371— PageStorage.saveRow has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Uri.isExternal (cyclomatic 20) system/src/Grav/Common/Uri.php:805— Uri.isExternal has cyclomatic complexity 20 (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.
FlexIndex.updateIndexFile (cyclomatic 20) system/src/Grav/Framework/Flex/FlexIndex.php:706— FlexIndex.updateIndexFile has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PageObject.reorderSiblings (cyclomatic 19) system/src/Grav/Common/Flex/Types/Pages/PageObject.php:420— PageObject.reorderSiblings has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Truncator.truncate (cyclomatic 19) system/src/Grav/Common/Helpers/Truncator.php:246— Truncator.truncate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParsedownGravTrait.blockTableContinue (cyclomatic 19) system/src/Grav/Common/Markdown/ParsedownGravTrait.php:690— ParsedownGravTrait.blockTableContinue has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParsedownGravTrait.blockTableComplete (cyclomatic 19) system/src/Grav/Common/Markdown/ParsedownGravTrait.php:803— ParsedownGravTrait.blockTableComplete has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VectorImageMedium.__construct (cyclomatic 19) system/src/Grav/Common/Page/Medium/VectorImageMedium.php:27— VectorImageMedium.__construct has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Page.metadata (cyclomatic 19) system/src/Grav/Common/Page/Page.php:2171— Page.metadata has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Pages.dispatch (cyclomatic 19) system/src/Grav/Common/Page/Pages.php:1348— Pages.dispatch has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Pages.buildFlexPages (cyclomatic 19) system/src/Grav/Common/Page/Pages.php:1957— Pages.buildFlexPages has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Uri.init (cyclomatic 19) system/src/Grav/Common/Uri.php:154— Uri.init has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Utils.getPathFromToken (cyclomatic 19) system/src/Grav/Common/Utils.php:1829— Utils.getPathFromToken has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IndexCommand.filter (cyclomatic 19) system/src/Grav/Console/Gpm/IndexCommand.php:274— IndexCommand.filter has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SelfupgradeCommand.serve (cyclomatic 19) system/src/Grav/Console/Gpm/SelfupgradeCommand.php:108— SelfupgradeCommand.serve has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FlexCollection.render (cyclomatic 19) system/src/Grav/Framework/Flex/FlexCollection.php:369— FlexCollection.render has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PageContentTrait.pageContentValue (cyclomatic 19) system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php:554— PageContentTrait.pageContentValue has cyclomatic complexity 19 (threshold 15). 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. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Debugger.init (cyclomatic 18) system/src/Grav/Common/Debugger.php:136— Debugger.init has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ZipArchiver.compress (cyclomatic 18) system/src/Grav/Common/Filesystem/ZipArchiver.php:269— ZipArchiver.compress has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParsedownExtra.findEndTag (cyclomatic 18) system/src/Grav/Common/Markdown/ParsedownExtra.php:483— ParsedownExtra.findEndTag has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ImageMediaTrait.saveImage (cyclomatic 18) system/src/Grav/Common/Media/Traits/ImageMediaTrait.php:551— ImageMediaTrait.saveImage has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Page.moduleOutputCacheId (cyclomatic 18) system/src/Grav/Common/Page/Page.php:1334— Page.moduleOutputCacheId has cyclomatic complexity 18 (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.
Cron.cronToArray (cyclomatic 18) system/src/Grav/Common/Scheduler/Cron.php:524— Cron.cronToArray has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GravExtension.arrayGroupByFilter (cyclomatic 18) system/src/Grav/Common/Twig/Extension/GravExtension.php:1515— GravExtension.arrayGroupByFilter has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Uri.ip (cyclomatic 18) system/src/Grav/Common/Uri.php:707— Uri.ip has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Uri.convertUrlOld (cyclomatic 18) system/src/Grav/Common/Uri.php:1096— Uri.convertUrlOld has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CacheCleanupCommand.serve (cyclomatic 18) system/src/Grav/Console/Cli/CacheCleanupCommand.php:68— CacheCleanupCommand.serve has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PreflightCommand.serve (cyclomatic 18) system/src/Grav/Console/Gpm/PreflightCommand.php:21— PreflightCommand.serve has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FlexObject.render (cyclomatic 18) system/src/Grav/Framework/Flex/FlexObject.php:543— FlexObject.render has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Env.load (cyclomatic 17) system/src/Grav/Common/Config/Env.php:90— Env.load has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PageIndex.filterBy (cyclomatic 17) system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:287— PageIndex.filterBy has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Excerpts.processLinkExcerpt (cyclomatic 17) system/src/Grav/Common/Page/Markdown/Excerpts.php:97— Excerpts.processLinkExcerpt has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Page.httpHeaders (cyclomatic 17) system/src/Grav/Common/Page/Page.php:776— Page.httpHeaders has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Page.summary (cyclomatic 17) system/src/Grav/Common/Page/Page.php:861— Page.summary has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Pages.resolvePagesHash (cyclomatic 17) system/src/Grav/Common/Page/Pages.php:2990— Pages.resolvePagesHash has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Security.planSandboxDefaultsMigration (cyclomatic 17) system/src/Grav/Common/Security.php:891— Security.planSandboxDefaultsMigration has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PageLegacyTrait.metadata (cyclomatic 17) system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php:612— PageLegacyTrait.metadata has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Validation.filterArray (cyclomatic 16) system/src/Grav/Common/Data/Validation.php:1100— Validation.filterArray has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Debugger.debuggerRequest (cyclomatic 16) system/src/Grav/Common/Debugger.php:353— Debugger.debuggerRequest has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PageObject.filterBy (cyclomatic 16) system/src/Grav/Common/Flex/Types/Pages/PageObject.php:615— PageObject.filterBy has cyclomatic complexity 16 (threshold 15). 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. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
PageTranslateTrait.translatedLanguages (cyclomatic 16) system/src/Grav/Common/Flex/Types/Pages/Traits/PageTranslateTrait.php:32— PageTranslateTrait.translatedLanguages has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GPM.calculateMergedDependenciesOfPackage (cyclomatic 16) system/src/Grav/Common/GPM/GPM.php:1416— GPM.calculateMergedDependenciesOfPackage has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Grav.getRedirectResponse (cyclomatic 16) system/src/Grav/Common/Grav.php:621— Grav.getRedirectResponse has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Language.getFallbackLanguages (cyclomatic 16) system/src/Grav/Common/Language/Language.php:452— Language.getFallbackLanguages has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ImageMediaTrait.derivatives (cyclomatic 16) system/src/Grav/Common/Media/Traits/ImageMediaTrait.php:203— ImageMediaTrait.derivatives has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Scheduler.executeJob (cyclomatic 16) system/src/Grav/Common/Scheduler/Scheduler.php:1337— Scheduler.executeJob has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RequestServiceProvider.register (cyclomatic 16) system/src/Grav/Common/Service/RequestServiceProvider.php:36— RequestServiceProvider.register has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Utils.download (cyclomatic 16) system/src/Grav/Common/Utils.php:795— Utils.download has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InstallCommand.processGpm (cyclomatic 16) system/src/Grav/Console/Gpm/InstallCommand.php:548— InstallCommand.processGpm has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FlexDirectory.loadObjects (cyclomatic 16) system/src/Grav/Framework/Flex/FlexDirectory.php:671— FlexDirectory.loadObjects has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Scheduler.processJobsWithWorkers (cognitive 118) system/src/Grav/Common/Scheduler/Scheduler.php:1205— Scheduler.processJobsWithWorkers has cognitive complexity 118 (threshold 15). Drivers by points: if/else 18 (64 pts), ternaries 6 (41 pts), loops 4 (7 pts), boolean chains 6 (nesting depth added 84). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Debugger.deprecatedErrorHandler (cognitive 113) system/src/Grav/Common/Debugger.php:1124— Debugger.deprecatedErrorHandler has cognitive complexity 113 (threshold 15). Drivers by points: if/else 30 (75 pts), loops 8 (23 pts), ternaries 2 (8 pts), boolean chains 7 (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Page.header (cognitive 98) system/src/Grav/Common/Page/Page.php:566— Page.header has cognitive complexity 98 (threshold 15). Drivers by points: if/else 41 (86 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 51). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PageIndex.getLevelListingRecurse (cognitive 96) system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:518— PageIndex.getLevelListingRecurse has cognitive complexity 96 (threshold 15). Drivers by points: ternaries 15 (55 pts), if/else 17 (29 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SchedulerCommand.serve (cognitive 91) system/src/Grav/Console/Cli/SchedulerCommand.php:78— SchedulerCommand.serve has cognitive complexity 91 (threshold 15). Drivers by points: if/else 31 (64 pts), ternaries 6 (17 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 48). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Pages.buildSort (cognitive 84) system/src/Grav/Common/Page/Pages.php:2793— Pages.buildSort has cognitive complexity 84 (threshold 15). Drivers by points: if/else 23 (54 pts), ternaries 5 (16 pts), loops 4 (7 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Media.init (cognitive 82) system/src/Grav/Common/Page/Media.php:128— Media.init has cognitive complexity 82 (threshold 15). Drivers by points: if/else 24 (60 pts), loops 5 (11 pts), boolean chains 10, ternaries 1 (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Pages.getCollection (cognitive 82) system/src/Grav/Common/Page/Pages.php:686— Pages.getCollection has cognitive complexity 82 (threshold 15). Drivers by points: if/else 28 (52 pts), loops 7 (13 pts), ternaries 3 (8 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Page.content (cognitive 79) system/src/Grav/Common/Page/Page.php:943— Page.content has cognitive complexity 79 (threshold 15). Drivers by points: if/else 25 (74 pts), boolean chains 5 (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
GPM.getDependencies (cognitive 78) system/src/Grav/Common/GPM/GPM.php:1150— GPM.getDependencies has cognitive complexity 78 (threshold 15). Drivers by points: if/else 21 (66 pts), loops 2 (7 pts), boolean chains 5 (nesting depth added 50). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Uri.convertUrl (cognitive 76) system/src/Grav/Common/Uri.php:874— Uri.convertUrl has cognitive complexity 76 (threshold 15). Drivers by points: if/else 29 (62 pts), boolean chains 10, ternaries 2 (4 pts) (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PageStorage.getObjectMeta (cognitive 72) system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php:539— PageStorage.getObjectMeta has cognitive complexity 72 (threshold 15). Drivers by points: if/else 17 (46 pts), ternaries 4 (10 pts), boolean chains 8, error handling 1 (5 pts), loops 1 (3 pts) (nesting depth added 41). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Pages.recurse (cognitive 69) system/src/Grav/Common/Page/Pages.php:2518— Pages.recurse has cognitive complexity 69 (threshold 15). Drivers by points: if/else 27 (53 pts), boolean chains 11, loops 3 (4 pts), ternaries 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DirectInstallCommand.serve (cognitive 69) system/src/Grav/Console/Gpm/DirectInstallCommand.php:71— DirectInstallCommand.serve has cognitive complexity 69 (threshold 15). Drivers by points: if/else 24 (56 pts), ternaries 2 (5 pts), loops 1 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ConfigServiceProvider.saveCachedFileList (cognitive 67) system/src/Grav/Common/Service/ConfigServiceProvider.php:335— ConfigServiceProvider.saveCachedFileList has cognitive complexity 67 (threshold 15). Drivers by points: if/else 13 (38 pts), loops 10 (23 pts), boolean chains 5, error handling 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InstallCommand.serve (cognitive 64) system/src/Grav/Console/Gpm/InstallCommand.php:105— InstallCommand.serve has cognitive complexity 64 (threshold 15). Drivers by points: if/else 18 (39 pts), error handling 3 (9 pts), ternaries 2 (8 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Twig.init (cognitive 63) system/src/Grav/Common/Twig/Twig.php:129— Twig.init has cognitive complexity 63 (threshold 15). Drivers by points: if/else 17 (38 pts), ternaries 5 (15 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Utils.url (cognitive 59) system/src/Grav/Common/Utils.php:72— Utils.url has cognitive complexity 59 (threshold 15). Drivers by points: if/else 20 (48 pts), boolean chains 9, ternaries 2 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Page.metadata (cognitive 58) system/src/Grav/Common/Page/Page.php:2171— Page.metadata has cognitive complexity 58 (threshold 15). Drivers by points: if/else 10 (25 pts), ternaries 4 (23 pts), loops 2 (6 pts), boolean chains 4 (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Security.extractTwigTokens (cognitive 55) system/src/Grav/Common/Security.php:1791— Security.extractTwigTokens has cognitive complexity 55 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 7 (22 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PageCollection.buildSort (cognitive 54) system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:302— PageCollection.buildSort has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (32 pts), ternaries 4 (15 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Grav.fallbackUrl (cognitive 54) system/src/Grav/Common/Grav.php:962— Grav.fallbackUrl has cognitive complexity 54 (threshold 15). Drivers by points: if/else 15 (39 pts), boolean chains 6, ternaries 2 (5 pts), loops 1 (4 pts) (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PagesServiceProvider.register (cognitive 54) system/src/Grav/Common/Service/PagesServiceProvider.php:34— PagesServiceProvider.register has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (36 pts), boolean chains 9, ternaries 3 (9 pts) (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
UninstallCommand.uninstallPackage (cognitive 54) system/src/Grav/Console/Gpm/UninstallCommand.php:157— UninstallCommand.uninstallPackage has cognitive complexity 54 (threshold 15). Drivers by points: if/else 18 (38 pts), ternaries 3 (7 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Cache.clearCache (cognitive 53) system/src/Grav/Common/Cache.php:585— Cache.clearCache has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (36 pts), boolean chains 4, error handling 2 (4 pts), loops 2 (4 pts), ternaries 2 (4 pts), match/switch 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PageContentTrait.processContent (cognitive 52) system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php:675— PageContentTrait.processContent has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (42 pts), boolean chains 9, ternaries 1 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
UpdateCommand.serve (cognitive 51) system/src/Grav/Console/Gpm/UpdateCommand.php:104— UpdateCommand.serve has cognitive complexity 51 (threshold 15). Drivers by points: if/else 23 (44 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pages.allItems (cognitive 50) system/src/Grav/Common/Page/Pages.php:1494— Pages.allItems has cognitive complexity 50 (threshold 15). Drivers by points: loops 8 (23 pts), if/else 7 (14 pts), ternaries 3 (10 pts), boolean chains 3 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Folder.all (cognitive 49) system/src/Grav/Common/Filesystem/Folder.php:226— Folder.all has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (34 pts), ternaries 5 (9 pts), boolean chains 5, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Truncator.truncate (cognitive 49) system/src/Grav/Common/Helpers/Truncator.php:246— Truncator.truncate has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (40 pts), loops 3 (9 pts) (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Flex.getObjects (cognitive 49) system/src/Grav/Framework/Flex/Flex.php:165— Flex.getObjects has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 5 (13 pts), ternaries 3 (5 pts), boolean chains 3 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Installer.unZip (cognitive 47) system/src/Grav/Common/GPM/Installer.php:186— Installer.unZip has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (37 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SelfupgradeCommand.handlePreflightReport (cognitive 47) system/src/Grav/Console/Gpm/SelfupgradeCommand.php:297— SelfupgradeCommand.handlePreflightReport has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (18 pts), loops 9 (17 pts), boolean chains 6, ternaries 3 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlueprintSchema.validateArray (cognitive 46) system/src/Grav/Common/Data/BlueprintSchema.php:190— BlueprintSchema.validateArray has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (31 pts), boolean chains 9, ternaries 2 (5 pts), loops 1 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PageCollection.ofOneOfTheseAccessLevels (cognitive 45) system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:708— PageCollection.ofOneOfTheseAccessLevels has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (33 pts), loops 3 (11 pts), boolean chains 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Collection.ofOneOfTheseAccessLevels (cognitive 45) system/src/Grav/Common/Page/Collection.php:716— Collection.ofOneOfTheseAccessLevels has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (33 pts), loops 3 (11 pts), boolean chains 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PageLegacyTrait.metadata (cognitive 45) system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php:612— PageLegacyTrait.metadata has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 4 (20 pts), if/else 7 (16 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Language.setActiveFromUri (cognitive 44) system/src/Grav/Common/Language/Language.php:246— Language.setActiveFromUri has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 9, loops 1 (4 pts), ternaries 1 (4 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Cache.getCacheAdapter (cognitive 43) system/src/Grav/Common/Cache.php:296— Cache.getCacheAdapter has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (34 pts), boolean chains 5, error handling 1 (3 pts), match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pages.resetPages (cognitive 43) system/src/Grav/Common/Page/Pages.php:2243— Pages.resetPages has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 9, ternaries 4 (6 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Utils.getPathFromToken (cognitive 43) system/src/Grav/Common/Utils.php:1829— Utils.getPathFromToken has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (35 pts), ternaries 2 (7 pts), match/switch 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CacheCleanupCommand.serve (cognitive 43) system/src/Grav/Console/Cli/CacheCleanupCommand.php:68— CacheCleanupCommand.serve has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (34 pts), error handling 1 (4 pts), loops 2 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IndexCommand.filter (cognitive 43) system/src/Grav/Console/Gpm/IndexCommand.php:274— IndexCommand.filter has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (32 pts), boolean chains 6, loops 2 (5 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scheduler.runJobs (cognitive 42) system/src/Grav/Common/Scheduler/Scheduler.php:369— Scheduler.runJobs has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (27 pts), loops 5 (10 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlueprintSchema.filterArray (cognitive 41) system/src/Grav/Common/Data/BlueprintSchema.php:272— BlueprintSchema.filterArray has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 10, ternaries 3 (6 pts), loops 2 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PageStorage.saveRow (cognitive 41) system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php:371— PageStorage.saveRow has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (30 pts), ternaries 3 (7 pts), boolean chains 3, error handling 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Pages.buildRoutes (cognitive 40) system/src/Grav/Common/Page/Pages.php:2707— Pages.buildRoutes has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cron.cronToArray (cognitive 40) system/src/Grav/Common/Scheduler/Cron.php:524— Cron.cronToArray has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 5 (16 pts), boolean chains 4 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoCommand.serve (cognitive 39) system/src/Grav/Console/Gpm/InfoCommand.php:63— InfoCommand.serve has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompiledFile.content (cognitive 38) system/src/Grav/Common/File/CompiledFile.php:34— CompiledFile.content has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 12, error handling 4 (9 pts), ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParsedownExtra.findEndTag (cognitive 38) system/src/Grav/Common/Markdown/ParsedownExtra.php:483— ParsedownExtra.findEndTag has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (35 pts), boolean chains 2, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Debugger.init (cognitive 37) system/src/Grav/Common/Debugger.php:136— Debugger.init has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (34 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageMediaTrait.derivatives (cognitive 37) system/src/Grav/Common/Media/Traits/ImageMediaTrait.php:203— ImageMediaTrait.derivatives has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Security.detectXss (cognitive 37) system/src/Grav/Common/Security.php:239— Security.detectXss has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 9, ternaries 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Validation.arrayFilterRecurse (cognitive 36) system/src/Grav/Common/Data/Validation.php:1144— Validation.arrayFilterRecurse has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (23 pts), match/switch 2 (7 pts), boolean chains 5, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaUploadTrait.checkFileMetadata (cognitive 36) system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:118— MediaUploadTrait.checkFileMetadata has cognitive complexity 36 (threshold 15). Drivers by points: if/else 21 (31 pts), boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Utils.download (cognitive 36) system/src/Grav/Common/Utils.php:795— Utils.download has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Install.detectPendingPackageUpdates (cognitive 36) system/src/Grav/Installer/Install.php:755— Install.detectPendingPackageUpdates has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (25 pts), ternaries 3 (5 pts), loops 3, boolean chains 2, error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InstallCommand.processGpm (cognitive 35) system/src/Grav/Console/Gpm/InstallCommand.php:548— InstallCommand.processGpm has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 2 (7 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ZipArchiver.extract (cognitive 34) system/src/Grav/Common/Filesystem/ZipArchiver.php:30— ZipArchiver.extract has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (30 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
UserObject.setUpdatedMedia (cognitive 34) system/src/Grav/Common/Flex/Types/Users/UserObject.php:881— UserObject.setUpdatedMedia has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Installer.install (cognitive 34) system/src/Grav/Common/GPM/Installer.php:82— Installer.install has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 9 (nesting depth added 6). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Pages.buildFlexPages (cognitive 34) system/src/Grav/Common/Page/Pages.php:1957— Pages.buildFlexPages has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (27 pts), ternaries 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Security.scanContentTwigUsage (cognitive 34) system/src/Grav/Common/Security.php:1879— Security.scanContentTwigUsage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 7 (11 pts), boolean chains 5, error handling 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlexIndex.updateIndexFile (cognitive 34) system/src/Grav/Framework/Flex/FlexIndex.php:706— FlexIndex.updateIndexFile has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Setup.__construct (cognitive 33) system/src/Grav/Common/Config/Setup.php:195— Setup.__construct has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (25 pts), ternaries 6 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PageObject.reorderSiblings (cognitive 33) system/src/Grav/Common/Flex/Types/Pages/PageObject.php:420— PageObject.reorderSiblings has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 4 (7 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Language.getFallbackLanguages (cognitive 33) system/src/Grav/Common/Language/Language.php:452— Language.getFallbackLanguages has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (6 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ParsedownGravTrait.blockTableContinue (cognitive 33) system/src/Grav/Common/Markdown/ParsedownGravTrait.php:690— ParsedownGravTrait.blockTableContinue has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 9, ternaries 1 (4 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Excerpts.processLinkExcerpt (cognitive 33) system/src/Grav/Common/Page/Markdown/Excerpts.php:97— Excerpts.processLinkExcerpt has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (21 pts), ternaries 3 (8 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Folder.rcopy (cognitive 32) system/src/Grav/Common/Filesystem/Folder.php:490— Folder.rcopy has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GPM.calculateMergedDependenciesOfPackage (cognitive 32) system/src/Grav/Common/GPM/GPM.php:1416— GPM.calculateMergedDependenciesOfPackage has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pages.dispatch (cognitive 32) system/src/Grav/Common/Page/Pages.php:1348— Pages.dispatch has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 5, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelfupgradeCommand.serve (cognitive 32) system/src/Grav/Console/Gpm/SelfupgradeCommand.php:108— SelfupgradeCommand.serve has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParsedownGravTrait.blockTableComplete (cognitive 31) system/src/Grav/Common/Markdown/ParsedownGravTrait.php:803— ParsedownGravTrait.blockTableComplete has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 5, loops 2 (5 pts), ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pages.get (cognitive 31) system/src/Grav/Common/Page/Pages.php:1098— Pages.get has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 1 (5 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
VersionCommand.serve (cognitive 31) system/src/Grav/Console/Gpm/VersionCommand.php:55— VersionCommand.serve has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (27 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HtmlBlock.getAssetsFast (cognitive 31) system/src/Grav/Framework/ContentBlock/HtmlBlock.php:401— HtmlBlock.getAssetsFast has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 5 (13 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Page.value (cognitive 30) system/src/Grav/Common/Page/Page.php:1449— Page.value has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (20 pts), ternaries 3 (6 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Scheduler.executeJob (cognitive 30) system/src/Grav/Common/Scheduler/Scheduler.php:1337— Scheduler.executeJob has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 5 (14 pts), if/else 9 (13 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlexDirectory.loadObjects (cognitive 30) system/src/Grav/Framework/Flex/FlexDirectory.php:671— FlexDirectory.loadObjects has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 3 (4 pts), error handling 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlueprintSchema.processFormRecursive (cognitive 29) system/src/Grav/Common/Data/BlueprintSchema.php:374— BlueprintSchema.processFormRecursive has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (23 pts), boolean chains 5, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MarkdownOutput.mainRegion (cognitive 29) system/src/Grav/Common/Page/Markdown/MarkdownOutput.php:395— MarkdownOutput.mainRegion has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 6 (8 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Security.resolveTwigContentEvents (cognitive 29) system/src/Grav/Common/Security.php:1573— Security.resolveTwigContentEvents has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 7, error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session.start (cognitive 29) system/src/Grav/Framework/Session/Session.php:189— Session.start has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 6, ternaries 2 (5 pts), error handling 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cache.purgeOldCache (cognitive 28) system/src/Grav/Common/Cache.php:184— Cache.purgeOldCache has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Installer.sophisticatedInstall (cognitive 28) system/src/Grav/Common/GPM/Installer.php:536— Installer.sophisticatedInstall has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (5 pts), ternaries 1 (4 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Installer.getDestinationIssue (cognitive 28) system/src/Grav/Common/GPM/Installer.php:743— Installer.getDestinationIssue has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 10, loops 3 (4 pts), error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Grav.getRedirectResponse (cognitive 28) system/src/Grav/Common/Grav.php:621— Grav.getRedirectResponse has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParsedownExtra.renderMarkdownElements (cognitive 28) system/src/Grav/Common/Markdown/ParsedownExtra.php:339— ParsedownExtra.renderMarkdownElements has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pages.evaluate (cognitive 28) system/src/Grav/Common/Page/Pages.php:883— Pages.evaluate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 3 (6 pts), boolean chains 4, loops 1 (2 pts), match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Security.planSandboxDefaultsMigration (cognitive 28) system/src/Grav/Common/Security.php:891— Security.planSandboxDefaultsMigration has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BaseAsset.init (cognitive 27) system/src/Grav/Common/Assets/BaseAsset.php:94— BaseAsset.init has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Validation.validate (cognitive 27) system/src/Grav/Common/Data/Validation.php:65— Validation.validate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 8, ternaries 3 (5 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParsedownGravTrait.__call (cognitive 27) system/src/Grav/Common/Markdown/ParsedownGravTrait.php:979— ParsedownGravTrait.__call has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 3 (11 pts), loops 1 (2 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PreflightCommand.serve (cognitive 27) system/src/Grav/Console/Gpm/PreflightCommand.php:21— PreflightCommand.serve has cognitive complexity 27 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 8 (10 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 9). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FlexIndex.__call (cognitive 27) system/src/Grav/Framework/Flex/FlexIndex.php:445— FlexIndex.__call has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (19 pts), error handling 2 (5 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileReader.read (cognitive 26) system/src/Grav/Common/Helpers/FileReader.php:62— FileReader.read has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 5, loops 2 (nesting depth added 4). 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.
Uri.init (cognitive 26) system/src/Grav/Common/Uri.php:154— Uri.init has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 4, ternaries 3 (4 pts) (nesting depth added 5). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PageStorage.getIndexMeta (cognitive 25) system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php:660— PageStorage.getIndexMeta has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (5 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaObjectTrait.parsedownElement (cognitive 25) system/src/Grav/Common/Media/Traits/MediaObjectTrait.php:262— MediaObjectTrait.parsedownElement has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 1 (2 pts), loops 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Job.runWithRetry (cognitive 25) system/src/Grav/Common/Scheduler/Job.php:1086— Job.runWithRetry has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (21 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionServiceProvider.register (cognitive 25) system/src/Grav/Common/Service/SessionServiceProvider.php:33— SessionServiceProvider.register has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 8, ternaries 1 (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.
Uri.convertUrlOld (cognitive 25) system/src/Grav/Common/Uri.php:1096— Uri.convertUrlOld has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 4). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FlexObject.render (cognitive 25) system/src/Grav/Framework/Flex/FlexObject.php:543— FlexObject.render has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (4 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YamlUpdater.findPath (cognitive 25) system/src/Grav/Installer/YamlUpdater.php:252— YamlUpdater.findPath has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Grav.shutdown (cognitive 24) system/src/Grav/Common/Grav.php:796— Grav.shutdown has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Pages.accessLevels (cognitive 24) system/src/Grav/Common/Page/Pages.php:1805— Pages.accessLevels has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (11 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RequestServiceProvider.register (cognitive 24) system/src/Grav/Common/Service/RequestServiceProvider.php:36— RequestServiceProvider.register has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 1 (4 pts), match/switch 1 (3 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GravExtension.arrayGroupByFilter (cognitive 24) system/src/Grav/Common/Twig/Extension/GravExtension.php:1515— GravExtension.arrayGroupByFilter has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Uri.createFromEnvironment (cognitive 24) system/src/Grav/Common/Uri.php:1285— Uri.createFromEnvironment has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6, ternaries 5 (6 pts) (nesting depth added 2). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
User.save (cognitive 24) system/src/Grav/Common/User/DataUser/User.php:120— User.save has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlexCollection.render (cognitive 24) system/src/Grav/Framework/Flex/FlexCollection.php:369— FlexCollection.render has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, ternaries 3 (4 pts), error handling 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Validation.typeArray (cognitive 23) system/src/Grav/Common/Data/Validation.php:1017— Validation.typeArray has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ZipArchiver.extractStreamed (cognitive 23) system/src/Grav/Common/Filesystem/ZipArchiver.php:186— ZipArchiver.extractStreamed has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Installer.extractStreamed (cognitive 23) system/src/Grav/Common/GPM/Installer.php:377— Installer.extractStreamed has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Excerpts.processImageExcerpt (cognitive 23) system/src/Grav/Common/Page/Markdown/Excerpts.php:193— Excerpts.processImageExcerpt has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 7 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pages.getList (cognitive 23) system/src/Grav/Common/Page/Pages.php:1634— Pages.getList has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pages.getTypes (cognitive 23) system/src/Grav/Common/Page/Pages.php:1679— Pages.getTypes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InstallCommand.installDependencies (cognitive 23) system/src/Grav/Console/Gpm/InstallCommand.php:301— InstallCommand.installDependencies has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (6 pts), loops 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PageAuthorsTrait.isAuthorizedByGroup (cognitive 23) system/src/Grav/Framework/Flex/Pages/Traits/PageAuthorsTrait.php:168— PageAuthorsTrait.isAuthorizedByGroup has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlexMediaTrait.setUpdatedMedia (cognitive 23) system/src/Grav/Framework/Flex/Traits/FlexMediaTrait.php:367— FlexMediaTrait.setUpdatedMedia has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaIdentifier.getObject (cognitive 23) system/src/Grav/Framework/Media/MediaIdentifier.php:47— MediaIdentifier.getObject has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 1 (4 pts), boolean chains 3 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
AssetUtilsTrait.gatherLinks (cognitive 22) system/src/Grav/Common/Assets/Traits/AssetUtilsTrait.php:71— AssetUtilsTrait.gatherLinks has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Validation.filterArray (cognitive 22) system/src/Grav/Common/Data/Validation.php:1100— Validation.filterArray has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, loops 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Debugger.addMessage (cognitive 22) system/src/Grav/Common/Debugger.php:1010— Debugger.addMessage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (22 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ZipArchiver.compress (cognitive 22) system/src/Grav/Common/Filesystem/ZipArchiver.php:269— ZipArchiver.compress has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Base32.decode (cognitive 22) system/src/Grav/Common/Helpers/Base32.php:87— Base32.decode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AbstractMedia.compareMeta (cognitive 22) system/src/Grav/Common/Page/Medium/AbstractMedia.php:498— AbstractMedia.compareMeta has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (4 pts), loops 1 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pages.resolvePagesHash (cognitive 22) system/src/Grav/Common/Page/Pages.php:2990— Pages.resolvePagesHash has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (4 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InitializeProcessor.initializeConfig (cognitive 22) system/src/Grav/Common/Processors/InitializeProcessor.php:168— InitializeProcessor.initializeConfig has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (7 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JobHistory.searchHistory (cognitive 22) system/src/Grav/Common/Scheduler/JobHistory.php:334— JobHistory.searchHistory has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, ternaries 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session.getFlashObject (cognitive 22) system/src/Grav/Common/Session.php:332— Session.getFlashObject has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (6 pts), error handling 1 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Taxonomy.findTaxonomy (cognitive 22) system/src/Grav/Common/Taxonomy.php:178— Taxonomy.findTaxonomy has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 4, boolean chains 2, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Uri.ip (cognitive 22) system/src/Grav/Common/Uri.php:707— Uri.ip has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, ternaries 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Assets.splitPipelineAssetsByAttribute (cognitive 21) system/src/Grav/Common/Assets.php:742— Assets.splitPipelineAssetsByAttribute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PageTranslateTrait.translatedLanguages (cognitive 21) system/src/Grav/Common/Flex/Types/Pages/Traits/PageTranslateTrait.php:32— PageTranslateTrait.translatedLanguages has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 4 (7 pts), loops 3, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Excerpts.processMediaActions (cognitive 21) system/src/Grav/Common/Page/Markdown/Excerpts.php:281— Excerpts.processMediaActions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Page.summary (cognitive 21) system/src/Grav/Common/Page/Page.php:861— Page.summary has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 4). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Page.doReorder (cognitive 21) system/src/Grav/Common/Page/Page.php:3277— Page.doReorder has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
JobHistory.getJobStatistics (cognitive 21) system/src/Grav/Common/Scheduler/JobHistory.php:226— JobHistory.getJobStatistics has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelfupgradeCommand.upgrade (cognitive 21) system/src/Grav/Console/Gpm/SelfupgradeCommand.php:519— SelfupgradeCommand.upgrade has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 4 (10 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PageLegacyTrait.copy (cognitive 21) system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php:297— PageLegacyTrait.copy has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 4 (6 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DOMWordsIterator.next (cognitive 20) system/src/DOMWordsIterator.php:89— DOMWordsIterator.next has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, ternaries 1 (3 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pipeline.renderCss (cognitive 20) system/src/Grav/Common/Assets/Pipeline.php:122— Pipeline.renderCss has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompiledLanguages.loadLanguage (cognitive 20) system/src/Grav/Common/Config/CompiledLanguages.php:154— CompiledLanguages.loadLanguage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 5, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Blueprint.init (cognitive 20) system/src/Grav/Common/Data/Blueprint.php:237— Blueprint.init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Blueprint.getFiles (cognitive 20) system/src/Grav/Common/Data/Blueprint.php:580— Blueprint.getFiles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GPM.filterDependenciesForGeneration (cognitive 20) system/src/Grav/Common/GPM/GPM.php:1372— GPM.filterDependenciesForGeneration has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Language.translate (cognitive 20) system/src/Grav/Common/Language/Language.php:530— Language.translate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageMediaTrait.saveImage (cognitive 20) system/src/Grav/Common/Media/Traits/ImageMediaTrait.php:551— ImageMediaTrait.saveImage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, 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.
VectorImageMedium.__construct (cognitive 20) system/src/Grav/Common/Page/Medium/VectorImageMedium.php:27— VectorImageMedium.__construct has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 7, ternaries 2 (3 pts) (nesting depth added 2). 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.
Security.recordTwigContentEvent (cognitive 20) system/src/Grav/Common/Security.php:1421— Security.recordTwigContentEvent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UserCollection.find (cognitive 20) system/src/Grav/Common/User/DataUser/UserCollection.php:86— UserCollection.find has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (6 pts), boolean chains 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Utils.arrayUnflattenDotNotation (cognitive 20) system/src/Grav/Common/Utils.php:1431— Utils.arrayUnflattenDotNotation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UpdateCommand.reportSkippedSymlinks (cognitive 20) system/src/Grav/Console/Gpm/UpdateCommand.php:289— UpdateCommand.reportSkippedSymlinks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 5, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Assets.add (cognitive 19) system/src/Grav/Common/Assets.php:282— Assets.add has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Assets.addTypeNow (cognitive 19) system/src/Grav/Common/Assets.php:359— Assets.addTypeNow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pipeline.renderJs (cognitive 19) system/src/Grav/Common/Assets/Pipeline.php:203— Pipeline.renderJs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlueprintSchema.checkRequired (cognitive 19) system/src/Grav/Common/Data/BlueprintSchema.php:431— BlueprintSchema.checkRequired has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Inflector.pluralize (cognitive 19) system/src/Grav/Common/Inflector.php:63— Inflector.pluralize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Inflector.singularize) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Inflector.singularize (cognitive 19) system/src/Grav/Common/Inflector.php:108— Inflector.singularize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Inflector.pluralize) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
MediaUploadTrait.doRemove (cognitive 19) system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:560— MediaUploadTrait.doRemove has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Page.httpHeaders (cognitive 19) system/src/Grav/Common/Page/Page.php:776— Page.httpHeaders has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 4). 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.
ConfigServiceProvider.loadCachedFileList (cognitive 19) system/src/Grav/Common/Service/ConfigServiceProvider.php:270— ConfigServiceProvider.loadCachedFileList has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Themes.initTheme (cognitive 19) system/src/Grav/Common/Themes.php:72— Themes.initTheme has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 1 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TwigTokenParserScript.parseArguments (cognitive 19) system/src/Grav/Common/Twig/TokenParser/TwigTokenParserScript.php:62— TwigTokenParserScript.parseArguments has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Uri.isExternal (cognitive 19) system/src/Grav/Common/Uri.php:805— Uri.isExternal has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 17, if/else 2. 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.
InstallCommand.installDemoContent (cognitive 19) system/src/Grav/Console/Gpm/InstallCommand.php:401— InstallCommand.installDemoContent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
UninstallCommand.serve (cognitive 19) system/src/Grav/Console/Gpm/UninstallCommand.php:72— UninstallCommand.serve has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 1 (3 pts), loops 2, boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlexPageObject.filterElements (cognitive 19) system/src/Grav/Framework/Flex/Pages/FlexPageObject.php:448— FlexPageObject.filterElements has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 3 (8 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
UserObject.authorize (cognitive 18) system/src/Grav/Common/Flex/Types/Users/UserObject.php:272— UserObject.authorize has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaObjectTrait.getThumbnail (cognitive 18) system/src/Grav/Common/Media/Traits/MediaObjectTrait.php:726— MediaObjectTrait.getThumbnail has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MarkdownOutput.links (cognitive 18) system/src/Grav/Common/Page/Markdown/MarkdownOutput.php:236— MarkdownOutput.links has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlobalMedia.addMedium (cognitive 18) system/src/Grav/Common/Page/Medium/GlobalMedia.php:94— GlobalMedia.addMedium has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Page.moduleOutputCacheId (cognitive 18) system/src/Grav/Common/Page/Page.php:1334— Page.moduleOutputCacheId has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 pts), loops 1, ternaries 1 (nesting depth added 1). 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.
JobQueue.reconstructJob (cognitive 18) system/src/Grav/Common/Scheduler/JobQueue.php:471— JobQueue.reconstructJob has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 1 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
TwigTokenParserStyle.parseArguments (cognitive 18) system/src/Grav/Common/Twig/TokenParser/TwigTokenParserStyle.php:55— TwigTokenParserStyle.parseArguments has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YamlLinterCommand.serve (cognitive 18) system/src/Grav/Console/Cli/YamlLinterCommand.php:55— YamlLinterCommand.serve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlexIndex.orderBy (cognitive 18) system/src/Grav/Framework/Flex/FlexIndex.php:382— FlexIndex.orderBy has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DOMLettersIterator.next (cognitive 17) system/src/DOMLettersIterator.php:88— DOMLettersIterator.next has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pipeline.gatherAndMinifyCss (cognitive 17) system/src/Grav/Common/Assets/Pipeline.php:481— Pipeline.gatherAndMinifyCss has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Pipeline.gatherAndMinifyJs) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Pipeline.gatherAndMinifyJs (cognitive 17) system/src/Grav/Common/Assets/Pipeline.php:552— Pipeline.gatherAndMinifyJs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Pipeline.gatherAndMinifyCss) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Backups.backup (cognitive 17) system/src/Grav/Common/Backup/Backups.php:221— Backups.backup has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 6, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Env.load (cognitive 17) system/src/Grav/Common/Config/Env.php:90— Env.load has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, error handling 1 (nesting depth added 2). 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.
Setup.check (cognitive 17) system/src/Grav/Common/Config/Setup.php:413— Setup.check has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Debugger.addAssets (cognitive 17) system/src/Grav/Common/Debugger.php:651— Debugger.addAssets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Installer.mergeInstall (cognitive 17) system/src/Grav/Common/GPM/Installer.php:652— Installer.mergeInstall has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 1 (3 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pages.listFolder (cognitive 17) system/src/Grav/Common/Page/Pages.php:2483— Pages.listFolder has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Plugins.init (cognitive 17) system/src/Grav/Common/Plugins.php:129— Plugins.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SchedulerController.formatHealthStatus (cognitive 17) system/src/Grav/Common/Scheduler/SchedulerController.php:161— SchedulerController.formatHealthStatus has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 6 (7 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Security.splitMethodNames (cognitive 17) system/src/Grav/Common/Security.php:2071— Security.splitMethodNames has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 2 (4 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GravExtension.dump (cognitive 17) system/src/Grav/Common/Twig/Extension/GravExtension.php:1384— GravExtension.dump has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginCommandLoader.__construct (cognitive 17) system/src/Grav/Console/Application/CommandLoader/PluginCommandLoader.php:34— PluginCommandLoader.__construct has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (6 pts), error handling 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InstallCommand.symlink (cognitive 17) system/src/Grav/Console/Cli/InstallCommand.php:188— InstallCommand.symlink has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelfupgradeCommand.upgradeGrav (cognitive 17) system/src/Grav/Console/Gpm/SelfupgradeCommand.php:619— SelfupgradeCommand.upgradeGrav has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UpdateCommand.userInputPackages (cognitive 17) system/src/Grav/Console/Gpm/UpdateCommand.php:317— UpdateCommand.userInputPackages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlexDirectory.loadIndex (cognitive 17) system/src/Grav/Framework/Flex/FlexDirectory.php:1085— FlexDirectory.loadIndex has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 2 (5 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlexObject.refresh (cognitive 17) system/src/Grav/Framework/Flex/FlexObject.php:200— FlexObject.refresh has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 1 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FolderStorage.deleteRows (cognitive 17) system/src/Grav/Framework/Flex/Storage/FolderStorage.php:178— FolderStorage.deleteRows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlexMediaTrait.addUpdatedMedia (cognitive 17) system/src/Grav/Framework/Flex/Traits/FlexMediaTrait.php:436— FlexMediaTrait.addUpdatedMedia has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Validation.checkSafety (cognitive 16) system/src/Grav/Common/Data/Validation.php:142— Validation.checkSafety has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Debugger.debuggerRequest (cognitive 16) system/src/Grav/Common/Debugger.php:353— Debugger.debuggerRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, ternaries 3 (5 pts), boolean chains 3, error handling 1 (nesting depth added 2). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PageObject.filterElements (cognitive 16) system/src/Grav/Common/Flex/Types/Pages/PageObject.php:705— PageObject.filterElements has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GPM.findPackages (cognitive 16) system/src/Grav/Common/GPM/GPM.php:881— GPM.findPackages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Collection.filterByPageFlag (cognitive 16) system/src/Grav/Common/Page/Collection.php:420— Collection.filterByPageFlag has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Page.url (cognitive 16) system/src/Grav/Common/Page/Page.php:2347— Page.url has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 3 (4 pts) (nesting depth added 2). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Pages.referrerRoute (cognitive 16) system/src/Grav/Common/Page/Pages.php:248— Pages.referrerRoute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pages.findSiteBasedRoute (cognitive 16) system/src/Grav/Common/Page/Pages.php:1287— Pages.findSiteBasedRoute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Job.run (cognitive 16) system/src/Grav/Common/Scheduler/Job.php:524— Job.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scheduler.loadSavedJobs (cognitive 16) system/src/Grav/Common/Scheduler/Scheduler.php:131— Scheduler.loadSavedJobs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Security.normalizeMethodsMap (cognitive 16) system/src/Grav/Common/Security.php:2020— Security.normalizeMethodsMap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Security.getNonceKey (cognitive 16) system/src/Grav/Common/Security.php:2121— Security.getNonceKey has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2, boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Themes.configure (cognitive 16) system/src/Grav/Common/Themes.php:338— Themes.configure has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GravExtension.nicetimeFunc (cognitive 16) system/src/Grav/Common/Twig/Extension/GravExtension.php:953— GravExtension.nicetimeFunc has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GravExtension.authorize (cognitive 16) system/src/Grav/Common/Twig/Extension/GravExtension.php:1604— GravExtension.authorize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TwigNodeScript.compile (cognitive 16) system/src/Grav/Common/Twig/Node/TwigNodeScript.php:53— TwigNodeScript.compile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, ternaries 4 (8 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Group.save (cognitive 16) system/src/Grav/Common/User/Group.php:97— Group.save has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InstallCommand.addSymlinks (cognitive 16) system/src/Grav/Console/Cli/InstallCommand.php:264— InstallCommand.addSymlinks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JsonFormatter.getEncodeOptions (cognitive 16) system/src/Grav/Framework/File/Formatter/JsonFormatter.php:71— JsonFormatter.getEncodeOptions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 1 (4 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (JsonFormatter.getDecodeOptions) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
JsonFormatter.getDecodeOptions (cognitive 16) system/src/Grav/Framework/File/Formatter/JsonFormatter.php:98— JsonFormatter.getDecodeOptions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 1 (4 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (JsonFormatter.getEncodeOptions) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Filesystem.normalizePathPart (cognitive 16) system/src/Grav/Framework/Filesystem/Filesystem.php:301— Filesystem.normalizePathPart has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlexDirectory.dynamicFlexField (cognitive 16) system/src/Grav/Framework/Flex/FlexDirectory.php:973— FlexDirectory.dynamicFlexField has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlexObject.searchValue (cognitive 16) system/src/Grav/Framework/Flex/FlexObject.php:392— FlexObject.searchValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PageRoutableTrait.url (cognitive 16) system/src/Grav/Framework/Flex/Pages/Traits/PageRoutableTrait.php:126— PageRoutableTrait.url has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 3 (4 pts) (nesting depth added 2). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FlexMediaTrait.buildMediaList (cognitive 16) system/src/Grav/Framework/Flex/Traits/FlexMediaTrait.php:336— FlexMediaTrait.buildMediaList has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (7 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session.regenerateId (cognitive 16) system/src/Grav/Framework/Session/Session.php:359— Session.regenerateId has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Install.detectPsrLogConflicts (cognitive 16) system/src/Grav/Installer/Install.php:945— Install.detectPsrLogConflicts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Install.detectMonologConflicts (cognitive 16) system/src/Grav/Installer/Install.php:988— Install.detectMonologConflicts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Near-duplicate member pair (39 shared lines) system/src/Grav/Common/Twig/Node/TwigNodeLink.php:54— system/src/Grav/Common/Twig/Node/TwigNodeLink.php:54-112 | system/src/Grav/Common/Twig/Node/TwigNodeStyle.php:54-131 — These two members are variants of one another: 39 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×1
Edited copy of a member (31 corresponding lines) system/src/Grav/Common/Inflector.php:65— system/src/Grav/Common/Inflector.php:65-97 | system/src/Grav/Common/Inflector.php:110-142 — These two members are one piece of code written twice and then edited apart: 31 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· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) system/src/Grav/Common/Twig/TokenParser/TwigTokenParserLink.php:65— system/src/Grav/Common/Twig/TokenParser/TwigTokenParserLink.php:65-97 | system/src/Grav/Common/Twig/TokenParser/TwigTokenParserRender.php:45-62 | system/src/Grav/Common/Twig/TokenParser/TwigTokenParserScript.php:64-111 | system/src/Grav/Common/Twig/TokenParser/TwigTokenParserStyle.php:57-98 — 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.
Duplicated block (40 lines × 2) system/src/Grav/Common/Scheduler/JobQueue.php:142— system/src/Grav/Common/Scheduler/JobQueue.php:142-181 | system/src/Grav/Common/Scheduler/JobQueue.php:209-248 — 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 `system/src/Grav/Common/Scheduler/JobQueue.php:142` 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 (39–40 lines × 2) system/src/Grav/Framework/Flex/FlexCollection.php:402— system/src/Grav/Framework/Flex/FlexCollection.php:402-440 | system/src/Grav/Framework/Flex/FlexObject.php:581-620 — before extracting anything, compare `system/src/Grav/Framework/Flex/FlexCollection.php` and `system/src/Grav/Framework/Flex/FlexObject.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 121 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 `system/src/Grav/Framework/Flex/FlexCollection.php:402` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `system/src/Grav/Framework/Flex/FlexObject.php:621` calls `getKey` and `system/src/Grav/Framework/Flex/FlexCollection.php:441` does not — after which the two agree again for 4 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.
Duplicated block (37 lines × 2) system/src/Grav/Common/GPM/GPM.php:301— system/src/Grav/Common/GPM/GPM.php:301-337 | system/src/Grav/Common/GPM/GPM.php:446-482 — 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 (36 lines × 2) system/src/Grav/Common/Page/Page.php:2354— system/src/Grav/Common/Page/Page.php:2354-2389 | system/src/Grav/Framework/Flex/Pages/Traits/PageRoutableTrait.php:134-169 — 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 (28–29 lines × 2) system/src/Grav/Framework/Controller/Traits/ControllerResponseTrait.php:215— system/src/Grav/Framework/Controller/Traits/ControllerResponseTrait.php:215-243 | system/src/Grav/Framework/RequestHandler/Middlewares/Exceptions.php:43-70 — 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 (27–28 lines × 3) system/src/Grav/Common/Assets/Pipeline.php:490— system/src/Grav/Common/Assets/Pipeline.php:490-516 | system/src/Grav/Common/Assets/Pipeline.php:561-587 | system/src/Grav/Common/Assets/Traits/AssetUtilsTrait.php:75-102 — 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.
Duplicated block (28 lines × 2) system/src/Grav/Common/Inflector.php:68— system/src/Grav/Common/Inflector.php:68-95 | system/src/Grav/Common/Inflector.php:113-140 — 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 `system/src/Grav/Common/Inflector.php:68` 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 (22 lines × 2) system/src/Grav/Common/GPM/Local/Package.php:92— system/src/Grav/Common/GPM/Local/Package.php:92-113 | system/src/Grav/Installer/Install.php:1203-1224 — 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 (21–22 lines × 2) system/src/Grav/Framework/Flex/FlexCollection.php:706— system/src/Grav/Framework/Flex/FlexCollection.php:706-727 | system/src/Grav/Framework/Flex/FlexObject.php:1167-1187 — before extracting anything, compare `system/src/Grav/Framework/Flex/FlexCollection.php` and `system/src/Grav/Framework/Flex/FlexObject.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 121 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.
Duplicated block (21 lines × 3) system/src/Grav/Common/Flex/Types/Pages/Traits/PageRoutableTrait.php:100— system/src/Grav/Common/Flex/Types/Pages/Traits/PageRoutableTrait.php:100-120 | system/src/Grav/Common/Page/Page.php:3021-3041 | system/src/Grav/Framework/Flex/Pages/Traits/PageRoutableTrait.php:518-538 — 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. 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 (17–20 lines × 2) system/src/Grav/Common/Security.php:151— system/src/Grav/Common/Security.php:151-170 | system/src/Grav/Common/Security.php:1676-1692 — 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 `system/src/Grav/Common/Security.php:151` 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 (16–18 lines × 2) system/src/Grav/Common/Scheduler/Scheduler.php:1270— system/src/Grav/Common/Scheduler/Scheduler.php:1270-1287 | system/src/Grav/Common/Scheduler/Scheduler.php:1378-1393 — 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 `system/src/Grav/Common/Scheduler/Scheduler.php:1270` 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 (15 lines × 3) system/src/Grav/Common/Twig/TokenParser/TwigTokenParserLink.php:81— system/src/Grav/Common/Twig/TokenParser/TwigTokenParserLink.php:81-95 | system/src/Grav/Common/Twig/TokenParser/TwigTokenParserScript.php:95-109 | system/src/Grav/Common/Twig/TokenParser/TwigTokenParserStyle.php:82-96 — before extracting anything, compare `system/src/Grav/Common/Twig/TokenParser/TwigTokenParserScript.php` and `system/src/Grav/Common/Twig/TokenParser/TwigTokenParserStyle.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 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 `system/src/Grav/Common/Twig/TokenParser/TwigTokenParserLink.php:81` 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 (14–15 lines × 2) system/src/Grav/Common/Twig/Node/TwigNodeScript.php:104— system/src/Grav/Common/Twig/Node/TwigNodeScript.php:104-117 | system/src/Grav/Common/Twig/Node/TwigNodeScript.php:126-140 — 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 `system/src/Grav/Common/Twig/Node/TwigNodeScript.php:104` 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 (14 lines × 3) system/src/Grav/Common/Twig/Compatibility/Twig3CompatibilityTransformer.php:144— system/src/Grav/Common/Twig/Compatibility/Twig3CompatibilityTransformer.php:144-157 | system/src/Grav/Common/Twig/Compatibility/Twig3CompatibilityTransformer.php:199-212 | system/src/Grav/Common/Twig/Compatibility/Twig3CompatibilityTransformer.php:219-232 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (14 lines × 2) system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php:466— system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php:466-479 | system/src/Grav/Framework/Flex/Storage/FolderStorage.php:446-459 — 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 `system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php:466` 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.
Duplicated block (13 lines × 3) system/src/Grav/Common/Service/ConfigServiceProvider.php:355— system/src/Grav/Common/Service/ConfigServiceProvider.php:355-367 | system/src/Grav/Common/Service/ConfigServiceProvider.php:385-397 | system/src/Grav/Common/Service/ConfigServiceProvider.php:401-413 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `system/src/Grav/Common/Service/ConfigServiceProvider.php:355` 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 (12 lines × 5) system/src/Grav/Common/Twig/Node/TwigNodeLink.php:73— system/src/Grav/Common/Twig/Node/TwigNodeLink.php:73-84 | system/src/Grav/Common/Twig/Node/TwigNodeScript.php:58-69 | system/src/Grav/Common/Twig/Node/TwigNodeScript.php:72-83 | system/src/Grav/Common/Twig/Node/TwigNodeStyle.php:57-68 | system/src/Grav/Common/Twig/Node/TwigNodeStyle.php:71-82 — before extracting anything, compare `system/src/Grav/Common/Twig/Node/TwigNodeLink.php` and `system/src/Grav/Common/Twig/Node/TwigNodeStyle.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 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.
Duplicated block (12 lines × 4) system/src/Grav/Common/Twig/TokenParser/TwigTokenParserLink.php:84— system/src/Grav/Common/Twig/TokenParser/TwigTokenParserLink.php:84-95 | system/src/Grav/Common/Twig/TokenParser/TwigTokenParserRender.php:49-60 | system/src/Grav/Common/Twig/TokenParser/TwigTokenParserScript.php:98-109 | system/src/Grav/Common/Twig/TokenParser/TwigTokenParserStyle.php:85-96 — before extracting anything, compare `system/src/Grav/Common/Twig/TokenParser/TwigTokenParserScript.php` and `system/src/Grav/Common/Twig/TokenParser/TwigTokenParserStyle.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 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.
Duplicated block (10–11 lines × 6) system/src/Grav/Common/Twig/Node/TwigNodeLink.php:60— system/src/Grav/Common/Twig/Node/TwigNodeLink.php:60-70 | system/src/Grav/Common/Twig/Node/TwigNodeLink.php:72-81 | system/src/Grav/Common/Twig/Node/TwigNodeScript.php:57-66 | system/src/Grav/Common/Twig/Node/TwigNodeScript.php:71-80 | system/src/Grav/Common/Twig/Node/TwigNodeStyle.php:56-65 | system/src/Grav/Common/Twig/Node/TwigNodeStyle.php:70-79 — before extracting anything, compare `system/src/Grav/Common/Twig/Node/TwigNodeLink.php` and `system/src/Grav/Common/Twig/Node/TwigNodeStyle.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 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 `system/src/Grav/Common/Twig/Node/TwigNodeLink.php:60` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `system/src/Grav/Common/Twig/Node/TwigNodeLink.php:81` calls `write` and `system/src/Grav/Common/Twig/Node/TwigNodeLink.php:70` 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.
Duplicated block (11 lines × 3) system/src/Grav/Common/Flex/Traits/FlexCommonTrait.php:39— system/src/Grav/Common/Flex/Traits/FlexCommonTrait.php:39-49 | system/src/Grav/Framework/Flex/FlexCollection.php:648-658 | system/src/Grav/Framework/Flex/FlexObject.php:1226-1236 — before extracting anything, compare `system/src/Grav/Framework/Flex/FlexCollection.php` and `system/src/Grav/Framework/Flex/FlexObject.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 121 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `system/src/Grav/Framework/Flex/FlexObject.php:1221` calls `user_error` and `system/src/Grav/Framework/Flex/FlexCollection.php:644` 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.
Duplicated block (10–11 lines × 2) system/src/Grav/Common/Flex/Types/Pages/PageObject.php:305— system/src/Grav/Common/Flex/Types/Pages/PageObject.php:305-315 | system/src/Grav/Common/Flex/Types/Users/UserObject.php:647-656 — 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 (9–10 lines × 2) system/src/Grav/Console/Cli/PageSystemValidatorCommand.php:168— system/src/Grav/Console/Cli/PageSystemValidatorCommand.php:168-177 | system/src/Grav/Console/Cli/PageSystemValidatorCommand.php:179-187 — 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 (8 lines × 3) system/src/Grav/Common/Service/ConfigServiceProvider.php:107— system/src/Grav/Common/Service/ConfigServiceProvider.php:107-114 | system/src/Grav/Common/Service/ConfigServiceProvider.php:149-156 | system/src/Grav/Common/Service/ConfigServiceProvider.php:201-208 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `system/src/Grav/Common/Service/ConfigServiceProvider.php:107` 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 before the matched lines, `system/src/Grav/Common/Service/ConfigServiceProvider.php:199` calls `get` and `system/src/Grav/Common/Service/ConfigServiceProvider.php:104` 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.
Duplicated block (7–8 lines × 2) system/src/Grav/Common/Filesystem/Folder.php:87— system/src/Grav/Common/Filesystem/Folder.php:87-94 | system/src/Grav/Common/Helpers/YamlLinter.php:130-136 — 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. 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 (16 lines × 3) system/src/Grav/Common/Assets/InlineCss.php:27— system/src/Grav/Common/Assets/InlineCss.php:27-42 | system/src/Grav/Common/Assets/InlineJs.php:27-42 | system/src/Grav/Common/Assets/InlineJsModule.php:27-43 — before extracting anything, compare `system/src/Grav/Common/Assets/InlineJs.php` and `system/src/Grav/Common/Assets/InlineJsModule.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. 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 `system/src/Grav/Common/Assets/InlineCss.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.
Duplicated block (38 lines × 2) system/src/Grav/Framework/Object/Access/ArrayAccessTrait.php:27— system/src/Grav/Framework/Object/Access/ArrayAccessTrait.php:27-64 | system/src/Grav/Framework/Object/Access/OverloadedPropertyTrait.php:27-64 — 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 `system/src/Grav/Framework/Object/Access/ArrayAccessTrait.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.
Duplicated block (7 lines × 5) system/src/Grav/Common/Media/Traits/MediaPlayerTrait.php:27— system/src/Grav/Common/Media/Traits/MediaPlayerTrait.php:27-33 | system/src/Grav/Common/Media/Traits/MediaPlayerTrait.php:44-50 | system/src/Grav/Common/Media/Traits/MediaPlayerTrait.php:61-67 | system/src/Grav/Common/Media/Traits/MediaPlayerTrait.php:78-84 | system/src/Grav/Common/Media/Traits/VideoMediaTrait.php:42-48 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. 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.
M1 · Documentation (README)· README may be stale · ×1
README may be stale — 177 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
X24 · Document value interpolated into markup unescaped· Document value reaches a markup attribute unescaped · ×1
Document value reaches a markup attribute unescaped system/assets/debugger/clockwork.js:31— `route` carries text this program read out of a document — an attribute or a text node, which the DOM hands back already decoded, so an entity its author wrote is a live character again — and it is written straight into the `href` attribute of markup built here with nothing escaping it on the way. The value is chosen by whoever authored that document, not by this program, so it can close the attribute or element it sits in and open another — a crafted document becomes markup in what this code renders. Escape `route` at this site, or validate it against the shape the position accepts before interpolating it.
Orphaned file system/src/Grav/Framework/Flex/FlexForm.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/ContentBlock/HtmlBlock.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/Flex/FlexDirectoryForm.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/Flex/Storage/SimpleStorage.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Common/Page/Interfaces/PageLegacyInterface.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/Collection/AbstractIndexCollection.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/File/AbstractFile.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/Flex/Flex.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/Pagination/AbstractPagination.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/Psr7/AbstractUri.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/Route/Route.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/Cache/CacheTrait.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Console/ConsoleTrait.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/Psr7/ServerRequest.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/Filesystem/Filesystem.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/Object/Base/ObjectCollectionTrait.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Console/Cli/PageSystemValidatorCommand.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Common/Page/Media.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/Flex/Pages/Traits/PageTranslateTrait.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Common/Config/ConfigFileFinder.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Common/Page/Interfaces/PageContentInterface.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/Object/ObjectIndex.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Installer/Versions.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/Flex/Interfaces/FlexObjectInterface.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file system/src/Grav/Framework/Flex/Pages/Traits/PageAuthorsTrait.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate system/src/Grav/Common/GPM/Remote/GravCore.php:91— `!$cleanVersion || version_compare($diff, $cleanVersion[0], '>=')` appears character-identically in 2 files — system/src/Grav/Common/GPM/Remote/GravCore.php, system/src/Grav/Common/GPM/Remote/Package.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 system/src/Grav/Common/Markdown/Parsedown.php:32— `!$excerpts || $excerpts instanceof PageInterface || null !== $defaults` appears character-identically in 2 files — system/src/Grav/Common/Markdown/Parsedown.php, system/src/Grav/Common/Markdown/ParsedownExtra.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 system/src/Grav/Common/Page/Medium/ImageMedium.php:61— `!$path || !file_exists($path) || !filesize($path)` appears character-identically in 2 files — system/src/Grav/Common/Page/Medium/ImageMedium.php, system/src/Grav/Common/Page/Medium/VectorImageMedium.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 system/src/Grav/Console/Gpm/DirectInstallCommand.php:86— `!Installer::isGravInstance($this->destination) || !Installer::isValidDestination($this->destination, [Installer::EXISTS, Installer::IS_LINK]…` appears character-identically in 2 files — system/src/Grav/Console/Gpm/DirectInstallCommand.php, system/src/Grav/Console/Gpm/InstallCommand.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 system/src/Grav/Installer/Versions.php:308— `!is_array($current) || !isset($current[$field])` appears character-identically in 2 files — system/src/Grav/Installer/Versions.php, system/src/Grav/Installer/YamlUpdater.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 system/src/Grav/Installer/updates/2.1.0_2026-09-10_0.php:27— `!is_file($file) || !is_readable($file) || !is_writable($file)` appears character-identically in 4 files — system/src/Grav/Installer/updates/2.1.0_2026-09-10_0.php, system/src/Grav/Installer/updates/2.1.10_2026-09-22_0.php, system/src/Grav/Installer/updates/2.1.8_2026-09-18_0.php, system/src/Grav/Installer/updates/2.2.2_2026-09-28_1.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 system/src/Grav/Common/Flex/Types/Pages/PageIndex.php:762— `!method_exists($storage, 'isIndexed') || !$storage` appears character-identically in 2 files — system/src/Grav/Common/Flex/Types/Pages/PageIndex.php, system/src/Grav/Framework/Flex/FlexIndex.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 system/src/Grav/Common/Flex/Traits/FlexCollectionTrait.php:38— `!str_starts_with($name, 'onFlexCollection') && str_starts_with($name, 'on')` appears character-identically in 2 files — system/src/Grav/Common/Flex/Traits/FlexCollectionTrait.php, system/src/Grav/Framework/Flex/FlexCollection.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 system/src/Grav/Common/Flex/Traits/FlexObjectTrait.php:49— `!str_starts_with($name, 'onFlexObject') && str_starts_with($name, 'on')` appears character-identically in 2 files — system/src/Grav/Common/Flex/Traits/FlexObjectTrait.php, system/src/Grav/Framework/Flex/FlexObject.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 system/src/Grav/Common/Filesystem/ZipArchiver.php:235— `$buffer !== '' && fwrite($out, $buffer) === false` appears character-identically in 2 files — system/src/Grav/Common/Filesystem/ZipArchiver.php, system/src/Grav/Common/GPM/Installer.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 system/src/Grav/Common/Page/Page.php:992— `$content_twig_requested && !$content_twig_allowed && !$this` appears character-identically in 2 files — system/src/Grav/Common/Page/Page.php, system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.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 system/src/Grav/Common/Page/Page.php:2384— `$extension !== '' && !$raw_route && $this` appears character-identically in 2 files — system/src/Grav/Common/Page/Page.php, system/src/Grav/Framework/Flex/Pages/Traits/PageRoutableTrait.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 system/src/Grav/Framework/Relationships/ToManyRelationship.php:136— `$identifier && is_callable([$identifier, 'getObject'])` appears character-identically in 2 files — system/src/Grav/Framework/Relationships/ToManyRelationship.php, system/src/Grav/Framework/Relationships/ToOneRelationship.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 system/src/Grav/Common/Flex/Types/Pages/Traits/PageLegacyTrait.php:151— `$inheritedParams && is_array($inheritedParams)` appears character-identically in 3 files — system/src/Grav/Common/Flex/Types/Pages/Traits/PageLegacyTrait.php, system/src/Grav/Common/Page/Page.php, system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.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 system/src/Grav/Common/Page/Page.php:2228— `$separator && $separator < strlen($key) - 1` appears character-identically in 2 files — system/src/Grav/Common/Page/Page.php, system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.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 system/src/Grav/Common/Flex/Types/Pages/PageCollection.php:461— `(!$start || $date >= $start) && (!$end || $date <= $end)` appears character-identically in 2 files — system/src/Grav/Common/Flex/Types/Pages/PageCollection.php, system/src/Grav/Common/Page/Collection.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 system/src/Grav/Common/Assets/Pipeline.php:502— `($this->base_url !== '/') && Utils::startsWith($relative_path, $this->base_url)` appears character-identically in 2 files — system/src/Grav/Common/Assets/Pipeline.php, system/src/Grav/Common/Assets/Traits/AssetUtilsTrait.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 system/src/Grav/Framework/Flex/FlexObject.php:888— `(is_array($current) || $current instanceof ArrayAccess) && isset($current[$offset])` appears character-identically in 2 files — system/src/Grav/Framework/Flex/FlexObject.php, system/src/Grav/Framework/Form/Traits/FormTrait.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 system/src/Grav/Common/Page/Page.php:2190— `get('system.strict_mode.twig2_compat', false) || $config` appears character-identically in 2 files — system/src/Grav/Common/Page/Page.php, system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.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 system/src/Grav/Framework/Psr7/Uri.php:60— `getPort() === null || GuzzleUri::isDefaultPort($this)` appears character-identically in 2 files — system/src/Grav/Framework/Psr7/Uri.php, system/src/Grav/Framework/Uri/Uri.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 system/src/Twig/DeferredExtension/DeferredNodeVisitor.php:27— `hasDeferred && $node instanceof DeferredBlockNode` appears character-identically in 2 files — system/src/Twig/DeferredExtension/DeferredNodeVisitor.php, system/src/Twig/DeferredExtension/DeferredNodeVisitorCompat.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 system/src/Twig/DeferredExtension/DeferredNodeVisitor.php:36— `hasDeferred && $node instanceof ModuleNode` appears character-identically in 2 files — system/src/Twig/DeferredExtension/DeferredNodeVisitor.php, system/src/Twig/DeferredExtension/DeferredNodeVisitorCompat.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 system/src/Grav/Console/Gpm/InfoCommand.php:145— `is_array($compat) && !empty($compat['grav'])` appears character-identically in 2 files — system/src/Grav/Console/Gpm/InfoCommand.php, system/src/Grav/Console/Gpm/UpdateCommand.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 system/src/Grav/Common/Data/Blueprint.php:204— `is_array($current) && isset($current[$field])` appears character-identically in 4 files — system/src/Grav/Common/Data/Blueprint.php, system/src/Grav/Common/Page/Page.php, system/src/Grav/Installer/Versions.php, system/src/Grav/Installer/YamlUpdater.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 system/src/Grav/Common/Data/Blueprint.php:675— `is_array($data) && isset($field[$property]) && is_array($field[$property])` appears character-identically in 2 files — system/src/Grav/Common/Data/Blueprint.php, system/src/Grav/Framework/Flex/FlexDirectory.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.
Interpolated log message defeats structured logging system/src/Grav/Common/Scheduler/Scheduler.php:390— `debug` at line 390 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->debug('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::debug('order moved', ['order_id' => $orderId])` with Laravel's facade.
Interpolated log message defeats structured logging system/src/Grav/Common/Scheduler/Scheduler.php:408— `debug` at line 408 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->debug('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::debug('order moved', ['order_id' => $orderId])` with Laravel's facade.
Interpolated log message defeats structured logging system/src/Grav/Common/Scheduler/Scheduler.php:462— `warning` at line 462 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->warning('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::warning('order moved', ['order_id' => $orderId])` with Laravel's facade.
Interpolated log message defeats structured logging system/src/Grav/Common/Scheduler/Scheduler.php:464— `info` at line 464 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->info('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::info('order moved', ['order_id' => $orderId])` with Laravel's facade.
Interpolated log message defeats structured logging system/src/Grav/Common/Scheduler/Scheduler.php:1276— `info` at line 1276 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->info('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::info('order moved', ['order_id' => $orderId])` with Laravel's facade.
Interpolated log message defeats structured logging system/src/Grav/Common/Scheduler/Scheduler.php:1282— `error` at line 1282 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->error('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::error('order moved', ['order_id' => $orderId])` with Laravel's facade.
Interpolated log message defeats structured logging system/src/Grav/Common/Scheduler/Scheduler.php:1384— `info` at line 1384 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->info('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::info('order moved', ['order_id' => $orderId])` with Laravel's facade.
Interpolated log message defeats structured logging system/src/Grav/Common/Scheduler/Scheduler.php:1389— `error` at line 1389 is handed a double-quoted string with variables interpolated into it as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values in the PSR-3 context array instead: `$logger->error('Order {order_id} moved to {status}', ['order_id' => $orderId, 'status' => $status])`, which Monolog and every PSR-3 handler keep as fields beside the message (Monolog's PsrLogMessageProcessor fills the placeholders), or `Log::error('order moved', ['order_id' => $orderId])` with Laravel's facade.
Silent fallback default in catch system/src/Grav/Common/Page/PageIndexStore.php:286— `readAll` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
Silent fallback default in catch system/src/Grav/Common/Page/PageIndexStore.php:326— `readAllRoutes` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
Silent fallback default in catch system/src/Grav/Common/Page/PageIndexStore.php:400— `readTaxonomyValue` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
Silent fallback default in catch system/src/Grav/Common/Page/PageIndexStore.php:422— `readTaxonomy` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
Silent fallback default in catch system/src/Grav/Common/Security.php:1530— `recentTwigContentEvents` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
Silent fallback default in catch system/src/Grav/Common/Security.php:1648— `resolveTwigContentEvents` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
Silent fallback default in catch system/src/Grav/Common/Utils.php:917— `getPageFormat` swallows every exception into `return 'html'` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 92 significant file(s) lose their only recent owner: system/src/Grav/Common/Page/Pages.php, system/src/Grav/Common/Security.php, system/src/Grav/Common/GPM/GPM.php, system/src/Grav/Common/Scheduler/Scheduler.php, system/src/Grav/Common/Data/Validation.php, system/src/Grav/Installer/Install.php, system/src/Grav/Framework/Flex/FlexDirectory.php, system/src/Grav/Common/Twig/Twig.php (+84 more). Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 4 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (97 single-owned of 287 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 287 of the 529 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: system/src/Grav/Common/Helpers/LogViewer.php, system/src/Grav/Console/Cli/LogViewerCommand.php, system/src/Grav/Common/Page/Interfaces/PageCollectionInterface.php, system/src/Grav/Common/Media/Interfaces/ImageManipulateInterface.php, system/src/Grav/Common/Media/Traits/MediaPlayerTrait.php.
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (104380 LoC, 531 module-visible types across 123 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
REDACTED
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 117 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: system/src/Grav/Framework/Flex/FlexForm.php, system/src/Grav/Framework/ContentBlock/HtmlBlock.php, system/src/Grav/Framework/Flex/FlexDirectoryForm.php, system/src/Grav/Framework/Flex/Storage/SimpleStorage.php, system/src/Grav/Common/Page/Interfaces/PageLegacyInterface.php, system/src/Grav/Framework/Collection/AbstractIndexCollection.php, system/src/Grav/Framework/File/AbstractFile.php, system/src/Grav/Framework/Flex/Flex.php (and 109 more) (120 orphaned of 287 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 287 of the 529 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
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.
No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
No security response headers detected webserver-configs/nginx.conf:1— None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `nginx.conf` is committed to this repository and declares the server that serves it, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.)
X5 · Nullable reference types· PHP static analysis does not check null everywhere · ×1
PHP static analysis does not check null everywhere — This repository commits no PHPStan or Psalm configuration (`phpstan.neon[.dist]`, `phpstan.dist.neon`, `psalm.xml[.dist]`, or one a composer.json script names with `--configuration`), so nothing checks null: a `?Customer` reaches `->name()` silently and throws `Error: Call to a member function name() on null` the first time it is null. If the build passes a level on a command line instead, put it in a committed configuration — this check reads configuration, and configuration is all it can read.
Silent fallback default on parse failure system/src/Grav/Common/Cache/SymfonyCacheProvider.php:60— `doFetchMultiple` returns `[]` when `InvalidArgumentException` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
Outdated: composer/ca-bundle — `composer/ca-bundle` is locked at 1.5.14 but 1.6.0 is the current stable release on Packagist, and it already satisfies the `^1.5` constraint declared in composer.json — so the lockfile is behind this repository's own declared range. Run `composer update composer/ca-bundle` and commit the updated REDACTED.
Outdated: composer/semver — `composer/semver` is locked at 3.4.4 but 3.5.2 is the current stable release on Packagist, and it already satisfies the `^3.4` constraint declared in composer.json — so the lockfile is behind this repository's own declared range. Run `composer update composer/semver` and commit the updated REDACTED.
Outdated: dragonmantank/cron-expression — `dragonmantank/cron-expression` is locked at v3.6.0 but v3.6.1 is the current stable release on Packagist, and it already satisfies the `^3.3` constraint declared in composer.json — so the lockfile is behind this repository's own declared range. Run `composer update dragonmantank/cron-expression` and commit the updated REDACTED.
Outdated: filp/whoops — `filp/whoops` is locked at 2.18.5 but 2.18.7 is the current stable release on Packagist, and it already satisfies the `~2.16` constraint declared in composer.json — so the lockfile is behind this repository's own declared range. Run `composer update filp/whoops` and commit the updated REDACTED.
Outdated: league/html-to-markdown — `league/html-to-markdown` is locked at 5.1.2 but 5.2.3 is the current stable release on Packagist, and it already satisfies the `^5.1` constraint declared in composer.json — so the lockfile is behind this repository's own declared range. Run `composer update league/html-to-markdown` and commit the updated REDACTED.
Outdated: monolog/monolog — `monolog/monolog` is locked at 3.12.0 but 3.12.1 is the current stable release on Packagist, and it already satisfies the `^3.0` constraint declared in composer.json — so the lockfile is behind this repository's own declared range. Run `composer update monolog/monolog` and commit the updated REDACTED.
Outdated: symfony/polyfill-iconv — `symfony/polyfill-iconv` is locked at v1.37.0 but v1.43.0 is the current stable release on Packagist, and it already satisfies the `^1.31` constraint declared in composer.json — so the lockfile is behind this repository's own declared range. Run `composer update symfony/polyfill-iconv` and commit the updated REDACTED.
Outdated: symfony/polyfill-mbstring — `symfony/polyfill-mbstring` is locked at v1.38.2 but v1.43.0 is the current stable release on Packagist, and it already satisfies the `^1.31` constraint declared in composer.json — so the lockfile is behind this repository's own declared range. Run `composer update symfony/polyfill-mbstring` and commit the updated REDACTED.
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.
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 31 file(s) — `system/src/Grav/Common/Assets.php`, `system/src/Grav/Common/Backup/Backups.php`, `system/src/Grav/Common/Cache.php`, `system/src/Grav/Common/Debugger.php`, `system/src/Grav/Common/File/CompiledFile.php`, … (+26 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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.
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.
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.
Run 01a16663-fa1c-7da8-923f-17aa364b254d · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 34 · Warnings: 715 · Recommendations: 173 · Info: 8 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 23-10-2026 @ 01:33 UTC.
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.