Public report of openbenches/openbenches.org, published 16 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 16 November 2026, 16:53 UTC · Survey ID cd_6ed5dee532704ef3ae3934f5ba758d4a
openbenches/openbenches.org
Measured 16 November 2026, 16:53 UTC, at code version 287c640
Knowledge freshness is not measured: Freshness signal contradicted by repo activity.
CAI scoreAt risk
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 42,637 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 0.2 person-years · Weakest lens: Production Readiness, 15.9
Findings by how serious they are
92 critical892 serious64 minor
20 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
16 November 2026, 16:53 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
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. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
51of 51 dimensions measured by tools.
1039of 1048 findings point to an exact file and line, so you can open each one in the code. The other 9 concern the repository as a whole, such as missing documentation.
51dimensions across 7 lenses, read from 42,637 lines of product code in 2 projects.
openbenches/openbenches.org is rated At risk because critical security findings are open. Its score is held back because the project has no automated tests and we found no working pipeline that builds or tests changes to the code. It scores 21.2 out of 100, which the At risk rating leaves unchanged.
Production Readiness, at 15.9, is the weakest lens by a small margin, and the weakest lens counts most in the score. The best first step for the work it takes is adding access checks, worth about 3.4 points. Adding automated tests would lift Production Readiness itself, worth about 5.4 points.
Five known security holes in the packages the code depends on can be used by attackers. Five passwords or keys are open to anyone who can read the repository, and thirty-nine images have no description for people who can't see them. Updating the vulnerable packages, replacing each exposed password or key and describing the images would close these risks. The 19 labels or groups of fields with no name need connecting to their fields or naming.
The product code is 42,637 lines, about €36,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.
The weakest lenses score close to each other, so improving any of them moves the score.
Code composition: what the lines of code are
Product code 100%
Rebuild cost: about €36,000 · Estimate
Cost to rebuild
€12,000 to €61,000, for 201 to 637 hours of work, about 0.2 person-years for one engineer
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 21. 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
Medium: 42,637 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Raises the score by about 3.4 points · Medium effort · Access Controls
2
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with composer.json.
Raises the score by about 1.4 points · Low effort · ADR Quality
3
Resolve the 1 No automated tests finding(s) in Code Coverage.
Raises the score by about 5.4 points · High effort · Code Coverage
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €36,000 to build again, about 0.2 person-years of work. Its weakest lens is Production Readiness, at 15.9 (Critical). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
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 3.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 12% to 27% on every change. The history of the code shows how much it changes: about 944 lines over the last 90 days, which is about 3,828 lines a year. At that pace, the extra work comes to an estimated 1.1 to 6.8 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 our 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, never less than 2% to 5% and never more than 40% to 60% in all; 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.
If you do one thing first · First action
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do. Of all the actions in this report, it raises the score most for the work it takes: about 3.4 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
At a glance — Code Health · 16.8 · Critical · gated by D1, D2, D4, R1, R10, R3, X5 ·
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
29
Medium
A03:2025 — Software Supply Chain Failures
11
High / Critical
A07:2025 — Authentication Failures
9
High / Critical
Roadmap
Top priorities: Resolve the 1 No automated tests finding(s) in Code Coverage; Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do; Bring the 175 bodies over 15 down to 15 or less in Cognitive Complexity — start with SettingsLayoutFormController.index (cognitive 625), SettingsLayoutCommentsController.index (cognitive 584), (anonymous) (cognitive 577).
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may 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.
Run what this repository's stack ships: phpstan or psalm — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
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 — 92
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 — 892
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 — 64
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 20
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 51 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 51 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, 1039 of 1048 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 or a scanner, 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.
D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's dependency manifest (composer.json) was found, but this pass cannot parse it for hygiene, so no package was assessed. Zero packages read is NOT a clean dependency tree, so this is NOT SCORED — a gap in the analyzer, not a verdict about this repository. This row is about dependency HYGIENE — outdated, deprecated or unmaintained direct dependencies; known CVEs in the same dependency graph are a separate question, reported under D30 wherever the manifest is OSV-readable.
D14 License Compliance — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (composer.json), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (19 contributor(s) across 944 commit(s) sampled, automation and bot accounts excluded). One of them holds 93% of the history; the other 18 hold 0.4% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D22 Internal API Consistency — not measured this run — 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.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `www` (46660 LoC, 285 module-visible types across 55 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `www/src/Controller/ApiController.php` 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.
D34 Knowledge Freshness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. File-level freshness contradicts repo activity: 30 commits in the last 90 days, yet 28 of 43 significant files carry no living knowledge. Those two readings cannot both be true, so the per-file recency signal is treated as unreliable here and freshness is not scored for this run.
D44 Platform End-of-Life — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
AC1 Text alternatives — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 45 further occurrence(s) are not listed individually; the score already reflects all 85.
AC2 Forms & labels — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 1385 further occurrence(s) are not listed individually; the score already reflects all 1425.
AC3 Page structure — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 127 further occurrence(s) are not listed individually; the score already reflects all 167.
AC4 Keyboard semantics — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 296 further occurrence(s) are not listed individually; the score already reflects all 336.
AC6 Visual & motion safety — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 59 further occurrence(s) are not listed individually; the score already reflects all 99.
AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository's container is Symfony DependencyInjection, 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.
AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: 150 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'mysqli_connect' is imported (www/public/commentics/system/library/database/mysqli.php:21), 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'mysqli_connect' is imported (www/public/commentics/system/library/database/mysqli.php:21), 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'mysqli_connect' is imported (www/public/commentics/system/library/database/mysqli.php:21), 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'mysqli_connect' is imported (www/public/commentics/system/library/database/mysqli.php:21), 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's PHP, Python 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's PHP, Python 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.
P8 Schema migrations — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The schema may be created by a runner, a deploy script or a config file outside what this check reads, so an absence here is our blind spot rather than a missing migration strategy. The card abstains instead of scoring. You can widen what we reach: if the schema is created and evolved by a tool this check does not name, naming it lets us teach the detector to read it.
R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 7 further occurrence(s) are not listed individually; the score already reflects all 47.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 19 further occurrence(s) are not listed individually; the score already reflects all 59.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 57 further occurrence(s) are not listed individually; the score already reflects all 97.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala, Rust, Go, Swift, Erlang, F# and Visual Basic source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
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.
D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
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").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
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.
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.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
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.
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.
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.
102 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was SettingsLayoutFormController.index at 313. A further 2 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 (anonymous)::(anonymous)::e::m at 22 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: www/src/Controller/AddController.php (AddController.flickr_page at 21). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 97 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 34 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with SettingsLayoutFormController.index (cyclomatic 313), SettingsLayoutCommentsController.index (cyclomatic 301), common.cmtx_wait_for_jquery (cyclomatic 208). — 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 34 together lifts Cyclomatic Complexity from 2.0 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
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.
+ 170 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 175 bodies over 15 down to 15 or less in Cognitive Complexity — start with SettingsLayoutFormController.index (cognitive 625), SettingsLayoutCommentsController.index (cognitive 584), (anonymous) (cognitive 577). — 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 175 together lifts Cognitive Complexity from 2.0 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes5.6 / 10Adequate✓ 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 39 MethodTooLong finding(s) in God Classes — start with layout_form.php (3), REDACTED (3), layout_comments.php (2). — One of this dimension's main actionable groups (39 warning-level).
Resolve the 8 FileTooLong finding(s) in God Classes — start with REDACTED (2), REDACTED (2), layout_form.php. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 8 ClassTooLong finding(s) in God Classes — start with REDACTED (2), layout_form.php, layout_comments.php. — One of this dimension's main actionable groups (8 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
256 duplicated block group(s) detected. 25.4 % of the production lines (10,831 of 42,637) are in a reported copy. A further 70 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
+ 197 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 10 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with REDACTED (2), REDACTED (2), question.php. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 8 Members sharing a duplicated core (4 members, 50+ identical tokens) finding(s) in Code Duplication — start with questions.php, login.php, extra_fields.php. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 7 Duplicated block (12 lines × 3) finding(s) in Code Duplication — start with bans.php, export_import.php, comments.php. — One of this dimension's main actionable groups (7 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
2 production modules (source-import), 0 dependency cycle(s), 0 unstable depended-on module(s). No manifest declares this repository's modules, so the modules are its top-level source directories and the edges the imports between them; 0 module(s) off the main sequence, with abstractness counted on 1 of the 2 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
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.
Low cohesion: Base (LCOM4 7) · ×2www/public/commentics/system/engine/base.php:4
What to do
Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with base.php, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D8 · Code Coverage0.0 / 10Critical✓ Tool-verified
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
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: 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.
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.
8 deducted task-comment markers across 42637 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 5 TodoComment finding(s) in Explicit Debt — start with UserFunctions.php, ApiController.php, SearchController.php. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 3 HackComment finding(s) in Explicit Debt — start with AddController.php, EditController.php, UploadController.php. — One of this dimension's main actionable groups (3 warning-level).
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: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 9 document(s) read across 1 unit(s).
✓ 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: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with composer.json. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
doc comments repeat the nameswww/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:161
What to do
Resolve the 2 redundant comment finding(s) in Comment Value — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
7 finding(s): 0 critical, 5 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 5 REDACTED finding(s) in Secrets (history) — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-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).
29 finding(s): 0 critical, 0 high, 19 medium, 10 low. semgrep hit a parse error in 6 file(s) — `www/public/commentics/3rdparty/summernote/summernote-bs4.js`, `www/public/commentics/3rdparty/summernote/summernote-lite.js`, `www/public/commentics/3rdparty/summernote/summernote.js`, `REDACTED`, `www/public/js/pannellum-2.5.7/pannellum.js`, … (+1 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.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 13 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (13 warning-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
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. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 4 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4). — One of this dimension's main actionable groups (4 issue-level).
Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 4 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4). — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d30_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 1 Change coupling finding(s) in Change Coupling — start with AddController.php. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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. Reported 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. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
No dependency in any ecosystem this repository declares is published as malicious.
✓ On the Gold path — maintain.
Detailed fixes: d43_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives2.7 / 10Weak✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×39) — www/public/commentics/backend/view/default/template/edit/comment.tpl:160, www/public/commentics/backend/view/default/template/manage/admins.tpl:94, www/public/commentics/backend/view/default/template/manage/admins.tpl:95, …
A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. — www/public/commentics/backend/view/default/template/main/dashboard.tpl:150
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels1.9 / 10Critical✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×19) — www/public/commentics/backend/view/default/template/add/admin.tpl:31, www/public/commentics/backend/view/default/template/add/admin.tpl:39, www/public/commentics/backend/view/default/template/add/admin.tpl:47, …
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×17) — www/public/commentics/backend/view/default/template/add/admin.tpl:32, www/public/commentics/backend/view/default/template/add/admin.tpl:40, www/public/commentics/backend/view/default/template/add/admin.tpl:48, …
A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. (×4) — www/public/commentics/backend/view/default/template/add/admin.tpl:113, www/public/commentics/backend/view/default/template/add/ban.tpl:50, www/public/commentics/backend/view/default/template/add/country.tpl:77, …
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Do you agree with this assessment?
AC3 · Page structure2.9 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative. (×39) — www/public/commentics/backend/view/default/template/add/admin.tpl:7, www/public/commentics/backend/view/default/template/add/ban.tpl:7, www/public/commentics/backend/view/default/template/add/country.tpl:7, …
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). — www/public/commentics/backend/view/default/template/common/header.tpl:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. (×40) — www/public/commentics/backend/view/default/template/add/admin.tpl:71, www/public/commentics/backend/view/default/template/add/admin.tpl:77, www/public/commentics/backend/view/default/template/add/admin.tpl:83, …
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
aria-hidden="true" hides the element from assistive tech but leaves it keyboard-focusable — a confusing dead stop. Remove aria-hidden or make the element non-focusable. — www/templates/footer.html.twig:1
What to do
Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
`.pnlm-loading` moves (`animation-name: pnlm-mv`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — www/public/js/pannellum-2.5.7/pannellum.htm:3
`.pnlm-container` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — www/public/js/pannellum-2.5.7/pannellum.htm:3, www/public/js/pannellum-2.5.7/pannellum.css:2
`.success` sets color: #4f8a10 on background-color: #e8fcdc — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — www/public/commentics/install/view/default/stylesheet/sass/stylesheet.scss:147, www/public/commentics/install/view/default/stylesheet/css/stylesheet.css:3460
`.error` sets color: #d8000c on background-color: #ffbaba — 3.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — www/public/commentics/install/view/default/stylesheet/sass/stylesheet.scss:159, www/public/commentics/install/view/default/stylesheet/css/stylesheet.css:3472
`.warning` sets color: #9f6000 on background-color: #feefb3 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — www/public/commentics/install/view/default/stylesheet/sass/stylesheet.scss:165, www/public/commentics/install/view/default/stylesheet/css/stylesheet.css:3478
`.green, .amber, .red` sets color: #fff on background-color: #999 — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — www/public/commentics/install/view/default/stylesheet/sass/stylesheet.scss:201
`#system_page .green, #system_page .amber, #system_page .red` sets color: #fff on background-color: #999 — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — www/public/commentics/install/view/default/stylesheet/css/stylesheet.css:3506
`.cmtx_message_success` sets color: #4f8a10 on background-color: #e8fcdc — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — www/public/commentics/frontend/view/default/stylesheet/sass/partial/_form.scss:144, www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:2728
`.cmtx_message_error` sets color: #d8000c on background-color: #ffbaba — 3.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — www/public/commentics/frontend/view/default/stylesheet/sass/partial/_form.scss:150, www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:2734
`.cmtx_user_container .cmtx_avatar_selection_attribution` sets color: #fff on background-color: gray — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:4351
`.error_header` sets color: #d8000c on background-color: #ffbaba — 3.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — www/public/commentics/backend/view/default/stylesheet/sass/stylesheet.scss:56, www/public/commentics/backend/view/default/stylesheet/css/stylesheet.css:3374
`#main_dashboard_page .title` sets color: #fff on background-color: #7c7c7c — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — www/public/commentics/backend/view/default/stylesheet/sass/stylesheet.scss:449, www/public/commentics/backend/view/default/stylesheet/css/stylesheet.css:3764
`div.success` sets color: #4f8a10 on background-color: #e8fcdc — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — www/public/commentics/backend/view/default/stylesheet/sass/stylesheet.scss:1303, www/public/commentics/backend/view/default/stylesheet/css/stylesheet.css:4561
`div.error` sets color: #d8000c on background-color: #ffbaba — 3.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — www/public/commentics/backend/view/default/stylesheet/sass/stylesheet.scss:1315, www/public/commentics/backend/view/default/stylesheet/css/stylesheet.css:4573
`div.warning` sets color: #9f6000 on background-color: #feefb3 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — www/public/commentics/backend/view/default/stylesheet/sass/stylesheet.scss:1321, www/public/commentics/backend/view/default/stylesheet/css/stylesheet.css:4579
`.cmtx_action_area a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — www/public/commentics/frontend/view/default/stylesheet/sass/partial/_comments.scss:377, www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:3653
`.cmtx_share_box a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — www/public/commentics/frontend/view/default/stylesheet/sass/partial/_comments.scss:510, www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:3783
`.cmtx_view_replies_area a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — www/public/commentics/frontend/view/default/stylesheet/sass/partial/_comments.scss:559, www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:3832
`.cmtx_notify_block a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — www/public/commentics/frontend/view/default/stylesheet/sass/partial/_comments.scss:797, www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:4041
`.cmtx_rss_block a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — www/public/commentics/frontend/view/default/stylesheet/sass/partial/_comments.scss:869, www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:4109
`.cmtx_return a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — www/public/commentics/frontend/view/default/stylesheet/sass/partial/_comments.scss:1024
`#cmtx_upload` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — www/public/commentics/frontend/view/default/stylesheet/sass/partial/_upload.scss:30, www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:2525
`.cmtx_user_container .cmtx_table td:last-of-type a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — www/public/commentics/frontend/view/default/stylesheet/sass/partial/_user.scss:201
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
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.
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.
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
This repository serves requests — a Symfony controller action (#[Route]) (www/src/Controller/AddController.php:15) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected. — www/src/Controller/AddController.php:15
What to do
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
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 repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Do you agree with this assessment?
P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
What to do
Add a CI workflow that builds and runs the test suite on every push/PR.
Do you agree with this assessment?
P2 · Observability7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
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.
No static application security testing detected. For this repository's stack, add phpstan or psalm (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
Run what this repository's stack ships: phpstan or psalm — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
`requests.post(` 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. — database/getOSM.py:22
`file_get_contents('https://` 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. — REDACTED:911
`file_get_contents('http://` 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. — REDACTED:78
`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. (×3) — www/src/Controller/UserController.php:56, www/src/Controller/UserController.php:108, www/src/Controller/UserController.php:133
`->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. (×3) — www/src/Controller/UserController.php:59, www/src/Controller/UserController.php:109, www/src/Controller/UserController.php:134
What to do
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
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.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Do you agree with this assessment?
R1 · Type Safety0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
0 typed · 16 plain JS — the untyped files are www/public/commentics/backend/view/default/javascript/common.js, REDACTED, www/public/commentics/frontend/view/default/javascript/autodetect.js, REDACTED, www/public/commentics/install/view/default/javascript/common.js, www/public/js/JavaScript-Load-Image-5.16.0/js/index.js (+10 more).
What to do
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
www/public/commentics/backend/view/default/javascript/common.js:1521 · www/public/commentics/backend/view/default/javascript/common.js:1577 · www/public/commentics/backend/view/default/javascript/common.js:1888 — 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. — www/public/commentics/backend/view/default/javascript/common.js:1521
www/public/commentics/backend/view/default/javascript/common.js:45 · www/public/commentics/install/view/default/javascript/common.js:3 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — www/public/commentics/backend/view/default/javascript/common.js:45
www/public/commentics/backend/view/default/javascript/common.js:2407 · www/public/commentics/backend/view/default/javascript/common.js:2442 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — www/public/commentics/backend/view/default/javascript/common.js:2407
REDACTED:2061 · REDACTED:2116 — 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. — REDACTED:2061
REDACTED:957 · REDACTED:1270 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:957
www/public/commentics/backend/view/default/javascript/common.js:243 · www/public/commentics/backend/view/default/javascript/common.js:1706 — 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. — www/public/commentics/backend/view/default/javascript/common.js:243
www/public/commentics/backend/view/default/javascript/common.js:300 · www/public/commentics/backend/view/default/javascript/common.js:327 · www/public/commentics/backend/view/default/javascript/common.js:1782 · www/public/commentics/backend/view/default/javascript/common.js:1862 — all 4 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. — www/public/commentics/backend/view/default/javascript/common.js:300
www/public/commentics/backend/view/default/javascript/common.js:483 · www/public/commentics/backend/view/default/javascript/common.js:547 · www/public/commentics/backend/view/default/javascript/common.js:647 · www/public/commentics/backend/view/default/javascript/common.js:666 · +18 more site(s) not listed — all 22 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. — www/public/commentics/backend/view/default/javascript/common.js:483
REDACTED:1516 · REDACTED:1916 — 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. — REDACTED:1516
www/public/commentics/backend/view/default/javascript/common.js:202 · www/public/commentics/backend/view/default/javascript/common.js:757 · www/public/commentics/backend/view/default/javascript/common.js:2301 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — www/public/commentics/backend/view/default/javascript/common.js:202
REDACTED:234 · REDACTED:261 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:234
www/public/commentics/backend/view/default/javascript/common.js:503 · www/public/commentics/backend/view/default/javascript/common.js:567 · www/public/commentics/backend/view/default/javascript/common.js:889 · www/public/commentics/backend/view/default/javascript/common.js:990 · +6 more site(s) not listed — all 10 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. — www/public/commentics/backend/view/default/javascript/common.js:503
REDACTED:94 · REDACTED:121 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:94
REDACTED:299 · REDACTED:326 — 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. — REDACTED:299
www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js:397 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js:441 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js:397
REDACTED:1399 · REDACTED:1571 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:1399
REDACTED:2268 · REDACTED:2290 — 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. — REDACTED:2268
www/public/commentics/backend/view/default/javascript/common.js:1811 · www/public/commentics/backend/view/default/javascript/common.js:1831 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — www/public/commentics/backend/view/default/javascript/common.js:1811
www/public/commentics/backend/view/default/javascript/common.js:2516 · www/public/commentics/backend/view/default/javascript/common.js:2532 · www/public/commentics/backend/view/default/javascript/common.js:2548 · www/public/commentics/backend/view/default/javascript/common.js:2564 · +3 more site(s) not listed — all 7 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — www/public/commentics/backend/view/default/javascript/common.js:2516
REDACTED:607 · REDACTED:661 · REDACTED:719 — 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. — REDACTED:607
www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:121 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:138 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:121
www/public/commentics/backend/view/default/javascript/common.js:704 · www/public/commentics/backend/view/default/javascript/common.js:1408 · www/public/commentics/backend/view/default/javascript/common.js:2254 — 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. — www/public/commentics/backend/view/default/javascript/common.js:704
REDACTED:1788 · REDACTED:2269 · REDACTED:2291 — 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. — REDACTED:1788
www/public/commentics/backend/view/default/javascript/common.js:113 · www/public/commentics/backend/view/default/javascript/common.js:134 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — www/public/commentics/backend/view/default/javascript/common.js:113
REDACTED:509 · REDACTED:531 · REDACTED:553 · REDACTED:575 — all 4 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. — REDACTED:509
REDACTED:1436 · REDACTED:1611 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:1436
www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:16 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-iptc.js:15 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:16
www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-fetch.js:14 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-meta.js:18 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-scale.js:14 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-fetch.js:14
www/public/commentics/backend/view/default/javascript/common.js:437 · www/public/commentics/backend/view/default/javascript/common.js:455 · www/public/commentics/backend/view/default/javascript/common.js:519 · www/public/commentics/backend/view/default/javascript/common.js:583 · +15 more site(s) not listed — all 19 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. — www/public/commentics/backend/view/default/javascript/common.js:437
REDACTED:347 · REDACTED:366 — 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. — REDACTED:347
REDACTED:639 · REDACTED:747 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:639
REDACTED:686 · REDACTED:742 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:686
REDACTED:794 · REDACTED:1212 — 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. — REDACTED:794
REDACTED:1105 · REDACTED:1364 · REDACTED:1493 · REDACTED:1563 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:1105
www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif-map.js:17 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:16 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-iptc-map.js:18 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-iptc.js:15 — the 4 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 4 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif-map.js:17
REDACTED:672 · REDACTED:730 — 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. — REDACTED:672
REDACTED:1360 · REDACTED:1432 · REDACTED:1607 — 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. — REDACTED:1360
REDACTED:2417 · REDACTED:2430 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:2417
REDACTED:54 · REDACTED:87 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:54
REDACTED:886 · REDACTED:1249 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:886
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
scale has cyclomatic complexity 49 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-scale.js:127
(anonymous) has cyclomatic complexity 34 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:8
getTransformedOptions has cyclomatic complexity 27 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js:224
transformCoordinates has cyclomatic complexity 24 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js:372
(anonymous) has cyclomatic complexity 23 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:827
(anonymous) has cyclomatic complexity 16 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:6
parseExifData has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:334
(anonymous) has cyclomatic complexity 14 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1655
d has cyclomatic complexity 13 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:95
(anonymous) has cyclomatic complexity 12 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-meta.js:102
e has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:95
(anonymous) has cyclomatic complexity 11 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1231
(anonymous) has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — www/public/commentics/backend/view/default/javascript/common.js:1
Do you agree with this assessment?
R3 · Large Files0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
www/public/commentics/backend/view/default/javascript/common.js has 2115 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — www/public/commentics/backend/view/default/javascript/common.js:1
REDACTED has 1885 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js has 463 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js:1
www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js has 440 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:1
www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif-map.js has 414 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif-map.js:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage0.0 / 10Critical✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
0% of 15 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R7 · Dead Code10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
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.
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.
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.
Do you agree with this assessment?
X27 · Collection changed while being enumerated7.6 / 10Strong✓ Tool-verified
Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a `foreach` leaves the array or collection it is walking alone — PHP raises nothing, but the loop's view and the collection part: an array walked by value (and a Doctrine or Laravel collection) is walked as the snapshot taken when the loop began, so an element added in the body is never visited and one removed is visited anyway; an array walked by reference (`as &$v`) and an SPL container (`SplObjectStorage`, `ArrayObject`, `SplQueue`) are walked live, so an added element is walked too and a removal skips the next one; and after an `array_splice`, `array_shift` or sort every later key names a different element.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
line 79 walks `$files` by value, so the walk is the snapshot taken when the loop began, and line 82 changes that same collection with `$files = …` before the next iteration: the loop carries on over the old value while the body now works on the new one. PHP raises nothing, so the loop completes over a different set than the code meant. — www/public/commentics/system/library/modification.php:79
line 84 walks `$files` by value, so the walk is the snapshot taken when the loop began, and line 101 changes that same collection with `$files = …` before the next iteration: the loop carries on over the old value while the body now works on the new one. PHP raises nothing, so the loop completes over a different set than the code meant. — www/public/commentics/system/library/modification.php:84
What to do
Each finding names the two lines that cannot both stand — the `for` over the collection (or its `keys()`/`values()`/`items()` view), and the call inside the body that changes its size. Confirm from those two, then pick one: walk a snapshot (`for k in list(d):`, `for x in s.copy():`); build the result instead of editing in place (`d = {k: v for k, v in d.items() if keep(v)}`); collect what needs removing and remove it after the loop; or — where only the first match was ever meant — `break` straight after the change, which is the one shape that is already safe. In PHP: Each finding names the two lines that cannot both stand — the `foreach` over the collection, and the change to it in the body. Confirm from those two, then pick one: build the result instead of editing the walked collection (`$kept = array_filter($items, $keep)`, `$batch->reject(…)`); for a worklist, loop `while (($next = array_shift($queue)) !== null)` so what is added is visited; walk a copy (`foreach (array_values($items) as …)`, `foreach (clone $storage as …)`) and change the original; remove only the CURRENT element (`unset($items[$key])`), which an array walk tolerates; or — where only the first match was ever meant — `break` straight after the change.
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. (×4) — www/src/Controller/TestingController.php:72, www/src/Controller/TestingController.php:105, www/public/commentics/system/library/database/mysqli.php:58, …
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. — www/public/commentics/system/library/database/mysqli.php:25
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?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
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.
Unscored — 1 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 5 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 'mysqli_connect' (www/public/commentics/system/library/database/mysqli.php:21) 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 'mysqli_connect' (www/public/commentics/system/library/database/mysqli.php:21) 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 'mysqli_connect' (www/public/commentics/system/library/database/mysqli.php:21) 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.
P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 69 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.
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 — no interface, protocol or abstract type declares an operation an implementer must write
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
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: this repository stores data through 'mysqli_connect' (www/public/commentics/system/library/database/mysqli.php:21) 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.
D10 Test Quality — No tests were found in the analyzed repository to assess for quality.
D11 Test Reliability — No test suite was found to re-run, so reliability couldn't be assessed. Two searches produced that zero and both came back empty: the classifier that reads the loaded workspace recognised no suite it could run, and a walk of the source on disk — which covers the JS/TS `*.test.*` and `*.spec.*` conventions and probes for a Pester suite — found no test source in any other ecosystem either. Neither search reaches a suite that is missing from the loaded workspace and carries no name either walk recognises, so this is 'no suite found by those two searches', not a verdict that the repository has none.
D12 Dependency Hygiene — Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
D14 License Compliance — Package manifest not parsed for licence data — analyzer language-coverage gap
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — Naming consistency does not read PHP yet; not measured.
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+ sibling projects each declaring an entity of their own or taking another project's integration events. Aggregate roots were found in only one source directory (www), which is a layered codebase, not two contexts. 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"]`.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D27 Navigability — symbol resolution incomplete — navigability not assessed
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 1 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D34 Knowledge Freshness — knowledge concentrated in recent work — freshness signal contradicted by repo activity
D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
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
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (95 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit))
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, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
M4 Documentation accuracy — Not applicable: the 9 current-state document(s) make no claim of a kind M4 checks. 3 claim(s) of kinds M4 does not check were not checked (environment variable 3); M4 checks only links and versions and artefact counts.
P12 CI test-gate honesty — no CI workflow found
P8 Schema migrations — Doctrine is declared, but the schema-migration mechanism could not be identified. Our limit, not a verdict on this repository.
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
R6 Tooling — no package.json in the repository — test/lint/typecheck wiring is read from package.json scripts (corroborated against CI), so this project's own toolchain isn't measured here
R8 Dependency Hygiene — Not measured — no package.json declares any dependency, so there is nothing to check imports against (imports may resolve through a host runtime rather than node).
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X1 Async correctness — X1 reached only 9% of this repository's production lines — php (42,429 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X12 Unreachable branch — X12 reached only 9% of this repository's production lines — php (42,429 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no C# was loaded; this repository's PHP and Python were read, and no request in it can be cancelled by a caller (amphp's HttpClient or connect) — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — X24 reached only 9% of this repository's production lines — php (42,429 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Critical — 92 finding(s)
AC1 · Text alternatives· <img> without a text alternative · ×39
<img> without a text alternative www/public/commentics/backend/view/default/template/edit/comment.tpl:160— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/admins.tpl:94— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/admins.tpl:95— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/bans.tpl:71— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/bans.tpl:72— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/comments.tpl:146— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/comments.tpl:147— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/comments.tpl:149— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/comments.tpl:151— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/comments.tpl:152— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/comments.tpl:153— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/countries.tpl:89— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/countries.tpl:90— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/pages.tpl:99— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/pages.tpl:100— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/pages.tpl:101— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/questions.tpl:76— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/questions.tpl:77— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/sites.tpl:77— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/sites.tpl:78— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/sites.tpl:79— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/states.tpl:85— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/states.tpl:86— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/subscriptions.tpl:90— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative www/public/commentics/backend/view/default/template/manage/subscriptions.tpl:91— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
+ 14 more in this group — see findings.md.
AC2 · Forms & labels· <label> that labels no control · ×19
<label> that labels no control www/public/commentics/backend/view/default/template/add/admin.tpl:31— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/admin.tpl:39— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/admin.tpl:47— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/admin.tpl:55— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/admin.tpl:61— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/admin.tpl:69— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/admin.tpl:75— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/admin.tpl:81— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/ban.tpl:31— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/ban.tpl:39— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/country.tpl:32— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/country.tpl:42— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/country.tpl:51— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/country.tpl:63— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/question.tpl:31— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/question.tpl:39— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/question.tpl:47— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/site.tpl:31— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control www/public/commentics/backend/view/default/template/add/site.tpl:40— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC2 · Forms & labels· <input> without a programmatic label · ×14
<input> without a programmatic label www/public/commentics/backend/view/default/template/add/admin.tpl:32— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label www/public/commentics/backend/view/default/template/add/admin.tpl:40— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label www/public/commentics/backend/view/default/template/add/admin.tpl:48— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label www/public/commentics/backend/view/default/template/add/admin.tpl:62— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label www/public/commentics/backend/view/default/template/add/admin.tpl:70— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label www/public/commentics/backend/view/default/template/add/admin.tpl:76— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label www/public/commentics/backend/view/default/template/add/admin.tpl:82— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label www/public/commentics/backend/view/default/template/add/ban.tpl:32— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label www/public/commentics/backend/view/default/template/add/ban.tpl:40— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label www/public/commentics/backend/view/default/template/add/country.tpl:33— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label www/public/commentics/backend/view/default/template/add/country.tpl:43— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label www/public/commentics/backend/view/default/template/add/question.tpl:32— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label www/public/commentics/backend/view/default/template/add/question.tpl:40— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label www/public/commentics/backend/view/default/template/add/site.tpl:32— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels· Link with no accessible name · ×4
Link with no accessible name www/public/commentics/backend/view/default/template/add/admin.tpl:113— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name www/public/commentics/backend/view/default/template/add/ban.tpl:50— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name www/public/commentics/backend/view/default/template/add/country.tpl:77— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name www/public/commentics/backend/view/default/template/add/question.tpl:62— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
AC2 · Forms & labels· <select> without a programmatic label · ×3
<select> without a programmatic label www/public/commentics/backend/view/default/template/add/country.tpl:52— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label www/public/commentics/backend/view/default/template/add/country.tpl:64— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label www/public/commentics/backend/view/default/template/add/question.tpl:48— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<html> without a lang www/public/commentics/backend/view/default/template/common/header.tpl:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC5 · ARIA correctness· aria-hidden on a focusable element · ×1
aria-hidden on a focusable element www/templates/footer.html.twig:1— aria-hidden="true" hides the element from assistive tech but leaves it keyboard-focusable — a confusing dead stop. Remove aria-hidden or make the element non-focusable.
No automated tests — No automated tests — no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (PHPUnit or Pest), and run it in CI so the gap cannot reopen.
Serious — 892 finding(s)
AC4 · Keyboard semantics· Anchor without href · ×40
Anchor without href www/public/commentics/backend/view/default/template/add/admin.tpl:71— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/add/admin.tpl:77— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/add/admin.tpl:83— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/add/country.tpl:44— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/add/country.tpl:56— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/add/site.tpl:33— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/add/site.tpl:42— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/add/site.tpl:51— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/add/site.tpl:60— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/add/site.tpl:66— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/add/site.tpl:72— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/add/site.tpl:81— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/add/site.tpl:90— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/common/header.tpl:58— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/common/header.tpl:71— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/common/header.tpl:83— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/common/header.tpl:90— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/common/header.tpl:101— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/common/header.tpl:120— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/common/header.tpl:133— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/common/header.tpl:146— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/common/header.tpl:159— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/edit/admin.tpl:72— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/edit/admin.tpl:78— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href www/public/commentics/backend/view/default/template/edit/admin.tpl:84— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
MethodTooLong: SettingsLayoutFormController.index www/public/commentics/backend/controller/settings/layout_form.php:6— MethodTooLong — index runs 847 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 747 over it, 8.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: SettingsLayoutCommentsController.index www/public/commentics/backend/controller/settings/layout_comments.php:6— MethodTooLong — index runs 788 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 688 over it, 7.88× 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: SettingsProcessorController.index www/public/commentics/backend/controller/settings/processor.php:6— MethodTooLong — index runs 562 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 462 over it, 5.62× 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: MainFormController.index www/public/commentics/frontend/controller/main/form.php:6— MethodTooLong — index runs 407 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 307 over it, 4.07× 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: MainUpgrade2Model.upgrade www/public/commentics/install/model/main/upgrade_2.php:6— MethodTooLong — upgrade runs 271 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 171 over it, 2.71× 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: MainCommentsController.index www/public/commentics/frontend/controller/main/comments.php:10— MethodTooLong — index runs 247 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 147 over it, 2.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: AppExtension.map_javascript www/src/Twig/AppExtension.php:111— MethodTooLong — map_javascript runs 206 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 106 over it, 2.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: EditCommentController.index www/public/commentics/backend/controller/edit/comment.php:6— MethodTooLong — index runs 202 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 102 over it, 2.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.
MethodTooLong: ManageCommentsController.index www/public/commentics/backend/controller/manage/comments.php:6— MethodTooLong — index runs 202 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 102 over it, 2.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.
MethodTooLong: Email.send www/public/commentics/system/library/email.php:97— MethodTooLong — send runs 202 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 102 over it, 2.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.
MethodTooLong: MainFormController.submit www/public/commentics/frontend/controller/main/form.php:831— MethodTooLong — submit runs 189 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 89 over it, 1.89× 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: ModuleCssEditorController.index www/public/commentics/backend/controller/module/css_editor.php:42— MethodTooLong — index runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× 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: Modification.__construct www/public/commentics/system/library/modification.php:10— MethodTooLong — __construct runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× 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: DataListController.index www/public/commentics/backend/controller/data/list.php:6— MethodTooLong — index runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× 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: SettingsLayoutFormController.validate www/public/commentics/backend/controller/settings/layout_form.php:1274— MethodTooLong — validate 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: ManageUsersController.index www/public/commentics/backend/controller/manage/users.php:6— MethodTooLong — index runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× 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: ManagePagesController.index www/public/commentics/backend/controller/manage/pages.php:6— MethodTooLong — index runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× 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: ManageSubscriptionsController.index www/public/commentics/backend/controller/manage/subscriptions.php:6— MethodTooLong — index runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× 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: SettingsEmailEditorController.index www/public/commentics/backend/controller/settings/email_editor.php:6— MethodTooLong — index runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× 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: MainDashboardController.index www/public/commentics/backend/controller/main/dashboard.php:6— MethodTooLong — index runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× 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: ManageAdminsController.index www/public/commentics/backend/controller/manage/admins.php:6— MethodTooLong — index runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× 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: EditController.update www/src/Controller/EditController.php:121— MethodTooLong — update runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× 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: ApiController.api_all_benches www/src/Controller/ApiController.php:200— MethodTooLong — api_all_benches runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× 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: ManageCountriesController.index www/public/commentics/backend/controller/manage/countries.php:6— MethodTooLong — index runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× 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: SettingsLayoutFormModel.update www/public/commentics/backend/model/settings/layout_form.php:6— MethodTooLong — update runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× 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.
Empty <h1> heading www/public/commentics/backend/view/default/template/add/admin.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/add/ban.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/add/country.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/add/question.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/add/site.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/add/state.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/data/list.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/edit/admin.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/edit/ban.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/edit/comment.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/edit/country.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/edit/page.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/edit/question.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/edit/site.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/edit/spam.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/edit/state.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/edit/subscription.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/edit/user.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/extension/installer.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/extension/languages.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/extension/modules.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/extension/themes.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/main/checklist.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/main/dashboard.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h1> heading www/public/commentics/backend/view/default/template/manage/admins.tpl:7— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
+ 10 more in this group — see findings.md.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×16
Focus outline removed in CSS without a :focus replacement www/public/js/pannellum-2.5.7/pannellum.htm:3— `.pnlm-container` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement www/public/js/pannellum-2.5.7/pannellum.css:2— `.pnlm-container` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement www/public/commentics/frontend/view/default/stylesheet/sass/partial/_comments.scss:377— `.cmtx_action_area a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement www/public/commentics/frontend/view/default/stylesheet/sass/partial/_comments.scss:510— `.cmtx_share_box a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement www/public/commentics/frontend/view/default/stylesheet/sass/partial/_comments.scss:559— `.cmtx_view_replies_area a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement www/public/commentics/frontend/view/default/stylesheet/sass/partial/_comments.scss:797— `.cmtx_notify_block a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement www/public/commentics/frontend/view/default/stylesheet/sass/partial/_comments.scss:869— `.cmtx_rss_block a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement www/public/commentics/frontend/view/default/stylesheet/sass/partial/_comments.scss:1024— `.cmtx_return a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement www/public/commentics/frontend/view/default/stylesheet/sass/partial/_upload.scss:30— `#cmtx_upload` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement www/public/commentics/frontend/view/default/stylesheet/sass/partial/_user.scss:201— `.cmtx_user_container .cmtx_table td:last-of-type a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:2525— `#cmtx_upload` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:3653— `.cmtx_action_area a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:3783— `.cmtx_share_box a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:3832— `.cmtx_view_replies_area a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:4041— `.cmtx_notify_block a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:4109— `.cmtx_rss_block a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Duplicated block (11 lines × 2) www/public/commentics/backend/controller/add/question.php:60— www/public/commentics/backend/controller/add/question.php:60-70 | www/public/commentics/backend/controller/edit/question.php:70-80 — `www/public/commentics/backend/controller/add/question.php` and `www/public/commentics/backend/controller/edit/question.php` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 63 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (11 lines × 2) www/public/commentics/backend/controller/extension/modules.php:74— www/public/commentics/backend/controller/extension/modules.php:74-84 | www/public/commentics/backend/controller/extension/modules.php:123-133 — 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 `www/public/commentics/backend/controller/extension/modules.php:74` 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 (11 lines × 2) www/public/commentics/backend/controller/tool/upgrade.php:58— www/public/commentics/backend/controller/tool/upgrade.php:58-68 | www/public/commentics/backend/controller/tool/upgrade.php:329-339 — 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 `www/public/commentics/backend/controller/tool/upgrade.php:58` 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) REDACTED:35— REDACTED:35-45 | REDACTED:66-76 — 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 (11 lines × 2) www/public/commentics/frontend/controller/main/user.php:306— www/public/commentics/frontend/controller/main/user.php:306-316 | www/public/commentics/frontend/controller/main/user.php:346-356 — 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 `www/public/commentics/frontend/controller/main/user.php:306` 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, `www/public/commentics/frontend/controller/main/user.php:357` calls `getSubscription` and `www/public/commentics/frontend/controller/main/user.php:317` 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 × 2) REDACTED:135— REDACTED:135-145 | REDACTED:160-170 — 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 `REDACTED:135` 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 (11 lines × 2) REDACTED:1809— REDACTED:1809-1819 | www/public/commentics/frontend/model/main/user.php:62-72 — 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) www/src/Service/UploadFunctions.php:56— www/src/Service/UploadFunctions.php:56-68 | www/src/Service/UploadFunctions.php:123-133 — 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 (11 lines × 2) www/src/Twig/AppExtension.php:31— www/src/Twig/AppExtension.php:31-41 | www/src/Twig/AppExtension.php:50-60 — 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 (11 lines × 2) www/public/commentics/system/engine/base.php:99— www/public/commentics/system/engine/base.php:99-109 | www/public/commentics/system/engine/base.php:114-124 — 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.
Outbound HTTP without resilience database/getOSM.py:22— `requests.post(` 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 REDACTED:911— `file_get_contents('https://` 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 REDACTED:78— `file_get_contents('http://` 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 www/src/Controller/UserController.php:56— `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 www/src/Controller/UserController.php:59— `->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.
Outbound HTTP without resilience www/src/Controller/UserController.php:108— `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 www/src/Controller/UserController.php:109— `->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.
Outbound HTTP without resilience www/src/Controller/UserController.php:133— `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 www/src/Controller/UserController.php:134— `->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.
Low contrast colour pair in CSS (3.3:1) www/public/commentics/install/view/default/stylesheet/sass/stylesheet.scss:159— `.error` sets color: #d8000c on background-color: #ffbaba — 3.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.3:1) www/public/commentics/install/view/default/stylesheet/css/stylesheet.css:3472— `.error` sets color: #d8000c on background-color: #ffbaba — 3.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.3:1) www/public/commentics/frontend/view/default/stylesheet/sass/partial/_form.scss:150— `.cmtx_message_error` sets color: #d8000c on background-color: #ffbaba — 3.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.3:1) www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:2734— `.cmtx_message_error` sets color: #d8000c on background-color: #ffbaba — 3.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.3:1) www/public/commentics/backend/view/default/stylesheet/sass/stylesheet.scss:56— `.error_header` sets color: #d8000c on background-color: #ffbaba — 3.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.3:1) www/public/commentics/backend/view/default/stylesheet/sass/stylesheet.scss:1315— `div.error` sets color: #d8000c on background-color: #ffbaba — 3.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.3:1) www/public/commentics/backend/view/default/stylesheet/css/stylesheet.css:3374— `.error_header` sets color: #d8000c on background-color: #ffbaba — 3.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.3:1) www/public/commentics/backend/view/default/stylesheet/css/stylesheet.css:4573— `div.error` sets color: #d8000c on background-color: #ffbaba — 3.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
FileTooLong: REDACTED www/public/commentics/backend/view/default/javascript/common.js— FileTooLong — 1510 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 1500 significant lines; this is 10 over it, 1.01× 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: REDACTED REDACTED— FileTooLong — 1395 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 85% of them inside a single declaration: cmtx_wait_for_jquery (2-2222). The bar is 500 significant lines; this is 895 over it, 2.79× 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: REDACTED REDACTED— FileTooLong — 1099 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: MainFormModel (4-1993). The bar is 500 significant lines; this is 599 over it, 2.20× 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: settings/layout_form.php www/public/commentics/backend/controller/settings/layout_form.php— FileTooLong — 1000 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: SettingsLayoutFormController (4-1588). The bar is 500 significant lines; this is 500 over it, 2.00× 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: settings/layout_comments.php www/public/commentics/backend/controller/settings/layout_comments.php— FileTooLong — 891 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: SettingsLayoutCommentsController (4-1395). The bar is 500 significant lines; this is 391 over it, 1.78× 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: REDACTED www/public/commentics/frontend/controller/main/form.php— FileTooLong — 802 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: MainFormController (4-1411). The bar is 500 significant lines; this is 302 over it, 1.60× 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: settings/processor.php www/public/commentics/backend/controller/settings/processor.php— FileTooLong — 651 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: SettingsProcessorController (4-1029). The bar is 500 significant lines; this is 151 over it, 1.30× 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: Controller/ApiController.php www/src/Controller/ApiController.php— FileTooLong — 557 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: ApiController (22-953). The bar is 500 significant lines; this is 57 over it, 1.11× 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.
ClassTooLong: MainFormModel REDACTED:4— ClassTooLong — 1097 significant lines (blank, comment-only and punctuation-only lines excluded), 79 methods. The bar is 400 significant lines; this is 697 over it, 2.74× 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: SettingsLayoutFormController www/public/commentics/backend/controller/settings/layout_form.php:4— ClassTooLong — 998 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 598 over it, 2.50× 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: SettingsLayoutCommentsController www/public/commentics/backend/controller/settings/layout_comments.php:4— ClassTooLong — 889 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 489 over it, 2.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: MainFormController www/public/commentics/frontend/controller/main/form.php:4— ClassTooLong — 800 significant lines (blank, comment-only and punctuation-only lines excluded), 7 methods. The bar is 400 significant lines; this is 400 over it, 2.00× 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: SettingsProcessorController www/public/commentics/backend/controller/settings/processor.php:4— ClassTooLong — 649 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 249 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: ApiController www/src/Controller/ApiController.php:22— ClassTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 142 over it, 1.36× 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: MainInstall2Model www/public/commentics/install/model/main/install_2.php:4— ClassTooLong — 484 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 84 over it, 1.21× 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: MainCommentsController www/public/commentics/frontend/controller/main/comments.php:4— ClassTooLong — 466 significant lines (blank, comment-only and punctuation-only lines excluded), 7 methods. The bar is 400 significant lines; this is 66 over it, 1.17× 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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×8
Members sharing a duplicated core (4 members, 50+ identical tokens) www/public/commentics/backend/controller/manage/questions.php:198— www/public/commentics/backend/controller/manage/questions.php:198-210 | www/public/commentics/backend/controller/manage/states.php:188-200 | www/public/commentics/backend/controller/module/extra_fields.php:501-513 | www/public/commentics/backend/controller/report/access.php:149-161 — 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) www/public/commentics/backend/model/login/login.php:8— www/public/commentics/backend/model/login/login.php:8-34 | www/public/commentics/backend/model/login/login.php:54-72 | www/public/commentics/frontend/model/main/user.php:290-308 | www/public/commentics/system/library/email.php:20-36 — 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) www/public/commentics/backend/model/module/extra_fields.php:75— www/public/commentics/backend/model/module/extra_fields.php:75-92 | www/public/commentics/system/library/comment.php:152-172 | www/public/commentics/system/library/geo.php:125-143 | www/public/commentics/system/library/page.php:219-231 — 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) www/public/commentics/backend/model/settings/layout_comments.php:298— www/public/commentics/backend/model/settings/layout_comments.php:298-304 | www/public/commentics/backend/model/settings/layout_comments.php:328-334 | www/public/commentics/backend/model/settings/layout_form.php:326-332 | www/public/commentics/backend/model/settings/layout_form.php:374-380 — 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) www/public/commentics/frontend/controller/main/comments.php:559— www/public/commentics/frontend/controller/main/comments.php:559-615 | www/public/commentics/frontend/controller/main/comments.php:620-658 | www/public/commentics/frontend/controller/main/comments.php:663-702 | www/public/commentics/frontend/controller/part/average_rating.php:73-119 — 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) www/public/commentics/frontend/controller/main/form.php:833— www/public/commentics/frontend/controller/main/form.php:833-1173 | www/public/commentics/frontend/controller/main/form.php:1178-1279 | www/public/commentics/frontend/controller/main/form.php:1284-1409 | www/public/commentics/frontend/controller/part/notify.php:27-164 — 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) www/src/Controller/AddController.php:18— www/src/Controller/AddController.php:18-94 | www/src/Controller/EditController.php:24-117 | www/src/Controller/EditController.php:122-303 | www/src/Controller/UploadController.php:23-168 — 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) www/src/Controller/ApiController.php:831— www/src/Controller/ApiController.php:831-857 | www/src/Controller/ApiController.php:863-880 | www/src/Twig/AppExtension.php:29-43 | www/src/Twig/AppExtension.php:48-62 — 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.
Low contrast colour pair in CSS (3.9:1) www/public/commentics/install/view/default/stylesheet/sass/stylesheet.scss:147— `.success` sets color: #4f8a10 on background-color: #e8fcdc — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.9:1) www/public/commentics/install/view/default/stylesheet/css/stylesheet.css:3460— `.success` sets color: #4f8a10 on background-color: #e8fcdc — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.9:1) www/public/commentics/frontend/view/default/stylesheet/sass/partial/_form.scss:144— `.cmtx_message_success` sets color: #4f8a10 on background-color: #e8fcdc — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.9:1) www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:2728— `.cmtx_message_success` sets color: #4f8a10 on background-color: #e8fcdc — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.9:1) www/public/commentics/frontend/view/default/stylesheet/css/stylesheet.css:4351— `.cmtx_user_container .cmtx_avatar_selection_attribution` sets color: #fff on background-color: gray — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.9:1) www/public/commentics/backend/view/default/stylesheet/sass/stylesheet.scss:1303— `div.success` sets color: #4f8a10 on background-color: #e8fcdc — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.9:1) www/public/commentics/backend/view/default/stylesheet/css/stylesheet.css:4561— `div.success` sets color: #4f8a10 on background-color: #e8fcdc — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Duplicated block (12 lines × 3) www/public/commentics/backend/controller/manage/bans.php:185— www/public/commentics/backend/controller/manage/bans.php:185-196 | www/public/commentics/backend/controller/report/version.php:140-151 | www/public/commentics/backend/controller/tool/database_backup.php:173-184 — before extracting anything, compare `www/public/commentics/backend/controller/manage/bans.php` and `www/public/commentics/backend/controller/report/version.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 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 `www/public/commentics/backend/controller/manage/bans.php:185` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 3) www/public/commentics/backend/model/tool/export_import.php:41— www/public/commentics/backend/model/tool/export_import.php:41-52 | www/public/commentics/backend/model/tool/export_import.php:87-98 | www/public/commentics/backend/model/tool/export_import.php:124-135 — 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 `www/public/commentics/backend/model/tool/export_import.php:41` 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 (12 lines × 3) www/public/commentics/frontend/controller/main/comments.php:569— www/public/commentics/frontend/controller/main/comments.php:569-580 | www/public/commentics/frontend/controller/main/comments.php:628-639 | www/public/commentics/frontend/controller/main/comments.php:671-682 — 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 `www/public/commentics/frontend/controller/main/comments.php:569` 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, `www/public/commentics/frontend/controller/main/comments.php:567` calls `loadModel` and `www/public/commentics/frontend/controller/main/comments.php:626` 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 (12 lines × 3) www/public/commentics/frontend/controller/main/form.php:1162— www/public/commentics/frontend/controller/main/form.php:1162-1173 | www/public/commentics/frontend/controller/main/form.php:1268-1279 | www/public/commentics/frontend/controller/main/form.php:1398-1409 — 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 `www/public/commentics/frontend/controller/main/form.php:1162` 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 (12 lines × 3) REDACTED:144— REDACTED:144-155 | REDACTED:174-185 | REDACTED:204-215 — 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 `REDACTED: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 × 3) www/src/Controller/AddController.php:116— www/src/Controller/AddController.php:116-127 | www/src/Controller/UploadController.php:181-192 | www/src/Controller/UploadController.php:222-233 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `www/src/Controller/AddController.php:116` 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 before the matched lines, `www/src/Controller/AddController.php:115` calls `getPicture` and `www/src/Controller/UploadController.php:180` 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 × 3) www/public/commentics/system/library/notify.php:115— www/public/commentics/system/library/notify.php:115-126 | www/public/commentics/system/library/notify.php:155-166 | www/public/commentics/system/library/notify.php:195-206 — 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 `www/public/commentics/system/library/notify.php:115` 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) www/public/commentics/backend/controller/edit/comment.php:20— www/public/commentics/backend/controller/edit/comment.php:20-26 | www/public/commentics/backend/controller/edit/spam.php:20-26 — 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 `www/public/commentics/backend/controller/edit/comment.php:20` 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) www/public/commentics/backend/controller/extension/modules.php:64— www/public/commentics/backend/controller/extension/modules.php:64-70 | www/public/commentics/backend/controller/extension/modules.php:113-119 — 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 `www/public/commentics/backend/controller/extension/modules.php:64` 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) www/public/commentics/backend/controller/module/extra_fields.php:300— www/public/commentics/backend/controller/module/extra_fields.php:300-306 | www/public/commentics/backend/controller/module/extra_fields.php:463-469 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) www/src/Controller/ApiController.php:553— www/src/Controller/ApiController.php:553-559 | www/src/Controller/ApiController.php:625-631 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) www/public/commentics/backend/model/settings/layout_comments.php:339— www/public/commentics/backend/model/settings/layout_comments.php:339-345 | www/public/commentics/backend/model/settings/layout_form.php:385-391 — 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 `www/public/commentics/backend/model/settings/layout_comments.php:339` 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) www/public/commentics/backend/model/common/header.php:53— www/public/commentics/backend/model/common/header.php:53-59 | www/public/commentics/backend/model/common/poster.php:54-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. 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 (7 lines × 2) www/public/commentics/backend/model/login/login.php:39— www/public/commentics/backend/model/login/login.php:39-45 | www/public/commentics/frontend/model/main/user.php:279-285 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `www/public/commentics/backend/model/login/login.php:47` calls `numRows`, `query`, `escape` and `www/public/commentics/frontend/model/main/user.php:286` 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) www/public/commentics/backend/controller/manage/admins.php:194— www/public/commentics/backend/controller/manage/admins.php:194-208 | www/public/commentics/backend/controller/manage/bans.php:158-172 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 (15 lines × 2) www/public/commentics/frontend/controller/main/comments.php:620— www/public/commentics/frontend/controller/main/comments.php:620-634 | www/public/commentics/frontend/controller/main/comments.php:663-677 — 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 `www/public/commentics/frontend/controller/main/comments.php:620` 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) www/public/commentics/frontend/controller/main/form.php:1179— www/public/commentics/frontend/controller/main/form.php:1179-1193 | www/public/commentics/frontend/controller/part/notify.php:30-44 — before extracting anything, compare `www/public/commentics/frontend/controller/main/form.php` and `www/public/commentics/frontend/controller/part/notify.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 84 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 `www/public/commentics/frontend/controller/main/form.php:1179` 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, `www/public/commentics/frontend/controller/part/notify.php:28` calls `loadLanguage` and `www/public/commentics/frontend/controller/main/form.php:1178` 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) www/public/commentics/frontend/controller/main/form.php:1361— www/public/commentics/frontend/controller/main/form.php:1361-1375 | www/public/commentics/frontend/controller/part/notify.php:125-139 — before extracting anything, compare `www/public/commentics/frontend/controller/main/form.php` and `www/public/commentics/frontend/controller/part/notify.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 84 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 `www/public/commentics/frontend/controller/main/form.php:1361` 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) www/public/commentics/system/library/notify.php:451— www/public/commentics/system/library/notify.php:451-465 | www/public/commentics/system/library/notify.php:502-516 — 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 `www/public/commentics/system/library/notify.php:451` 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) www/public/commentics/backend/controller/add/country.php:83— www/public/commentics/backend/controller/add/country.php:83-97 | www/public/commentics/backend/controller/edit/country.php:93-107 — `www/public/commentics/backend/controller/add/country.php` and `www/public/commentics/backend/controller/edit/country.php` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 54 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (12 lines × 2) www/public/commentics/backend/controller/extension/installer.php:60— www/public/commentics/backend/controller/extension/installer.php:60-71 | www/public/commentics/backend/controller/tool/export_import.php:55-66 — 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 `www/public/commentics/backend/controller/extension/installer.php:60` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) www/public/commentics/backend/controller/settings/layout_comments.php:1158— www/public/commentics/backend/controller/settings/layout_comments.php:1158-1169 | www/public/commentics/backend/controller/settings/layout_form.php:1245-1256 — 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 `www/public/commentics/backend/controller/settings/layout_comments.php:1158` 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, `www/public/commentics/backend/controller/settings/layout_form.php:1258` calls `get`, `sprintf` and `www/public/commentics/backend/controller/settings/layout_comments.php:1171` 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 (12 lines × 2) www/public/commentics/backend/model/extension/installer.php:139— www/public/commentics/backend/model/extension/installer.php:139-150 | REDACTED:243-254 — 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 `www/public/commentics/backend/model/extension/installer.php:139` 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 (12 lines × 2) www/public/commentics/frontend/controller/main/form.php:1141— www/public/commentics/frontend/controller/main/form.php:1141-1152 | www/public/commentics/frontend/controller/main/form.php:1385-1396 — 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) REDACTED:343— REDACTED:343-354 | REDACTED:368-379 — 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 `REDACTED:343` 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 (12 lines × 2) www/public/commentics/backend/model/module/language_editor.php:44— www/public/commentics/backend/model/module/language_editor.php:44-55 | www/public/commentics/backend/model/module/language_editor.php:67-78 — 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 `www/public/commentics/backend/model/module/language_editor.php:44` 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, `www/public/commentics/backend/model/module/language_editor.php:79` calls `empty` and `www/public/commentics/backend/model/module/language_editor.php:56` 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 (9 lines × 2) www/public/commentics/backend/model/settings/layout_comments.php:374— www/public/commentics/backend/model/settings/layout_comments.php:374-382 | www/public/commentics/backend/model/settings/layout_form.php:420-428 — 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 `www/public/commentics/backend/model/settings/layout_comments.php:374` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) www/public/commentics/frontend/controller/main/form.php:1105— www/public/commentics/frontend/controller/main/form.php:1105-1113 | www/public/commentics/frontend/controller/part/notify.php:141-149 — before extracting anything, compare `www/public/commentics/frontend/controller/main/form.php` and `www/public/commentics/frontend/controller/part/notify.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 84 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `www/public/commentics/frontend/controller/main/form.php:1115` calls `get`, `isset`, `subscriptionExists` and `www/public/commentics/frontend/controller/part/notify.php:151` 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 (9 lines × 2) www/public/commentics/system/library/setting.php:14— www/public/commentics/system/library/setting.php:14-22 | www/public/commentics/system/library/setting.php:47-55 — 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) www/public/commentics/system/library/user.php:111— www/public/commentics/system/library/user.php:111-119 | www/public/commentics/system/library/user.php:124-132 — 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 (9 lines × 2) www/src/Controller/ApiController.php:263— www/src/Controller/ApiController.php:263-271 | www/src/Controller/ApiController.php:715-723 — 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) www/src/Controller/TestingController.php:27— www/src/Controller/TestingController.php:27-35 | www/src/Twig/AppExtension.php:100-108 — 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 (5 lines × 2) www/public/commentics/backend/controller/manage/comments.php:78— www/public/commentics/backend/controller/manage/comments.php:78-82 | www/public/commentics/backend/controller/manage/users.php:62-66 — before extracting anything, compare `www/public/commentics/backend/controller/manage/comments.php` and `www/public/commentics/backend/controller/manage/users.php` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 237 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 `www/public/commentics/backend/controller/manage/comments.php:78` 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) www/public/commentics/backend/model/common/header.php:44— www/public/commentics/backend/model/common/header.php:44-48 | www/public/commentics/backend/model/common/poster.php:45-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. 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) www/public/commentics/backend/model/login/reset.php:20— www/public/commentics/backend/model/login/reset.php:20-24 | www/public/commentics/backend/model/settings/email_setup.php:77-81 — 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 (5 lines × 2) REDACTED:957— REDACTED:957-961 | REDACTED:966-970 — 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 (5 lines × 2) REDACTED:1166— REDACTED:1166-1170 | REDACTED:1172-1176 — 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 `REDACTED:1166` 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 (5 lines × 2) www/public/commentics/system/engine/controller.php:52— www/public/commentics/system/engine/controller.php:52-56 | www/public/commentics/system/engine/controller.php:84-88 — 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 `www/public/commentics/system/engine/controller.php:52` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
TodoComment www/src/Service/UserFunctions.php:350— // TODO: This doesn't detect if a media is associated with a bench which has been deleted — 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 www/src/Controller/ApiController.php:388— // TODO: Do this more efficiently — 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 www/src/Controller/SearchController.php:105— // TODO - add pagination — 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 www/src/Controller/UploadController.php:235— // TODO - fix hardcoding of Flickr Importer user 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.
TodoComment www/public/commentics/frontend/controller/part/pagination.php:16— // TODO: Move following to model — 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.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×5
Edited copy of a member (9 corresponding lines) REDACTED:1714— REDACTED:1714-1722 | www/public/commentics/frontend/model/part/average_rating.php:45-53 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) www/public/commentics/system/library/setting.php:11— www/public/commentics/system/library/setting.php:11-23 | www/public/commentics/system/library/setting.php:47-55 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) www/public/commentics/system/library/template.php:66— www/public/commentics/system/library/template.php:66-76 | www/public/commentics/system/library/template.php:123-131 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) www/public/commentics/system/library/cache/memcached.php:72— www/public/commentics/system/library/cache/memcached.php:72-80 | www/public/commentics/system/library/cache/redis.php:86-94 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) REDACTED:1105— REDACTED:1105-1113 | www/public/commentics/system/library/notify.php:580-592 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) www/public/commentics/backend/controller/login/login.php:8— www/public/commentics/backend/controller/login/login.php:8-20 | www/public/commentics/backend/controller/login/reset.php:8-20 — 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 `www/public/commentics/backend/controller/login/login.php:8` 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 (13 lines × 2) www/public/commentics/backend/controller/login/login.php:104— www/public/commentics/backend/controller/login/login.php:104-116 | www/public/commentics/backend/controller/login/reset.php:54-66 — 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 (13 lines × 2) www/public/commentics/backend/controller/module/merge_users.php:97— www/public/commentics/backend/controller/module/merge_users.php:97-109 | www/public/commentics/backend/controller/tool/export_import.php:79-91 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `www/public/commentics/backend/controller/module/merge_users.php:97` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) www/public/commentics/system/library/email.php:254— www/public/commentics/system/library/email.php:254-266 | www/public/commentics/system/library/email.php:322-334 — 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 `www/public/commentics/system/library/email.php:254` 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 (13 lines × 2) www/src/Service/UserFunctions.php:17— www/src/Service/UserFunctions.php:17-29 | www/src/Service/UserFunctions.php:460-472 — 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 `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) www/public/commentics/backend/controller/edit/comment.php:8— www/public/commentics/backend/controller/edit/comment.php:8-17 | www/public/commentics/backend/controller/edit/spam.php:8-17 — 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 `www/public/commentics/backend/controller/edit/comment.php:8` 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) www/public/commentics/backend/controller/settings/email_editor.php:22— www/public/commentics/backend/controller/settings/email_editor.php:22-31 | www/public/commentics/backend/controller/settings/email_editor.php:58-67 — 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 `www/public/commentics/backend/controller/settings/email_editor.php:22` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) www/public/commentics/backend/model/manage/sites.php:41— www/public/commentics/backend/model/manage/sites.php:41-50 | www/public/commentics/backend/model/manage/users.php:45-54 — before extracting anything, compare `www/public/commentics/backend/model/manage/sites.php` and `www/public/commentics/backend/model/manage/users.php` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 154 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 `www/public/commentics/backend/model/manage/sites.php:41` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) www/public/commentics/frontend/controller/main/form.php:949— www/public/commentics/frontend/controller/main/form.php:949-958 | www/public/commentics/frontend/controller/part/notify.php:110-119 — before extracting anything, compare `www/public/commentics/frontend/controller/main/form.php` and `www/public/commentics/frontend/controller/part/notify.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 84 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 `www/public/commentics/frontend/controller/main/form.php:949` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) www/public/commentics/system/library/email.php:67— www/public/commentics/system/library/email.php:67-76 | www/public/commentics/system/library/email.php:105-114 — 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 `www/public/commentics/system/library/email.php:67` 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 × 4) www/public/commentics/backend/model/manage/admins.php:28— www/public/commentics/backend/model/manage/admins.php:28-36 | www/public/commentics/backend/model/manage/countries.php:32-40 | www/public/commentics/backend/model/manage/states.php:33-41 | www/public/commentics/backend/model/manage/subscriptions.php:40-48 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/countries.php` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 195 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 `www/public/commentics/backend/model/manage/admins.php:28` 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, `www/public/commentics/backend/model/manage/admins.php:37` calls `escape` and `www/public/commentics/backend/model/manage/countries.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 (9 lines × 4) www/public/commentics/backend/model/manage/comments.php:64— www/public/commentics/backend/model/manage/comments.php:64-72 | www/public/commentics/backend/model/manage/sites.php:40-48 | www/public/commentics/backend/model/manage/subscriptions.php:48-56 | www/public/commentics/backend/model/manage/users.php:44-52 — before extracting anything, compare `www/public/commentics/backend/model/manage/comments.php` and `www/public/commentics/backend/model/manage/sites.php` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 115 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 (9 lines × 4) www/public/commentics/backend/model/module/extra_fields.php:84— www/public/commentics/backend/model/module/extra_fields.php:84-92 | www/public/commentics/system/library/comment.php:164-172 | www/public/commentics/system/library/geo.php:135-143 | www/public/commentics/system/library/page.php:223-231 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 4) REDACTED:138— REDACTED:138-146 | REDACTED:163-171 | REDACTED:347-355 | REDACTED:372-380 — all 4 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 `REDACTED:138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 4) www/src/Service/SearchFunctions.php:271— www/src/Service/SearchFunctions.php:271-291 | www/src/Service/UploadFunctions.php:27-35 | www/src/Service/UploadFunctions.php:56-68 | www/src/Service/UploadFunctions.php:123-133 — before extracting anything, compare `www/src/Service/SearchFunctions.php` and `www/src/Service/UploadFunctions.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 112 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 (7 lines × 3) www/public/commentics/backend/controller/manage/admins.php:196— www/public/commentics/backend/controller/manage/admins.php:196-202 | www/public/commentics/backend/controller/manage/bans.php:160-166 | www/public/commentics/backend/controller/manage/comments.php:305-311 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 (7 lines × 3) www/public/commentics/backend/controller/manage/comments.php:303— www/public/commentics/backend/controller/manage/comments.php:303-309 | www/public/commentics/backend/controller/manage/pages.php:215-221 | www/public/commentics/backend/controller/manage/subscriptions.php:213-219 — before extracting anything, compare `www/public/commentics/backend/controller/manage/comments.php` and `www/public/commentics/backend/controller/manage/pages.php` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 250 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 `www/public/commentics/backend/controller/manage/comments.php:303` 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, `www/public/commentics/backend/controller/manage/comments.php:297` calls `loadImage` and `www/public/commentics/backend/controller/manage/pages.php:213` 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 (7 lines × 3) www/src/Controller/ApiController.php:263— www/src/Controller/ApiController.php:263-269 | www/src/Controller/ApiController.php:715-721 | www/src/Service/LocationFunctions.php:77-85 — 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.
Duplicated block (7 lines × 3) www/public/commentics/backend/model/manage/bans.php:117— www/public/commentics/backend/model/manage/bans.php:117-123 | www/public/commentics/backend/model/manage/questions.php:127-133 | www/public/commentics/backend/model/manage/subscriptions.php:181-187 — before extracting anything, compare `www/public/commentics/backend/model/manage/bans.php` and `www/public/commentics/backend/model/manage/questions.php` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 191 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 (7 lines × 3) www/public/commentics/system/engine/base.php:172— www/public/commentics/system/engine/base.php:172-178 | www/public/commentics/system/engine/controller.php:170-176 | www/public/commentics/system/engine/controller.php:190-196 — 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.
Empty <h2> heading www/public/commentics/backend/view/default/template/edit/comment.tpl:31— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h2> heading www/public/commentics/backend/view/default/template/edit/comment.tpl:125— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h2> heading www/public/commentics/backend/view/default/template/edit/comment.tpl:285— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h2> heading www/public/commentics/backend/view/default/template/extension/themes.tpl:58— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Low contrast colour pair in CSS (4.4:1) www/public/commentics/install/view/default/stylesheet/sass/stylesheet.scss:165— `.warning` sets color: #9f6000 on background-color: #feefb3 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.4:1) www/public/commentics/install/view/default/stylesheet/css/stylesheet.css:3478— `.warning` sets color: #9f6000 on background-color: #feefb3 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.4:1) www/public/commentics/backend/view/default/stylesheet/sass/stylesheet.scss:1321— `div.warning` sets color: #9f6000 on background-color: #feefb3 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.4:1) www/public/commentics/backend/view/default/stylesheet/css/stylesheet.css:4579— `div.warning` sets color: #9f6000 on background-color: #feefb3 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Duplicated block (10 lines × 5) www/public/commentics/backend/controller/add/admin.php:134— www/public/commentics/backend/controller/add/admin.php:134-143 | www/public/commentics/backend/controller/add/site.php:162-171 | www/public/commentics/backend/controller/edit/admin.php:148-157 | www/public/commentics/backend/controller/edit/site.php:172-181 | www/public/commentics/backend/controller/tool/text_finder.php:86-95 — before extracting anything, compare `www/public/commentics/backend/controller/add/admin.php` and `www/public/commentics/backend/controller/add/site.php` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 99 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 `www/public/commentics/backend/controller/add/admin.php:134` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 5) www/public/commentics/backend/model/manage/admins.php:17— www/public/commentics/backend/model/manage/admins.php:17-26 | www/public/commentics/backend/model/manage/countries.php:21-30 | www/public/commentics/backend/model/manage/pages.php:35-44 | www/public/commentics/backend/model/manage/states.php:26-35 | www/public/commentics/backend/model/manage/subscriptions.php:33-42 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/countries.php` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 195 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 `www/public/commentics/backend/model/manage/admins.php:17` 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 × 5) www/public/commentics/system/library/notify.php:31— www/public/commentics/system/library/notify.php:31-40 | www/public/commentics/system/library/notify.php:71-80 | www/public/commentics/system/library/notify.php:113-122 | www/public/commentics/system/library/notify.php:153-162 | www/public/commentics/system/library/notify.php:193-202 — all 5 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 `www/public/commentics/system/library/notify.php:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 5) www/src/Controller/ApiController.php:106— www/src/Controller/ApiController.php:106-115 | www/src/Controller/ApiController.php:291-300 | www/src/Controller/ApiController.php:329-338 | www/src/Controller/ApiController.php:744-753 | www/src/Controller/ApiController.php:781-790 — all 5 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 (8 lines × 3) REDACTED:134— REDACTED:134-141 | REDACTED:159-166 | REDACTED:174-181 — 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 `REDACTED:134` 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 (8 lines × 3) REDACTED:343— REDACTED:343-350 | REDACTED:368-375 | REDACTED:383-390 — 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 `REDACTED:343` 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 (8 lines × 3) REDACTED:398— REDACTED:398-406 | REDACTED:532-539 | REDACTED:544-551 — 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 `REDACTED:398` 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 (8 lines × 3) www/public/commentics/install/controller/main/upgrade_2.php:30— www/public/commentics/install/controller/main/upgrade_2.php:30-37 | www/public/commentics/install/controller/main/upgrade_2.php:60-67 | www/public/commentics/install/controller/main/upgrade_2.php:70-77 — 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 (8 lines × 2) REDACTED:472— REDACTED:472-479 | REDACTED:484-491 — 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 `REDACTED:472` 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 (8 lines × 2) REDACTED:659— REDACTED:659-666 | REDACTED:671-678 — 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 `REDACTED:659` 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 (8 lines × 2) REDACTED:738— REDACTED:738-745 | REDACTED:750-757 — 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 `REDACTED:738` 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 (8 lines × 2) www/public/commentics/system/library/comment.php:281— www/public/commentics/system/library/comment.php:281-288 | www/public/commentics/system/library/comment.php:337-344 — 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 `www/public/commentics/system/library/comment.php:281` 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 (11 lines × 2 locations) REDACTED:347— REDACTED:347 · REDACTED:366 — 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 (11 lines × 2 locations) REDACTED:639— REDACTED:639 · REDACTED:747 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (11 lines × 2 locations) REDACTED:686— REDACTED:686 · REDACTED:742 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (11 lines × 2 locations) REDACTED:794— REDACTED:794 · REDACTED:1212 — 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.
Swallowed exception (caught, then discarded) www/src/Controller/TestingController.php:72— `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) www/src/Controller/TestingController.php:105— `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) www/public/commentics/system/library/database/mysqli.php:58— `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) www/public/commentics/system/library/cache/redis.php:29— `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.
HackComment www/src/Controller/AddController.php:33— // Hack to get Auth0 user data from the session — 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 www/src/Controller/EditController.php:175— // Hack to get Auth0 user data from the session — 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 www/src/Controller/UploadController.php:97— // Hack to get Auth0 user data from the session — 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.
D4 · Code Duplication· Edited copy of a member (1 corresponding lines) · ×3
Edited copy of a member (1 corresponding lines) www/public/commentics/backend/model/add/site.php:8— www/public/commentics/backend/model/add/site.php:8-8 | www/public/commentics/backend/model/edit/site.php:8-8 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (1 corresponding lines) www/public/commentics/backend/model/add/state.php:8— www/public/commentics/backend/model/add/state.php:8-8 | www/public/commentics/backend/model/edit/state.php:8-8 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (1 corresponding lines) www/public/commentics/frontend/model/main/comments.php:160— www/public/commentics/frontend/model/main/comments.php:160-162 | www/public/commentics/frontend/model/part/average_rating.php:58-58 — These two members are one piece of code written twice and then edited apart: 1 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.
Duplicated block (14 lines × 3) www/public/commentics/frontend/controller/main/form.php:848— www/public/commentics/frontend/controller/main/form.php:848-861 | www/public/commentics/frontend/controller/main/form.php:1302-1315 | www/public/commentics/frontend/controller/part/notify.php:47-60 — before extracting anything, compare `www/public/commentics/frontend/controller/main/form.php` and `www/public/commentics/frontend/controller/part/notify.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 84 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 `www/public/commentics/frontend/controller/main/form.php:848` 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, `www/public/commentics/frontend/controller/main/form.php:1318` calls `validateFloodingDelay`, `validateFloodingMaximum` and `www/public/commentics/frontend/controller/part/notify.php:63` 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 (14 lines × 3) www/public/commentics/frontend/controller/main/form.php:949— www/public/commentics/frontend/controller/main/form.php:949-962 | www/public/commentics/frontend/controller/main/form.php:1234-1247 | www/public/commentics/frontend/controller/main/form.php:1347-1360 — 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 `www/public/commentics/frontend/controller/main/form.php:949` 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 lines × 3) www/public/commentics/system/library/email.php:268— www/public/commentics/system/library/email.php:268-281 | www/public/commentics/system/library/email.php:373-386 | www/public/commentics/system/library/email.php:425-438 — 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 `www/public/commentics/system/library/email.php:268` 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 lines × 2) REDACTED:1563— REDACTED:1563-1576 | REDACTED:1591-1604 — 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 `REDACTED:1563` 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 (14 lines × 2) www/public/commentics/system/library/email.php:285— www/public/commentics/system/library/email.php:285-298 | www/public/commentics/system/library/email.php:302-315 — 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 `www/public/commentics/system/library/email.php:285` 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 lines × 2) www/public/commentics/system/library/template.php:180— www/public/commentics/system/library/template.php:180-193 | www/public/commentics/system/library/template.php:237-250 — 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 `www/public/commentics/system/library/template.php:180` 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 (12 lines × 4) www/public/commentics/backend/controller/manage/questions.php:199— www/public/commentics/backend/controller/manage/questions.php:199-210 | www/public/commentics/backend/controller/manage/states.php:189-200 | www/public/commentics/backend/controller/module/extra_fields.php:502-513 | www/public/commentics/backend/controller/report/access.php:150-161 — before extracting anything, compare `www/public/commentics/backend/controller/manage/questions.php` and `www/public/commentics/backend/controller/manage/states.php` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 245 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 `www/public/commentics/backend/controller/manage/questions.php:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 4) www/src/Controller/AddController.php:48— www/src/Controller/AddController.php:48-59 | www/src/Controller/EditController.php:42-54 | www/src/Controller/EditController.php:189-200 | www/src/Controller/UploadController.php:111-122 — there are 4 copies across 3 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `www/src/Controller/AddController.php:48` 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 (12 lines × 4) www/src/Controller/ApiController.php:26— www/src/Controller/ApiController.php:26-37 | www/src/Controller/ApiController.php:242-253 | www/src/Controller/ApiController.php:408-419 | www/src/Controller/ApiController.php:694-705 — all 4 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 (11 lines × 11) www/public/commentics/backend/controller/manage/admins.php:10— www/public/commentics/backend/controller/manage/admins.php:10-20 | www/public/commentics/backend/controller/manage/bans.php:10-20 | www/public/commentics/backend/controller/manage/comments.php:10-20 | www/public/commentics/backend/controller/manage/countries.php:10-20 | www/public/commentics/backend/controller/manage/pages.php:10-20 | www/public/commentics/backend/controller/manage/questions.php:12-22 | www/public/commentics/backend/controller/manage/sites.php:10-20 | www/public/commentics/backend/controller/manage/states.php:10-20 | www/public/commentics/backend/controller/manage/subscriptions.php:10-20 | www/public/commentics/backend/controller/manage/users.php:10-20 | www/public/commentics/backend/controller/tool/database_backup.php:10-20 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 `www/public/commentics/backend/controller/manage/admins.php:10` 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, `www/public/commentics/backend/controller/manage/questions.php:10` calls `loadModel` and `www/public/commentics/backend/controller/manage/admins.php:8` 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 (11 lines × 11) www/public/commentics/backend/controller/manage/admins.php:186— www/public/commentics/backend/controller/manage/admins.php:186-196 | www/public/commentics/backend/controller/manage/bans.php:150-160 | www/public/commentics/backend/controller/manage/comments.php:287-297 | www/public/commentics/backend/controller/manage/countries.php:175-185 | www/public/commentics/backend/controller/manage/pages.php:205-215 | www/public/commentics/backend/controller/manage/questions.php:164-174 | www/public/commentics/backend/controller/manage/sites.php:162-172 | www/public/commentics/backend/controller/manage/states.php:163-173 | www/public/commentics/backend/controller/manage/subscriptions.php:203-213 | www/public/commentics/backend/controller/manage/users.php:214-224 | www/public/commentics/backend/controller/tool/database_backup.php:153-163 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 after the matched lines, `www/public/commentics/backend/controller/manage/subscriptions.php:217` calls `loadImage` and `www/public/commentics/backend/controller/manage/admins.php:200` 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 × 11) www/public/commentics/backend/model/manage/admins.php:10— www/public/commentics/backend/model/manage/admins.php:10-20 | www/public/commentics/backend/model/manage/bans.php:12-22 | www/public/commentics/backend/model/manage/pages.php:20-30 | www/public/commentics/backend/model/manage/questions.php:10-20 | www/public/commentics/backend/model/manage/sites.php:26-36 | www/public/commentics/backend/model/manage/states.php:19-29 | www/public/commentics/backend/model/manage/users.php:20-30 | www/public/commentics/backend/model/report/access.php:10-20 | www/public/commentics/backend/model/report/version.php:10-20 | www/public/commentics/backend/model/report/viewers.php:10-20 | www/public/commentics/backend/model/tool/database_backup.php:82-92 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 `www/public/commentics/backend/model/manage/admins.php:10` 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 × 4) www/public/commentics/backend/controller/edit/ban.php:50— www/public/commentics/backend/controller/edit/ban.php:50-60 | www/public/commentics/backend/controller/edit/page.php:94-104 | www/public/commentics/backend/controller/edit/site.php:114-124 | www/public/commentics/backend/controller/edit/user.php:74-84 — before extracting anything, compare `www/public/commentics/backend/controller/edit/ban.php` and `www/public/commentics/backend/controller/edit/page.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 76 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 `www/public/commentics/backend/controller/edit/ban.php:50` 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 (11 lines × 4) REDACTED:27— REDACTED:27-37 | REDACTED:146-156 | REDACTED:176-186 | REDACTED:206-216 — all 4 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 `REDACTED:27` 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 × 4) www/public/commentics/backend/model/common/language.php:8— www/public/commentics/backend/model/common/language.php:8-18 | www/public/commentics/backend/model/common/language.php:23-33 | www/public/commentics/backend/model/extension/themes.php:33-43 | www/public/commentics/backend/model/extension/themes.php:48-58 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `www/public/commentics/backend/model/common/language.php:8` 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, `www/public/commentics/backend/model/common/language.php:10` calls `foreach`, `glob` and `www/public/commentics/backend/model/common/language.php:8` does not — after which the two agree again for 5 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) www/public/commentics/backend/model/manage/admins.php:20— www/public/commentics/backend/model/manage/admins.php:20-30 | www/public/commentics/backend/model/manage/comments.php:40-50 | www/public/commentics/backend/model/manage/countries.php:24-34 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/comments.php` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 167 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 (11 lines × 3) www/src/Controller/ApiController.php:104— www/src/Controller/ApiController.php:104-114 | www/src/Controller/ApiController.php:289-299 | www/src/Controller/ApiController.php:742-752 — 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 (11 lines × 3) www/public/commentics/system/library/notify.php:409— www/public/commentics/system/library/notify.php:409-419 | www/public/commentics/system/library/notify.php:460-470 | www/public/commentics/system/library/notify.php:511-521 — 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 `www/public/commentics/system/library/notify.php:409` 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, `www/public/commentics/system/library/notify.php:405` calls `IN` and `www/public/commentics/system/library/notify.php:456` 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 × 11) www/public/commentics/backend/controller/add/admin.php:134— www/public/commentics/backend/controller/add/admin.php:134-141 | www/public/commentics/backend/controller/add/site.php:162-169 | www/public/commentics/backend/controller/data/list.php:200-207 | www/public/commentics/backend/controller/edit/admin.php:148-155 | www/public/commentics/backend/controller/edit/site.php:172-179 | www/public/commentics/backend/controller/main/dashboard.php:243-250 | www/public/commentics/backend/controller/module/akismet.php:94-101 | www/public/commentics/backend/controller/settings/email_setup.php:244-251 | www/public/commentics/backend/controller/settings/maintenance.php:56-63 | www/public/commentics/backend/controller/settings/processor.php:1016-1023 | www/public/commentics/backend/controller/tool/text_finder.php:86-93 — before extracting anything, compare `www/public/commentics/backend/controller/add/admin.php` and `www/public/commentics/backend/controller/add/site.php` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 99 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 `www/public/commentics/backend/controller/add/admin.php:134` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 11) www/public/commentics/backend/controller/module/extra_fields.php:582— www/public/commentics/backend/controller/module/extra_fields.php:582-589 | www/public/commentics/backend/controller/settings/flooding.php:112-119 | www/public/commentics/backend/controller/settings/layout_comments.php:1382-1389 | www/public/commentics/backend/controller/settings/security.php:112-119 | www/public/commentics/backend/controller/settings/system.php:242-249 | www/public/commentics/backend/controller/settings/viewers.php:67-74 | www/public/commentics/backend/controller/task/delete_bans.php:56-63 | www/public/commentics/backend/controller/task/delete_comments.php:56-63 | www/public/commentics/backend/controller/task/delete_reporters.php:56-63 | www/public/commentics/backend/controller/task/delete_subscriptions.php:56-63 | www/public/commentics/backend/controller/task/delete_voters.php:56-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 11 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 11 times. Read the line range as the matched WINDOW rather than a finished unit: at `www/public/commentics/backend/controller/module/extra_fields.php:582` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 11) www/src/Controller/ApiController.php:45— www/src/Controller/ApiController.php:45-56 | REDACTED:32-40 | REDACTED:190-200 | REDACTED:212-219 | www/src/Service/SearchFunctions.php:240-249 | www/src/Service/TagsFunctions.php:46-56 | www/src/Service/UserFunctions.php:16-27 | www/src/Service/UserFunctions.php:52-59 | www/src/Service/UserFunctions.php:70-85 | www/src/Service/UserFunctions.php:96-109 | www/src/Service/UserFunctions.php:459-470 — there are 11 copies across 5 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 11 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 15) www/public/commentics/backend/controller/data/list.php:19— www/public/commentics/backend/controller/data/list.php:19-24 | www/public/commentics/backend/controller/data/list.php:26-31 | www/public/commentics/backend/controller/data/list.php:33-38 | www/public/commentics/backend/controller/data/list.php:40-45 | www/public/commentics/backend/controller/data/list.php:47-52 | www/public/commentics/backend/controller/data/list.php:54-59 | www/public/commentics/backend/controller/data/list.php:61-66 | www/public/commentics/backend/controller/data/list.php:68-73 | www/public/commentics/backend/controller/data/list.php:75-80 | www/public/commentics/backend/controller/data/list.php:82-87 | www/public/commentics/backend/controller/data/list.php:89-94 | www/public/commentics/backend/controller/data/list.php:96-101 | www/public/commentics/backend/controller/data/list.php:103-108 | www/public/commentics/backend/controller/data/list.php:110-115 | www/public/commentics/backend/controller/data/list.php:117-122 — all 15 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. 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 (6 lines × 15) www/public/commentics/backend/controller/edit/admin.php:38— www/public/commentics/backend/controller/edit/admin.php:38-43 | www/public/commentics/backend/controller/edit/admin.php:46-51 | www/public/commentics/backend/controller/edit/comment.php:118-123 | www/public/commentics/backend/controller/edit/page.php:60-65 | www/public/commentics/backend/controller/edit/site.php:42-47 | www/public/commentics/backend/controller/edit/site.php:50-55 | www/public/commentics/backend/controller/module/extra_fields.php:349-354 | www/public/commentics/backend/controller/module/extra_fields.php:387-392 | www/public/commentics/backend/controller/module/extra_fields.php:401-406 | www/public/commentics/backend/controller/settings/administrator.php:30-35 | www/public/commentics/backend/controller/settings/administrator.php:38-43 | www/public/commentics/backend/controller/settings/administrator.php:46-51 | www/public/commentics/backend/controller/settings/administrator.php:54-59 | www/public/commentics/backend/controller/settings/administrator.php:62-67 | www/public/commentics/backend/controller/settings/administrator.php:70-75 — before extracting anything, compare `www/public/commentics/backend/controller/edit/admin.php` and `www/public/commentics/backend/controller/edit/comment.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 67 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 `www/public/commentics/backend/controller/edit/admin.php:38` 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 (6 lines × 15) www/public/commentics/backend/model/manage/admins.php:200— www/public/commentics/backend/model/manage/admins.php:200-205 | www/public/commentics/backend/model/manage/bans.php:151-156 | www/public/commentics/backend/model/manage/comments.php:333-338 | www/public/commentics/backend/model/manage/countries.php:171-176 | www/public/commentics/backend/model/manage/pages.php:200-205 | www/public/commentics/backend/model/manage/questions.php:161-166 | www/public/commentics/backend/model/manage/sites.php:156-161 | www/public/commentics/backend/model/manage/states.php:163-168 | www/public/commentics/backend/model/manage/subscriptions.php:215-220 | www/public/commentics/backend/model/manage/users.php:246-251 | www/public/commentics/backend/model/module/extra_fields.php:120-125 | www/public/commentics/backend/model/report/access.php:127-132 | www/public/commentics/backend/model/report/version.php:115-120 | www/public/commentics/backend/model/report/viewers.php:127-132 | www/public/commentics/backend/model/tool/database_backup.php:262-267 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 `www/public/commentics/backend/model/manage/admins.php:200` 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) www/public/commentics/backend/controller/add/admin.php:102— www/public/commentics/backend/controller/add/admin.php:102-107 | www/public/commentics/backend/controller/edit/admin.php:120-125 — `www/public/commentics/backend/controller/add/admin.php` and `www/public/commentics/backend/controller/edit/admin.php` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 50 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `www/public/commentics/backend/controller/add/admin.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 (6 lines × 2) www/public/commentics/backend/controller/settings/email_editor.php:26— www/public/commentics/backend/controller/settings/email_editor.php:26-31 | www/public/commentics/backend/controller/settings/email_editor.php:80-85 — 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 (6 lines × 2) www/public/commentics/frontend/controller/main/form.php:963— www/public/commentics/frontend/controller/main/form.php:963-968 | www/public/commentics/frontend/controller/main/form.php:1248-1253 — 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 `www/public/commentics/frontend/controller/main/form.php:963` 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 × 4) www/public/commentics/frontend/controller/main/comments.php:573— www/public/commentics/frontend/controller/main/comments.php:573-577 | www/public/commentics/frontend/controller/main/comments.php:632-636 | www/public/commentics/frontend/controller/main/comments.php:675-679 | www/public/commentics/frontend/controller/part/average_rating.php:87-91 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `www/public/commentics/frontend/controller/main/comments.php:573` 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, `www/public/commentics/frontend/controller/main/comments.php:567` calls `loadModel` and `www/public/commentics/frontend/controller/main/comments.php:626` 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 (5 lines × 4) www/public/commentics/backend/model/add/ban.php:15— www/public/commentics/backend/model/add/ban.php:15-19 | REDACTED:1647-1651 | www/public/commentics/system/library/user.php:137-141 | www/public/commentics/system/library/user.php:146-150 — there are 4 copies across 3 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 4 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 (5 lines × 4) www/public/commentics/backend/model/settings/layout_comments.php:70— www/public/commentics/backend/model/settings/layout_comments.php:70-74 | www/public/commentics/backend/model/settings/layout_form.php:224-228 | www/public/commentics/backend/model/settings/processor.php:102-106 | www/public/commentics/backend/model/settings/processor.php:126-130 — there are 4 copies across 3 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 4 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `www/public/commentics/backend/model/settings/layout_comments.php:66` calls `query` and `www/public/commentics/backend/model/settings/processor.php:98` 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 (16 lines × 2 locations) REDACTED:94— REDACTED:94 · REDACTED:121 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (16 lines × 2 locations) REDACTED:299— REDACTED:299 · REDACTED:326 — 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 locations) www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js:397— www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js:397 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js:441 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (12 lines × 2 locations) www/public/commentics/backend/view/default/javascript/common.js:113— www/public/commentics/backend/view/default/javascript/common.js:113 · www/public/commentics/backend/view/default/javascript/common.js:134 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (12 lines × 2 locations) REDACTED:1436— REDACTED:1436 · REDACTED:1611 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (12 lines × 2 locations) www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:16— www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:16 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-iptc.js:15 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Low contrast colour pair in CSS (2.8:1) www/public/commentics/install/view/default/stylesheet/sass/stylesheet.scss:201— `.green, .amber, .red` sets color: #fff on background-color: #999 — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.8:1) www/public/commentics/install/view/default/stylesheet/css/stylesheet.css:3506— `#system_page .green, #system_page .amber, #system_page .red` sets color: #fff on background-color: #999 — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.2:1) www/public/commentics/backend/view/default/stylesheet/sass/stylesheet.scss:449— `#main_dashboard_page .title` sets color: #fff on background-color: #7c7c7c — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.2:1) www/public/commentics/backend/view/default/stylesheet/css/stylesheet.css:3764— `#main_dashboard_page .title` sets color: #fff on background-color: #7c7c7c — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×2
Edited copy of a member (13 corresponding lines) www/public/commentics/backend/model/settings/flooding.php:8— www/public/commentics/backend/model/settings/flooding.php:8-20 | www/public/commentics/backend/model/settings/security.php:8-24 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) www/public/commentics/system/library/cache/memcached.php:32— www/public/commentics/system/library/cache/memcached.php:32-44 | www/public/commentics/system/library/cache/redis.php:42-54 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×2
Edited copy of a member (19 corresponding lines) www/public/commentics/backend/controller/extension/themes.php:101— www/public/commentics/backend/controller/extension/themes.php:101-119 | www/public/commentics/backend/controller/extension/themes.php:124-142 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) www/public/commentics/backend/controller/module/language_editor.php:29— www/public/commentics/backend/controller/module/language_editor.php:29-49 | www/public/commentics/backend/controller/report/errors.php:35-53 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×2
Edited copy of a member (15 corresponding lines) www/public/commentics/system/library/site.php:53— www/public/commentics/system/library/site.php:53-67 | www/public/commentics/system/library/user.php:230-246 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) www/src/Service/UserFunctions.php:33— www/src/Service/UserFunctions.php:33-47 | www/src/Service/UserFunctions.php:476-495 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×2
Edited copy of a member (7 corresponding lines) REDACTED:27— REDACTED:27-33 | REDACTED:38-44 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) www/public/commentics/system/library/cache/memcached.php:56— www/public/commentics/system/library/cache/memcached.php:56-62 | www/public/commentics/system/library/cache/redis.php:70-76 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×2
Edited copy of a member (5 corresponding lines) www/public/commentics/backend/model/module/akismet.php:8— www/public/commentics/backend/model/module/akismet.php:8-12 | www/public/commentics/backend/model/settings/error_reporting.php:8-12 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) www/public/commentics/backend/model/common/header.php:35— www/public/commentics/backend/model/common/header.php:35-39 | www/public/commentics/backend/model/common/poster.php:65-69 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (25 lines × 2) www/public/commentics/backend/model/manage/comments.php:8— www/public/commentics/backend/model/manage/comments.php:8-32 | www/public/commentics/backend/model/manage/subscriptions.php:8-32 — before extracting anything, compare `www/public/commentics/backend/model/manage/comments.php` and `www/public/commentics/backend/model/manage/subscriptions.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 190 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 `www/public/commentics/backend/model/manage/comments.php:8` 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) www/src/Controller/ApiController.php:227— www/src/Controller/ApiController.php:227-251 | www/src/Controller/ApiController.php:679-703 — 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 `www/src/Controller/ApiController.php:227` 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 (23 lines × 2) www/public/commentics/system/library/email.php:259— www/public/commentics/system/library/email.php:259-281 | www/public/commentics/system/library/email.php:416-438 — 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 `www/public/commentics/system/library/email.php:259` 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 (23 lines × 2) www/public/commentics/backend/controller/edit/page.php:40— www/public/commentics/backend/controller/edit/page.php:40-62 | www/public/commentics/backend/controller/edit/user.php:34-56 — before extracting anything, compare `www/public/commentics/backend/controller/edit/page.php` and `www/public/commentics/backend/controller/edit/user.php` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 115 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 (17 lines × 2) www/public/commentics/backend/controller/extension/installer.php:35— www/public/commentics/backend/controller/extension/installer.php:35-51 | www/public/commentics/backend/controller/tool/upgrade.php:422-438 — 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 (17 lines × 2) www/public/commentics/backend/controller/extension/modules.php:40— www/public/commentics/backend/controller/extension/modules.php:40-56 | www/public/commentics/backend/controller/extension/modules.php:89-105 — 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 `www/public/commentics/backend/controller/extension/modules.php:40` 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) www/public/commentics/backend/model/add/admin.php:18— www/public/commentics/backend/model/add/admin.php:18-33 | www/public/commentics/backend/model/edit/admin.php:20-35 — 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 `www/public/commentics/backend/model/add/admin.php:18` 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 (16 lines × 2) www/public/commentics/backend/controller/add/question.php:97— www/public/commentics/backend/controller/add/question.php:97-112 | www/public/commentics/backend/controller/edit/question.php:107-122 — `www/public/commentics/backend/controller/add/question.php` and `www/public/commentics/backend/controller/edit/question.php` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 63 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `www/public/commentics/backend/controller/add/question.php:97` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 14) www/public/commentics/backend/controller/manage/admins.php:174— www/public/commentics/backend/controller/manage/admins.php:174-188 | www/public/commentics/backend/controller/manage/bans.php:144-158 | www/public/commentics/backend/controller/manage/comments.php:269-283 | www/public/commentics/backend/controller/manage/countries.php:165-179 | www/public/commentics/backend/controller/manage/pages.php:193-207 | www/public/commentics/backend/controller/manage/questions.php:156-170 | www/public/commentics/backend/controller/manage/sites.php:156-170 | www/public/commentics/backend/controller/manage/states.php:155-169 | www/public/commentics/backend/controller/manage/subscriptions.php:191-205 | www/public/commentics/backend/controller/manage/users.php:204-218 | www/public/commentics/backend/controller/report/access.php:124-138 | www/public/commentics/backend/controller/report/version.php:116-130 | www/public/commentics/backend/controller/report/viewers.php:136-150 | www/public/commentics/backend/controller/tool/database_backup.php:147-161 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 `www/public/commentics/backend/controller/manage/admins.php:174` 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, `www/public/commentics/backend/controller/tool/database_backup.php:163` calls `loadImage` and `www/public/commentics/backend/controller/report/version.php:132` 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 × 14) www/public/commentics/backend/model/manage/admins.php:93— www/public/commentics/backend/model/manage/admins.php:93-107 | www/public/commentics/backend/model/manage/bans.php:71-85 | www/public/commentics/backend/model/manage/comments.php:147-161 | www/public/commentics/backend/model/manage/countries.php:89-103 | www/public/commentics/backend/model/manage/pages.php:109-123 | www/public/commentics/backend/model/manage/questions.php:77-91 | www/public/commentics/backend/model/manage/sites.php:87-101 | www/public/commentics/backend/model/manage/states.php:90-104 | www/public/commentics/backend/model/manage/subscriptions.php:115-129 | www/public/commentics/backend/model/manage/users.php:103-117 | www/public/commentics/backend/model/report/access.php:77-91 | www/public/commentics/backend/model/report/version.php:69-83 | www/public/commentics/backend/model/report/viewers.php:77-91 | www/public/commentics/backend/model/tool/database_backup.php:156-170 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 (14 lines × 12) www/public/commentics/backend/model/manage/admins.php:49— www/public/commentics/backend/model/manage/admins.php:49-62 | www/public/commentics/backend/model/manage/bans.php:39-52 | www/public/commentics/backend/model/manage/comments.php:83-96 | www/public/commentics/backend/model/manage/countries.php:49-62 | www/public/commentics/backend/model/manage/questions.php:41-54 | www/public/commentics/backend/model/manage/states.php:54-67 | www/public/commentics/backend/model/manage/subscriptions.php:63-76 | www/public/commentics/backend/model/module/extra_fields.php:21-34 | www/public/commentics/backend/model/report/access.php:41-54 | www/public/commentics/backend/model/report/version.php:37-50 | www/public/commentics/backend/model/report/viewers.php:41-54 | www/public/commentics/backend/model/tool/database_backup.php:109-122 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 `www/public/commentics/backend/model/manage/admins.php:49` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 12) www/public/commentics/backend/model/manage/admins.php:177— www/public/commentics/backend/model/manage/admins.php:177-190 | www/public/commentics/backend/model/manage/bans.php:128-141 | www/public/commentics/backend/model/manage/comments.php:310-323 | www/public/commentics/backend/model/manage/countries.php:148-161 | www/public/commentics/backend/model/manage/pages.php:172-185 | www/public/commentics/backend/model/manage/questions.php:138-151 | www/public/commentics/backend/model/manage/sites.php:138-151 | www/public/commentics/backend/model/manage/states.php:145-158 | www/public/commentics/backend/model/manage/subscriptions.php:192-205 | www/public/commentics/backend/model/manage/users.php:162-175 | www/public/commentics/backend/model/module/extra_fields.php:97-110 | www/public/commentics/backend/model/tool/database_backup.php:217-230 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 lines × 9) www/public/commentics/backend/controller/manage/admins.php:32— www/public/commentics/backend/controller/manage/admins.php:32-44 | www/public/commentics/backend/controller/manage/bans.php:32-44 | www/public/commentics/backend/controller/manage/countries.php:32-44 | www/public/commentics/backend/controller/manage/pages.php:32-44 | www/public/commentics/backend/controller/manage/questions.php:34-46 | www/public/commentics/backend/controller/manage/sites.php:32-44 | www/public/commentics/backend/controller/manage/states.php:32-44 | www/public/commentics/backend/controller/manage/subscriptions.php:32-44 | www/public/commentics/backend/controller/module/extra_fields.php:36-48 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 `www/public/commentics/backend/controller/manage/admins.php:32` 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 (13 lines × 9) www/public/commentics/backend/model/manage/admins.php:36— www/public/commentics/backend/model/manage/admins.php:36-48 | www/public/commentics/backend/model/manage/bans.php:26-38 | www/public/commentics/backend/model/manage/countries.php:36-48 | www/public/commentics/backend/model/manage/questions.php:28-40 | www/public/commentics/backend/model/manage/states.php:37-49 | www/public/commentics/backend/model/report/access.php:28-40 | www/public/commentics/backend/model/report/version.php:24-36 | www/public/commentics/backend/model/report/viewers.php:28-40 | www/public/commentics/backend/model/tool/database_backup.php:96-108 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 `www/public/commentics/backend/model/manage/admins.php:36` 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 (13 lines × 5) www/public/commentics/backend/controller/tool/upgrade.php:115— www/public/commentics/backend/controller/tool/upgrade.php:115-127 | www/public/commentics/backend/controller/tool/upgrade.php:157-169 | www/public/commentics/backend/controller/tool/upgrade.php:199-211 | www/public/commentics/backend/controller/tool/upgrade.php:241-253 | www/public/commentics/backend/controller/tool/upgrade.php:287-299 — all 5 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 `www/public/commentics/backend/controller/tool/upgrade.php:115` 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 (13 lines × 5) www/public/commentics/system/library/email.php:233— www/public/commentics/system/library/email.php:233-245 | www/public/commentics/system/library/email.php:271-283 | www/public/commentics/system/library/email.php:376-388 | www/public/commentics/system/library/email.php:411-423 | www/public/commentics/system/library/email.php:428-440 — all 5 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 `www/public/commentics/system/library/email.php:233` 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, `www/public/commentics/system/library/email.php:232` calls `get` and `www/public/commentics/system/library/email.php:374` 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 (13 lines × 4) www/public/commentics/frontend/controller/main/form.php:843— www/public/commentics/frontend/controller/main/form.php:843-855 | www/public/commentics/frontend/controller/main/form.php:1191-1203 | www/public/commentics/frontend/controller/main/form.php:1297-1309 | www/public/commentics/frontend/controller/part/notify.php:42-54 — before extracting anything, compare `www/public/commentics/frontend/controller/main/form.php` and `www/public/commentics/frontend/controller/part/notify.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 84 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 `www/public/commentics/frontend/controller/main/form.php:843` 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, `www/public/commentics/frontend/controller/main/form.php:1187` calls `get` and `www/public/commentics/frontend/controller/main/form.php:840` 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 (13 lines × 4) www/src/Controller/LocationController.php:65— www/src/Controller/LocationController.php:65-77 | www/src/Controller/SearchController.php:53-65 | www/src/Controller/UserController.php:223-235 | www/src/Controller/UserController.php:309-321 — there are 4 copies across 3 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 4 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `www/src/Controller/SearchController.php:70` calls `number_format` and `www/src/Controller/LocationController.php:82` 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 (12 lines × 5) www/public/commentics/backend/model/manage/questions.php:164— www/public/commentics/backend/model/manage/questions.php:164-175 | www/public/commentics/backend/model/manage/sites.php:159-170 | www/public/commentics/backend/model/manage/states.php:166-177 | www/public/commentics/backend/model/module/extra_fields.php:123-134 | www/public/commentics/backend/model/report/access.php:130-141 — before extracting anything, compare `www/public/commentics/backend/model/manage/questions.php` and `www/public/commentics/backend/model/manage/sites.php` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 129 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 `www/public/commentics/backend/model/manage/questions.php:164` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 5) REDACTED:156— REDACTED:156-167 | REDACTED:186-197 | REDACTED:216-227 | REDACTED:275-286 | REDACTED:312-323 — all 5 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 `REDACTED:156` 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 × 14) www/public/commentics/backend/controller/manage/admins.php:83— www/public/commentics/backend/controller/manage/admins.php:83-92 | www/public/commentics/backend/controller/manage/bans.php:65-74 | www/public/commentics/backend/controller/manage/comments.php:157-166 | www/public/commentics/backend/controller/manage/countries.php:77-86 | www/public/commentics/backend/controller/manage/pages.php:83-92 | www/public/commentics/backend/controller/manage/questions.php:73-82 | www/public/commentics/backend/controller/manage/sites.php:65-74 | www/public/commentics/backend/controller/manage/states.php:71-80 | www/public/commentics/backend/controller/manage/subscriptions.php:95-104 | www/public/commentics/backend/controller/manage/users.php:99-108 | www/public/commentics/backend/controller/report/access.php:43-52 | www/public/commentics/backend/controller/report/version.php:39-48 | www/public/commentics/backend/controller/report/viewers.php:47-56 | www/public/commentics/backend/controller/tool/database_backup.php:65-74 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 `www/public/commentics/backend/controller/manage/admins.php:83` 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 × 14) www/public/commentics/backend/model/manage/admins.php:135— www/public/commentics/backend/model/manage/admins.php:135-144 | www/public/commentics/backend/model/manage/bans.php:101-110 | www/public/commentics/backend/model/manage/comments.php:209-218 | www/public/commentics/backend/model/manage/countries.php:127-136 | www/public/commentics/backend/model/manage/pages.php:151-160 | www/public/commentics/backend/model/manage/questions.php:111-120 | www/public/commentics/backend/model/manage/sites.php:117-126 | www/public/commentics/backend/model/manage/states.php:124-133 | www/public/commentics/backend/model/manage/subscriptions.php:165-174 | www/public/commentics/backend/model/manage/users.php:141-150 | www/public/commentics/backend/model/report/access.php:111-120 | www/public/commentics/backend/model/report/version.php:99-108 | www/public/commentics/backend/model/report/viewers.php:111-120 | www/public/commentics/backend/model/tool/database_backup.php:186-195 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 `www/public/commentics/backend/model/manage/admins.php:135` 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 × 9) www/public/commentics/backend/controller/edit/ban.php:45— www/public/commentics/backend/controller/edit/ban.php:45-54 | www/public/commentics/backend/controller/edit/comment.php:265-274 | www/public/commentics/backend/controller/edit/country.php:71-80 | www/public/commentics/backend/controller/edit/page.php:89-98 | www/public/commentics/backend/controller/edit/question.php:59-68 | www/public/commentics/backend/controller/edit/site.php:109-118 | www/public/commentics/backend/controller/edit/state.php:57-66 | www/public/commentics/backend/controller/edit/user.php:69-78 | www/public/commentics/backend/controller/module/extra_fields.php:452-461 — before extracting anything, compare `www/public/commentics/backend/controller/edit/ban.php` and `www/public/commentics/backend/controller/edit/comment.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 58 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 `www/public/commentics/backend/controller/edit/ban.php:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `www/public/commentics/backend/controller/edit/country.php:82` calls `getFrontendLanguages` and `www/public/commentics/backend/controller/edit/ban.php:56` 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 (10 lines × 9) REDACTED:39— REDACTED:39-48 | REDACTED:70-79 | REDACTED:1461-1470 | REDACTED:32-41 | REDACTED:151-160 | REDACTED:181-190 | REDACTED:211-220 | REDACTED:270-279 | REDACTED:307-316 — there are 9 copies across 3 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 9 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:150` calls `extension_loaded` and `REDACTED:37` 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 (9 lines × 3) www/public/commentics/backend/controller/manage/countries.php:181— www/public/commentics/backend/controller/manage/countries.php:181-189 | www/public/commentics/backend/controller/manage/states.php:169-177 | www/public/commentics/backend/controller/module/extra_fields.php:137-145 — before extracting anything, compare `www/public/commentics/backend/controller/manage/countries.php` and `www/public/commentics/backend/controller/manage/states.php` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 242 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. 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 (9 lines × 3) www/src/Service/CameraFunctions.php:20— www/src/Service/CameraFunctions.php:20-28 | www/src/Service/CameraFunctions.php:47-55 | www/src/Twig/AppExtension.php:71-80 — 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.
Duplicated block (8 lines × 7) www/public/commentics/backend/controller/manage/admins.php:225— www/public/commentics/backend/controller/manage/admins.php:225-232 | www/public/commentics/backend/controller/manage/comments.php:340-347 | www/public/commentics/backend/controller/manage/pages.php:255-262 | www/public/commentics/backend/controller/manage/sites.php:192-199 | www/public/commentics/backend/controller/manage/subscriptions.php:242-249 | www/public/commentics/backend/controller/manage/users.php:246-253 | www/public/commentics/backend/controller/report/viewers.php:166-173 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/comments.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 245 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 `www/public/commentics/backend/controller/manage/admins.php:225` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 7) www/public/commentics/backend/controller/tool/upgrade.php:62— www/public/commentics/backend/controller/tool/upgrade.php:62-69 | www/public/commentics/backend/controller/tool/upgrade.php:121-128 | www/public/commentics/backend/controller/tool/upgrade.php:163-170 | www/public/commentics/backend/controller/tool/upgrade.php:205-212 | www/public/commentics/backend/controller/tool/upgrade.php:247-254 | www/public/commentics/backend/controller/tool/upgrade.php:293-300 | www/public/commentics/backend/controller/tool/upgrade.php:333-340 — all 7 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 `www/public/commentics/backend/controller/tool/upgrade.php:62` 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, `www/public/commentics/backend/controller/tool/upgrade.php:119` calls `sleep` and `www/public/commentics/backend/controller/tool/upgrade.php:60` 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 lines × 18) www/public/commentics/backend/controller/edit/admin.php:30— www/public/commentics/backend/controller/edit/admin.php:30-36 | www/public/commentics/backend/controller/edit/ban.php:28-34 | www/public/commentics/backend/controller/edit/comment.php:34-40 | www/public/commentics/backend/controller/edit/comment.php:82-88 | www/public/commentics/backend/controller/edit/comment.php:110-116 | www/public/commentics/backend/controller/edit/comment.php:162-168 | www/public/commentics/backend/controller/edit/country.php:36-42 | www/public/commentics/backend/controller/edit/page.php:28-34 | www/public/commentics/backend/controller/edit/page.php:58-64 | www/public/commentics/backend/controller/edit/question.php:30-36 | www/public/commentics/backend/controller/edit/site.php:28-34 | www/public/commentics/backend/controller/edit/site.php:62-68 | www/public/commentics/backend/controller/edit/state.php:28-34 | www/public/commentics/backend/controller/edit/user.php:28-34 | www/public/commentics/backend/controller/module/extra_fields.php:341-347 | www/public/commentics/backend/controller/module/extra_fields.php:361-367 | www/public/commentics/backend/controller/module/extra_fields.php:399-405 | www/public/commentics/backend/controller/settings/administrator.php:22-28 — before extracting anything, compare `www/public/commentics/backend/controller/edit/admin.php` and `www/public/commentics/backend/controller/edit/ban.php` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 60 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 `www/public/commentics/backend/controller/edit/admin.php:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 18) www/public/commentics/backend/model/manage/admins.php:16— www/public/commentics/backend/model/manage/admins.php:16-22 | www/public/commentics/backend/model/manage/admins.php:32-38 | www/public/commentics/backend/model/manage/bans.php:18-24 | www/public/commentics/backend/model/manage/comments.php:28-34 | www/public/commentics/backend/model/manage/comments.php:60-66 | www/public/commentics/backend/model/manage/countries.php:20-26 | www/public/commentics/backend/model/manage/pages.php:26-32 | www/public/commentics/backend/model/manage/questions.php:16-22 | www/public/commentics/backend/model/manage/sites.php:32-38 | www/public/commentics/backend/model/manage/states.php:25-31 | www/public/commentics/backend/model/manage/subscriptions.php:28-34 | www/public/commentics/backend/model/manage/subscriptions.php:44-50 | www/public/commentics/backend/model/manage/users.php:26-32 | www/public/commentics/backend/model/manage/users.php:40-46 | www/public/commentics/backend/model/report/access.php:16-22 | www/public/commentics/backend/model/report/version.php:16-22 | www/public/commentics/backend/model/report/viewers.php:16-22 | www/public/commentics/backend/model/tool/database_backup.php:88-94 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 after the matched lines, `www/public/commentics/backend/model/manage/subscriptions.php:37` calls `escape` and `www/public/commentics/backend/model/manage/admins.php:24` 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 (9 lines × 14) REDACTED:93— REDACTED:93-101 | REDACTED:132-140 | REDACTED:157-165 | REDACTED:172-180 | REDACTED:186-194 | REDACTED:199-207 | REDACTED:238-246 | REDACTED:656-664 | REDACTED:668-676 | REDACTED:680-688 | REDACTED:723-731 | REDACTED:735-743 | REDACTED:747-755 | REDACTED:759-767 — all 14 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 `REDACTED:93` 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, `REDACTED:249` calls `get`, `convertLinks` and `REDACTED:141` 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 (9 lines × 14) REDACTED:304— REDACTED:304-312 | REDACTED:317-325 | REDACTED:341-349 | REDACTED:366-374 | REDACTED:381-389 | REDACTED:395-403 | REDACTED:408-416 | REDACTED:457-465 | REDACTED:469-477 | REDACTED:481-489 | REDACTED:493-501 | REDACTED:529-537 | REDACTED:541-549 | REDACTED:553-561 — all 14 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 `REDACTED:304` 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 (6 lines × 5) www/public/commentics/frontend/controller/main/user.php:202— www/public/commentics/frontend/controller/main/user.php:202-207 | www/public/commentics/frontend/controller/main/user.php:260-265 | www/public/commentics/frontend/controller/main/user.php:308-313 | www/public/commentics/frontend/controller/main/user.php:348-353 | www/public/commentics/frontend/controller/main/user.php:390-395 — all 5 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 `www/public/commentics/frontend/controller/main/user.php:202` 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 × 5) www/public/commentics/backend/controller/add/site.php:134— www/public/commentics/backend/controller/add/site.php:134-139 | www/public/commentics/backend/controller/edit/page.php:130-135 | www/public/commentics/backend/controller/edit/site.php:144-149 | www/public/commentics/backend/controller/settings/system.php:194-199 | www/public/commentics/backend/controller/settings/system.php:214-219 — `www/public/commentics/backend/controller/add/site.php` and `www/public/commentics/backend/controller/edit/site.php` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 7 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `www/public/commentics/backend/controller/add/site.php:134` 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 (6 lines × 3) www/src/Controller/ApiController.php:264— www/src/Controller/ApiController.php:264-269 | www/src/Controller/ApiController.php:716-721 | www/src/Service/SearchFunctions.php:165-170 — 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.
Duplicated block (6 lines × 3) www/public/commentics/backend/controller/add/admin.php:122— www/public/commentics/backend/controller/add/admin.php:122-127 | www/public/commentics/backend/controller/edit/admin.php:136-141 | www/public/commentics/backend/controller/settings/administrator.php:140-145 — `www/public/commentics/backend/controller/add/admin.php` and `www/public/commentics/backend/controller/edit/admin.php` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 50 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `www/public/commentics/backend/controller/add/admin.php:122` 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 × 9) www/public/commentics/backend/controller/data/list.php:164— www/public/commentics/backend/controller/data/list.php:164-168 | www/public/commentics/backend/controller/edit/admin.php:30-34 | www/public/commentics/backend/controller/edit/ban.php:28-32 | www/public/commentics/backend/controller/edit/page.php:28-32 | www/public/commentics/backend/controller/edit/question.php:30-34 | www/public/commentics/backend/controller/edit/site.php:28-32 | www/public/commentics/backend/controller/edit/state.php:28-32 | www/public/commentics/backend/controller/edit/user.php:28-32 | www/public/commentics/backend/controller/module/extra_fields.php:341-345 — before extracting anything, compare `www/public/commentics/backend/controller/edit/admin.php` and `www/public/commentics/backend/controller/edit/ban.php` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 60 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 × 9) www/public/commentics/backend/controller/settings/email_editor.php:27— www/public/commentics/backend/controller/settings/email_editor.php:27-31 | www/public/commentics/backend/controller/settings/email_editor.php:33-37 | www/public/commentics/backend/controller/settings/email_editor.php:39-43 | www/public/commentics/backend/controller/settings/email_editor.php:45-49 | www/public/commentics/backend/controller/settings/email_editor.php:51-55 | www/public/commentics/backend/controller/settings/email_editor.php:81-85 | www/public/commentics/backend/controller/settings/email_editor.php:87-91 | www/public/commentics/backend/controller/settings/email_editor.php:93-97 | www/public/commentics/backend/controller/settings/email_editor.php:99-103 — all 9 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 8) www/public/commentics/backend/controller/edit/admin.php:58— www/public/commentics/backend/controller/edit/admin.php:58-62 | www/public/commentics/backend/controller/edit/ban.php:34-38 | www/public/commentics/backend/controller/edit/comment.php:88-92 | www/public/commentics/backend/controller/edit/comment.php:174-178 | www/public/commentics/backend/controller/edit/country.php:48-52 | www/public/commentics/backend/controller/edit/question.php:42-46 | www/public/commentics/backend/controller/edit/site.php:74-78 | www/public/commentics/backend/controller/edit/state.php:40-44 — before extracting anything, compare `www/public/commentics/backend/controller/edit/admin.php` and `www/public/commentics/backend/controller/edit/ban.php` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 60 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 after the matched lines, `www/public/commentics/backend/controller/edit/admin.php:66` calls `formatDate` and `www/public/commentics/backend/controller/edit/ban.php:42` 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 (5 lines × 8) www/public/commentics/backend/model/common/administrator.php:17— www/public/commentics/backend/model/common/administrator.php:17-21 | www/public/commentics/backend/model/edit/ban.php:26-30 | www/public/commentics/backend/model/edit/question.php:17-21 | www/public/commentics/backend/model/module/extra_fields.php:157-161 | REDACTED:1916-1920 | www/public/commentics/system/library/geo.php:180-184 | www/public/commentics/system/library/site.php:26-30 | www/public/commentics/system/library/user.php:392-396 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 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 8 times. 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.
Low cohesion: Base (LCOM4 7) www/public/commentics/system/engine/base.php:4— Base's methods fall into 7 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 7 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: Home (LCOM4 5) REDACTED:4— Home'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.
Duplicated block (23 lines × 2 locations) www/public/commentics/backend/view/default/javascript/common.js:2407— www/public/commentics/backend/view/default/javascript/common.js:2407 · www/public/commentics/backend/view/default/javascript/common.js:2442 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (23 lines × 2 locations) REDACTED:2061— REDACTED:2061 · REDACTED:2116 — 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 (15 lines × 2 locations) REDACTED:1399— REDACTED:1399 · REDACTED:1571 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (15 lines × 2 locations) REDACTED:2268— REDACTED:2268 · REDACTED:2290 — 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 (14 lines × 2 locations) www/public/commentics/backend/view/default/javascript/common.js:1811— www/public/commentics/backend/view/default/javascript/common.js:1811 · www/public/commentics/backend/view/default/javascript/common.js:1831 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (14 lines × 2 locations) www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:121— www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:121 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:138 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (13 lines × 3 locations) www/public/commentics/backend/view/default/javascript/common.js:704— www/public/commentics/backend/view/default/javascript/common.js:704 · www/public/commentics/backend/view/default/javascript/common.js:1408 · www/public/commentics/backend/view/default/javascript/common.js:2254 — 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 (13 lines × 3 locations) REDACTED:1788— REDACTED:1788 · REDACTED:2269 · REDACTED:2291 — 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 (11 lines × 4 locations) REDACTED:1105— REDACTED:1105 · REDACTED:1364 · REDACTED:1493 · REDACTED:1563 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (11 lines × 4 locations) www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif-map.js:17— www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif-map.js:17 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:16 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-iptc-map.js:18 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-iptc.js:15 — the 4 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 4 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
Duplicated block (10 lines × 2 locations) REDACTED:672— REDACTED:672 · REDACTED:730 — 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 (10 lines × 2 locations) REDACTED:2417— REDACTED:2417 · REDACTED:2430 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (9 lines × 2 locations) REDACTED:54— REDACTED:54 · REDACTED:87 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (9 lines × 2 locations) REDACTED:886— REDACTED:886 · REDACTED:1249 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
X27 · Collection changed while being enumerated· Collection is structurally changed while it is being enumerated · ×2
Collection is structurally changed while it is being enumerated www/public/commentics/system/library/modification.php:79— line 79 walks `$files` by value, so the walk is the snapshot taken when the loop began, and line 82 changes that same collection with `$files = …` before the next iteration: the loop carries on over the old value while the body now works on the new one. PHP raises nothing, so the loop completes over a different set than the code meant.
Collection is structurally changed while it is being enumerated www/public/commentics/system/library/modification.php:84— line 84 walks `$files` by value, so the walk is the snapshot taken when the loop began, and line 101 changes that same collection with `$files = …` before the next iteration: the loop carries on over the old value while the body now works on the new one. PHP raises nothing, so the loop completes over a different set than the code meant.
AC1 · Text alternatives· <canvas> without a text alternative · ×1
<canvas> without a text alternative www/public/commentics/backend/view/default/template/main/dashboard.tpl:150— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×1
Animation without a prefers-reduced-motion guard www/public/js/pannellum-2.5.7/pannellum.htm:3— `.pnlm-loading` moves (`animation-name: pnlm-mv`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
No authorization www/src/Controller/AddController.php:15— This repository serves requests — a Symfony controller action (#[Route]) (www/src/Controller/AddController.php:15) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected.
SettingsLayoutFormController.index (cyclomatic 313) www/public/commentics/backend/controller/settings/layout_form.php:6— SettingsLayoutFormController.index has cyclomatic complexity 313 (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.
SettingsLayoutCommentsController.index (cyclomatic 301) www/public/commentics/backend/controller/settings/layout_comments.php:6— SettingsLayoutCommentsController.index has cyclomatic complexity 301 (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.
common.cmtx_wait_for_jquery (cyclomatic 208) REDACTED:2— common.cmtx_wait_for_jquery has cyclomatic complexity 208 (threshold 15). Most of this is not in the body itself: 2 of the 208 points are its own statements and the rest belongs to 60 function literals inside it that branch (lines 8, 827, 1655, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
(anonymous) (cyclomatic 208) REDACTED:2— (anonymous) has cyclomatic complexity 208 (threshold 15). Most of this is not in the body itself: 2 of the 208 points are its own statements and the rest belongs to 129 function items inside it that branch (a function literal at line 8, a function literal at line 827, a function literal at line 1655, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
embed.window.addEventListener("load") (cyclomatic 205) REDACTED:6— embed.window.addEventListener("load") has cyclomatic complexity 205 (threshold 15). Of this number, 16 points are the body's own statements and 189 belong to 58 function literals inside it that branch. 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.
SettingsProcessorController.index (cyclomatic 196) www/public/commentics/backend/controller/settings/processor.php:6— SettingsProcessorController.index has cyclomatic complexity 196 (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.
SettingsLayoutFormController.validate (cyclomatic 185) www/public/commentics/backend/controller/settings/layout_form.php:1274— SettingsLayoutFormController.validate has cyclomatic complexity 185 (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.
(anonymous) (cyclomatic 140) www/public/commentics/backend/view/default/javascript/common.js:1— (anonymous) has cyclomatic complexity 140 (threshold 15). Most of this is not in the body itself: 11 of the 140 points are its own statements and the rest belongs to 230 function items inside it that branch (a function literal at line 580, a function literal at line 45, a function literal at line 434, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
SettingsLayoutCommentsController.validate (cyclomatic 128) www/public/commentics/backend/controller/settings/layout_comments.php:1183— SettingsLayoutCommentsController.validate has cyclomatic complexity 128 (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.
MainFormController.index (cyclomatic 120) www/public/commentics/frontend/controller/main/form.php:6— MainFormController.index has cyclomatic complexity 120 (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.
SettingsProcessorController.validate (cyclomatic 102) www/public/commentics/backend/controller/settings/processor.php:841— SettingsProcessorController.validate has cyclomatic complexity 102 (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.
ModuleCssEditorController.validate (cyclomatic 90) www/public/commentics/backend/controller/module/css_editor.php:329— ModuleCssEditorController.validate has cyclomatic complexity 90 (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.
MainCommentsController.index (cyclomatic 82) www/public/commentics/frontend/controller/main/comments.php:10— MainCommentsController.index has cyclomatic complexity 82 (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.
SettingsLayoutCommentsModel.update (cyclomatic 67) www/public/commentics/backend/model/settings/layout_comments.php:6— SettingsLayoutCommentsModel.update has cyclomatic complexity 67 (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.
SettingsLayoutFormModel.update (cyclomatic 67) www/public/commentics/backend/model/settings/layout_form.php:6— SettingsLayoutFormModel.update has cyclomatic complexity 67 (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.
Email.send (cyclomatic 64) www/public/commentics/system/library/email.php:97— Email.send has cyclomatic complexity 64 (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.
MainFormController.submit (cyclomatic 63) www/public/commentics/frontend/controller/main/form.php:831— MainFormController.submit has cyclomatic complexity 63 (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.
Modification.__construct (cyclomatic 60) www/public/commentics/system/library/modification.php:10— Modification.__construct has cyclomatic complexity 60 (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.
MainFormModel.validateComment (cyclomatic 55) REDACTED:78— MainFormModel.validateComment has cyclomatic complexity 55 (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.
EditCommentController.index (cyclomatic 52) www/public/commentics/backend/controller/edit/comment.php:6— EditCommentController.index has cyclomatic complexity 52 (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.
ManageCommentsController.index (cyclomatic 48) www/public/commentics/backend/controller/manage/comments.php:6— ManageCommentsController.index has cyclomatic complexity 48 (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.
ModuleCssEditorController.index (cyclomatic 45) www/public/commentics/backend/controller/module/css_editor.php:42— ModuleCssEditorController.index has cyclomatic complexity 45 (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.
MainFormModel.validateHeadline (cyclomatic 45) REDACTED:280— MainFormModel.validateHeadline has cyclomatic complexity 45 (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.
SettingsEmailSetupController.validate (cyclomatic 41) www/public/commentics/backend/controller/settings/email_setup.php:179— SettingsEmailSetupController.validate has cyclomatic complexity 41 (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.
SettingsSystemController.validate (cyclomatic 41) www/public/commentics/backend/controller/settings/system.php:175— SettingsSystemController.validate has cyclomatic complexity 41 (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.
SettingsProcessorModel.update (cyclomatic 40) www/public/commentics/backend/model/settings/processor.php:6— SettingsProcessorModel.update has cyclomatic complexity 40 (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.
MainDashboardController.index (cyclomatic 38) www/public/commentics/backend/controller/main/dashboard.php:6— MainDashboardController.index 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.
EditCommentController.validate (cyclomatic 37) www/public/commentics/backend/controller/edit/comment.php:388— EditCommentController.validate has cyclomatic complexity 37 (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.
ManageUsersController.index (cyclomatic 37) www/public/commentics/backend/controller/manage/users.php:6— ManageUsersController.index has cyclomatic complexity 37 (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.
ManagePagesController.index (cyclomatic 33) www/public/commentics/backend/controller/manage/pages.php:6— ManagePagesController.index 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.
SettingsSystemController.index (cyclomatic 32) www/public/commentics/backend/controller/settings/system.php:6— SettingsSystemController.index has cyclomatic complexity 32 (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.
MainCommentsController.getComment (cyclomatic 32) www/public/commentics/frontend/controller/main/comments.php:367— MainCommentsController.getComment 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.
ModuleExtraFieldsController.edit (cyclomatic 31) www/public/commentics/backend/controller/module/extra_fields.php:315— ModuleExtraFieldsController.edit has cyclomatic complexity 31 (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.
ModuleExtraFieldsController.validateForm (cyclomatic 31) www/public/commentics/backend/controller/module/extra_fields.php:537— ModuleExtraFieldsController.validateForm has cyclomatic complexity 31 (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.
ManageSubscriptionsController.index (cyclomatic 30) www/public/commentics/backend/controller/manage/subscriptions.php:6— ManageSubscriptionsController.index 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.
ManageAdminsController.index (cyclomatic 29) www/public/commentics/backend/controller/manage/admins.php:6— ManageAdminsController.index 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.
ModuleExtraFieldsController.add (cyclomatic 29) www/public/commentics/backend/controller/module/extra_fields.php:160— ModuleExtraFieldsController.add has cyclomatic complexity 29 (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.
EditCommentModel.update (cyclomatic 29) www/public/commentics/backend/model/edit/comment.php:6— EditCommentModel.update 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.
MainFormModel.validateName (cyclomatic 29) REDACTED:427— MainFormModel.validateName 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.
ManageCountriesController.index (cyclomatic 28) www/public/commentics/backend/controller/manage/countries.php:6— ManageCountriesController.index 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.
SettingsAdministratorController.index (cyclomatic 28) www/public/commentics/backend/controller/settings/administrator.php:6— SettingsAdministratorController.index has cyclomatic complexity 28 (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.
SettingsEmailSetupController.index (cyclomatic 28) www/public/commentics/backend/controller/settings/email_setup.php:6— SettingsEmailSetupController.index has cyclomatic complexity 28 (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.
SettingsCacheController.validate (cyclomatic 27) www/public/commentics/backend/controller/settings/cache.php:75— SettingsCacheController.validate 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.
MainCommentsModel.getComments (cyclomatic 27) www/public/commentics/frontend/model/main/comments.php:7— MainCommentsModel.getComments has cyclomatic complexity 27 (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.
MainFormModel.validateTown (cyclomatic 27) REDACTED:699— MainFormModel.validateTown 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.
AddSiteController.validate (cyclomatic 26) www/public/commentics/backend/controller/add/site.php:117— AddSiteController.validate has cyclomatic complexity 26 (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.
EditSiteController.validate (cyclomatic 26) www/public/commentics/backend/controller/edit/site.php:127— EditSiteController.validate has cyclomatic complexity 26 (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.
MainFormModel.validateWebsite (cyclomatic 26) REDACTED:628— MainFormModel.validateWebsite 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.
ManageQuestionsController.index (cyclomatic 25) www/public/commentics/backend/controller/manage/questions.php:6— ManageQuestionsController.index 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.
ManageStatesController.index (cyclomatic 25) www/public/commentics/backend/controller/manage/states.php:6— ManageStatesController.index 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.
ModuleExtraFieldsController.index (cyclomatic 25) www/public/commentics/backend/controller/module/extra_fields.php:6— ModuleExtraFieldsController.index 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.
ExtensionInstallerModel.install (cyclomatic 25) www/public/commentics/backend/model/extension/installer.php:6— ExtensionInstallerModel.install 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.
SettingsLayoutCommentsModel.checkLayoutSettings (cyclomatic 25) www/public/commentics/backend/model/settings/layout_comments.php:337— SettingsLayoutCommentsModel.checkLayoutSettings 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.
SettingsLayoutFormModel.checkLayoutSettings (cyclomatic 25) www/public/commentics/backend/model/settings/layout_form.php:383— SettingsLayoutFormModel.checkLayoutSettings 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.
ManageBansController.index (cyclomatic 24) www/public/commentics/backend/controller/manage/bans.php:6— ManageBansController.index 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.
ManageSitesController.index (cyclomatic 24) www/public/commentics/backend/controller/manage/sites.php:6— ManageSitesController.index 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.
SettingsSecurityController.index (cyclomatic 24) www/public/commentics/backend/controller/settings/security.php:6— SettingsSecurityController.index 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.
AddAdminController.validate (cyclomatic 23) www/public/commentics/backend/controller/add/admin.php:89— AddAdminController.validate has cyclomatic complexity 23 (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.
DataListController.index (cyclomatic 23) www/public/commentics/backend/controller/data/list.php:6— DataListController.index has cyclomatic complexity 23 (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.
EditSiteController.index (cyclomatic 23) www/public/commentics/backend/controller/edit/site.php:6— EditSiteController.index 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.
SettingsEmailEditorController.index (cyclomatic 23) www/public/commentics/backend/controller/settings/email_editor.php:6— SettingsEmailEditorController.index has cyclomatic complexity 23 (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.
ToolDatabaseBackupController.index (cyclomatic 23) www/public/commentics/backend/controller/tool/database_backup.php:6— ToolDatabaseBackupController.index 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.
MainUserController.index (cyclomatic 23) www/public/commentics/frontend/controller/main/user.php:6— MainUserController.index 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.
Page.__construct (cyclomatic 23) www/public/commentics/system/library/page.php:19— Page.__construct 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.
MainFormController.reply (cyclomatic 22) www/public/commentics/frontend/controller/main/form.php:1282— MainFormController.reply 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.
MainFormModel.validateEmail (cyclomatic 22) REDACTED:507— MainFormModel.validateEmail 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.
MainUserModel.saveUploadedAvatar (cyclomatic 22) www/public/commentics/frontend/model/main/user.php:55— MainUserModel.saveUploadedAvatar 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.
ApiController.api_all_benches (cyclomatic 22) www/src/Controller/ApiController.php:200— ApiController.api_all_benches 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.
AddSiteController.index (cyclomatic 21) www/public/commentics/backend/controller/add/site.php:6— AddSiteController.index has cyclomatic complexity 21 (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.
EditAdminController.index (cyclomatic 21) www/public/commentics/backend/controller/edit/admin.php:6— EditAdminController.index has cyclomatic complexity 21 (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.
EditAdminController.validate (cyclomatic 21) www/public/commentics/backend/controller/edit/admin.php:107— EditAdminController.validate has cyclomatic complexity 21 (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.
ReportPermissionsController.index (cyclomatic 21) www/public/commentics/backend/controller/report/permissions.php:6— ReportPermissionsController.index has cyclomatic complexity 21 (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.
SettingsAdministratorController.validate (cyclomatic 21) www/public/commentics/backend/controller/settings/administrator.php:117— SettingsAdministratorController.validate has cyclomatic complexity 21 (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.
SettingsFloodingController.index (cyclomatic 21) www/public/commentics/backend/controller/settings/flooding.php:6— SettingsFloodingController.index has cyclomatic complexity 21 (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.
PartSortByController.index (cyclomatic 21) www/public/commentics/frontend/controller/part/sort_by.php:6— PartSortByController.index has cyclomatic complexity 21 (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.
LoginLoginController.index (cyclomatic 20) www/public/commentics/backend/controller/login/login.php:6— LoginLoginController.index 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.
PartNotifyController.notify (cyclomatic 20) www/public/commentics/frontend/controller/part/notify.php:25— PartNotifyController.notify 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.
User.getAvatar (cyclomatic 20) www/public/commentics/system/library/user.php:399— User.getAvatar 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.
Variable.formatDate (cyclomatic 20) www/public/commentics/system/library/variable.php:141— Variable.formatDate has cyclomatic complexity 20 (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.
EditUserController.validate (cyclomatic 19) www/public/commentics/backend/controller/edit/user.php:87— EditUserController.validate 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.
ManageCommentsModel.getComments (cyclomatic 19) www/public/commentics/backend/model/manage/comments.php:6— ManageCommentsModel.getComments 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.
MainFormController.edit (cyclomatic 19) www/public/commentics/frontend/controller/main/form.php:1176— MainFormController.edit 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.
MainSystemModel.check (cyclomatic 19) www/public/commentics/install/model/main/system.php:6— MainSystemModel.check 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.
EditPageController.index (cyclomatic 18) www/public/commentics/backend/controller/edit/page.php:6— EditPageController.index 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.
EditPageController.validate (cyclomatic 18) www/public/commentics/backend/controller/edit/page.php:107— EditPageController.validate 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.
ExtensionThemesController.index (cyclomatic 18) www/public/commentics/backend/controller/extension/themes.php:6— ExtensionThemesController.index 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.
ReportViewersController.index (cyclomatic 18) www/public/commentics/backend/controller/report/viewers.php:6— ReportViewersController.index 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.
MainFormModel.validateExtraFields (cyclomatic 18) REDACTED:849— MainFormModel.validateExtraFields 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.
MainFormModel.needsApproval (cyclomatic 18) REDACTED:1946— MainFormModel.needsApproval 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.
Home.getLatestVersion (cyclomatic 18) REDACTED:21— Home.getLatestVersion 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.
ReportAccessController.index (cyclomatic 17) www/public/commentics/backend/controller/report/access.php:6— ReportAccessController.index 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.
ModuleLanguageEditorModel.getText (cyclomatic 17) www/public/commentics/backend/model/module/language_editor.php:16— ModuleLanguageEditorModel.getText 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.
MainFormModel.addBBCode (cyclomatic 17) REDACTED:1123— MainFormModel.addBBCode 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.
MainUpgrade2Model.upgrade (cyclomatic 17) www/public/commentics/install/model/main/upgrade_2.php:6— MainUpgrade2Model.upgrade 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.
ApiController.api_bench (cyclomatic 17) www/src/Controller/ApiController.php:25— ApiController.api_bench 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.
AddAdminController.index (cyclomatic 16) www/public/commentics/backend/controller/add/admin.php:6— AddAdminController.index 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.
ReportVersionController.index (cyclomatic 16) www/public/commentics/backend/controller/report/version.php:6— ReportVersionController.index 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.
MainCommentsController.flag (cyclomatic 16) www/public/commentics/frontend/controller/main/comments.php:557— MainCommentsController.flag 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.
MainCommentsModel.convertSmilies (cyclomatic 16) www/public/commentics/frontend/model/main/comments.php:234— MainCommentsModel.convertSmilies 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.
ApiController.api_tagged_benches (cyclomatic 16) www/src/Controller/ApiController.php:668— ApiController.api_tagged_benches 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.
EditController.update (cyclomatic 16) www/src/Controller/EditController.php:121— EditController.update 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.
(anonymous) (cyclomatic 16) REDACTED:6— (anonymous) 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. This is NOT this file's highest cyclomatic complexity: (anonymous)::(anonymous)::e::m (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
SettingsLayoutFormController.index (cognitive 625) www/public/commentics/backend/controller/settings/layout_form.php:6— SettingsLayoutFormController.index has cognitive complexity 625 (threshold 15). Drivers by points: if/else 482 (557 pts), boolean chains 67, loops 1 (nesting depth added 75). 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.
SettingsLayoutCommentsController.index (cognitive 584) www/public/commentics/backend/controller/settings/layout_comments.php:6— SettingsLayoutCommentsController.index has cognitive complexity 584 (threshold 15). Drivers by points: if/else 432 (502 pts), boolean chains 71, ternaries 11 (nesting depth added 70). 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.
(anonymous) (cognitive 577) REDACTED:2— (anonymous) has cognitive complexity 577 (threshold 15). Drivers by points: if/else 188 (516 pts), boolean chains 29, loops 4 (20 pts), ternaries 3 (12 pts) (nesting depth added 353). Most of this is not in the body itself: 1 of the 577 points is its own statement and the rest belongs to 129 function items inside it that branch (a function literal at line 827, a function literal at line 8, a function literal at line 1655, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
common.cmtx_wait_for_jquery (cognitive 565) REDACTED:2— common.cmtx_wait_for_jquery has cognitive complexity 565 (threshold 15). Drivers by points: if/else 188 (516 pts), boolean chains 29, loops 4 (20 pts) (nesting depth added 344). Most of this is not in the body itself: 1 of the 565 points is its own statement and the rest belongs to 60 function literals inside it that branch (lines 827, 8, 1231, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
SettingsProcessorController.index (cognitive 389) www/public/commentics/backend/controller/settings/processor.php:6— SettingsProcessorController.index has cognitive complexity 389 (threshold 15). Drivers by points: if/else 310 (350 pts), boolean chains 39 (nesting depth added 40). 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.
Modification.__construct (cognitive 377) www/public/commentics/system/library/modification.php:10— Modification.__construct has cognitive complexity 377 (threshold 15). Drivers by points: if/else 47 (303 pts), loops 11 (57 pts), match/switch 1 (12 pts), boolean chains 5 (nesting depth added 313). 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.
(anonymous) (cognitive 255) REDACTED:6— (anonymous) has cognitive complexity 255 (threshold 15). Drivers by points: boolean chains 94, ternaries 41 (91 pts), if/else 27 (53 pts), loops 4 (8 pts), match/switch 3 (6 pts), error handling 1 (3 pts) (nesting depth added 85). Of this number, 24 points are the body's own statements and 231 belong to 102 function items inside it that branch. 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.
MainFormController.index (cognitive 246) www/public/commentics/frontend/controller/main/form.php:6— MainFormController.index has cognitive complexity 246 (threshold 15). Drivers by points: if/else 96 (166 pts), boolean chains 41, ternaries 13 (33 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 93). 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.
Email.send (cognitive 207) www/public/commentics/system/library/email.php:97— Email.send has cognitive complexity 207 (threshold 15). Drivers by points: if/else 49 (149 pts), loops 16 (53 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 138). 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.
MainFormModel.validateHeadline (cognitive 200) REDACTED:280— MainFormModel.validateHeadline has cognitive complexity 200 (threshold 15). Drivers by points: if/else 59 (194 pts), boolean chains 6 (nesting depth added 135). 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.
MainFormController.submit (cognitive 195) www/public/commentics/frontend/controller/main/form.php:831— MainFormController.submit has cognitive complexity 195 (threshold 15). Drivers by points: if/else 51 (168 pts), boolean chains 27 (nesting depth added 117). 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.
SettingsLayoutFormController.validate (cognitive 193) www/public/commentics/backend/controller/settings/layout_form.php:1274— SettingsLayoutFormController.validate has cognitive complexity 193 (threshold 15). Drivers by points: boolean chains 116, if/else 70 (74 pts), loops 1 (3 pts) (nesting depth added 6). 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.
MainFormModel.validateComment (cognitive 184) REDACTED:78— MainFormModel.validateComment has cognitive complexity 184 (threshold 15). Drivers by points: if/else 67 (177 pts), boolean chains 7 (nesting depth added 110). 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.
embed.window.addEventListener("load") (cognitive 181) REDACTED:6— embed.window.addEventListener("load") has cognitive complexity 181 (threshold 15). Drivers by points: boolean chains 89, if/else 22 (44 pts), ternaries 16 (37 pts), loops 2 (6 pts), error handling 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 50). Of this number, 21 points are the body's own statements and 160 belong to 58 function literals inside it that branch. 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.
ManageCommentsController.index (cognitive 176) www/public/commentics/backend/controller/manage/comments.php:6— ManageCommentsController.index has cognitive complexity 176 (threshold 15). Drivers by points: if/else 68 (167 pts), ternaries 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 102). 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.
(anonymous) (cognitive 162) www/public/commentics/backend/view/default/javascript/common.js:1— (anonymous) has cognitive complexity 162 (threshold 15). Drivers by points: if/else 141 (149 pts), boolean chains 10, loops 3 (nesting depth added 8). Most of this is not in the body itself: 10 of the 162 points are its own statements and the rest belongs to 230 function items inside it that branch (a function literal at line 580, a function literal at line 45, a function literal at line 1817, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MainCommentsController.index (cognitive 144) www/public/commentics/frontend/controller/main/comments.php:10— MainCommentsController.index has cognitive complexity 144 (threshold 15). Drivers by points: if/else 63 (108 pts), boolean chains 30, loops 2 (4 pts), match/switch 1, ternaries 1 (nesting depth added 47). 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.
ModuleCssEditorController.validate (cognitive 135) www/public/commentics/backend/controller/module/css_editor.php:329— ModuleCssEditorController.validate has cognitive complexity 135 (threshold 15). Drivers by points: if/else 59 (94 pts), boolean chains 41 (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.
SettingsLayoutCommentsController.validate (cognitive 128) www/public/commentics/backend/controller/settings/layout_comments.php:1183— SettingsLayoutCommentsController.validate has cognitive complexity 128 (threshold 15). Drivers by points: boolean chains 83, if/else 45. 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.
ManageUsersController.index (cognitive 123) www/public/commentics/backend/controller/manage/users.php:6— ManageUsersController.index has cognitive complexity 123 (threshold 15). Drivers by points: if/else 50 (116 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 68). 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.
MainUserController.index (cognitive 118) www/public/commentics/frontend/controller/main/user.php:6— MainUserController.index has cognitive complexity 118 (threshold 15). Drivers by points: if/else 35 (113 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 81). 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.
SettingsProcessorController.validate (cognitive 102) www/public/commentics/backend/controller/settings/processor.php:841— SettingsProcessorController.validate has cognitive complexity 102 (threshold 15). Drivers by points: boolean chains 62, if/else 40. 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.
MainCommentsController.flag (cognitive 99) www/public/commentics/frontend/controller/main/comments.php:557— MainCommentsController.flag has cognitive complexity 99 (threshold 15). Drivers by points: if/else 24 (99 pts) (nesting depth added 75). 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.
EditCommentController.index (cognitive 95) www/public/commentics/backend/controller/edit/comment.php:6— EditCommentController.index has cognitive complexity 95 (threshold 15). Drivers by points: if/else 85 (88 pts), boolean chains 4, loops 2 (3 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.
MainFormModel.validateExtraFields (cognitive 95) REDACTED:849— MainFormModel.validateExtraFields has cognitive complexity 95 (threshold 15). Drivers by points: if/else 18 (91 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 74). 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.
MainFormController.edit (cognitive 93) www/public/commentics/frontend/controller/main/form.php:1176— MainFormController.edit has cognitive complexity 93 (threshold 15). Drivers by points: if/else 28 (90 pts), boolean chains 3 (nesting depth added 62). 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.
MainCommentsController.getComment (cognitive 89) www/public/commentics/frontend/controller/main/comments.php:367— MainCommentsController.getComment has cognitive complexity 89 (threshold 15). Drivers by points: if/else 41 (81 pts), boolean chains 3, ternaries 1 (3 pts), loops 2 (nesting depth added 42). 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.
PartNotifyController.notify (cognitive 89) www/public/commentics/frontend/controller/part/notify.php:25— PartNotifyController.notify has cognitive complexity 89 (threshold 15). Drivers by points: if/else 25 (86 pts), boolean chains 3 (nesting depth added 61). 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.
ModuleCssEditorController.index (cognitive 86) www/public/commentics/backend/controller/module/css_editor.php:42— ModuleCssEditorController.index has cognitive complexity 86 (threshold 15). Drivers by points: if/else 85 (86 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.
MainFormModel.validateTown (cognitive 84) REDACTED:699— MainFormModel.validateTown has cognitive complexity 84 (threshold 15). Drivers by points: if/else 30 (77 pts), boolean chains 7 (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.
MainUserController.saveUploadedAvatar (cognitive 82) www/public/commentics/frontend/controller/main/user.php:188— MainUserController.saveUploadedAvatar has cognitive complexity 82 (threshold 15). Drivers by points: if/else 23 (82 pts) (nesting depth added 59). 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.
MainFormModel.needsApproval (cognitive 78) REDACTED:1946— MainFormModel.needsApproval has cognitive complexity 78 (threshold 15). Drivers by points: if/else 22 (73 pts), boolean chains 5 (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.
MainFormModel.validateWebsite (cognitive 76) REDACTED:628— MainFormModel.validateWebsite has cognitive complexity 76 (threshold 15). Drivers by points: if/else 27 (68 pts), boolean chains 8 (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.
ManagePagesController.index (cognitive 75) www/public/commentics/backend/controller/manage/pages.php:6— ManagePagesController.index has cognitive complexity 75 (threshold 15). Drivers by points: if/else 45 (68 pts), ternaries 2 (4 pts), boolean chains 2, loops 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.
MainFormController.reply (cognitive 74) www/public/commentics/frontend/controller/main/form.php:1282— MainFormController.reply has cognitive complexity 74 (threshold 15). Drivers by points: if/else 25 (67 pts), boolean chains 7 (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.
MainDashboardController.index (cognitive 72) www/public/commentics/backend/controller/main/dashboard.php:6— MainDashboardController.index has cognitive complexity 72 (threshold 15). Drivers by points: if/else 43 (62 pts), boolean chains 10 (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.
MainFormModel.validateName (cognitive 69) REDACTED:427— MainFormModel.validateName has cognitive complexity 69 (threshold 15). Drivers by points: if/else 28 (60 pts), boolean chains 9 (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.
ManageSubscriptionsController.index (cognitive 68) www/public/commentics/backend/controller/manage/subscriptions.php:6— ManageSubscriptionsController.index has cognitive complexity 68 (threshold 15). Drivers by points: if/else 44 (64 pts), ternaries 1 (2 pts), boolean chains 1, 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.
User.getAvatar (cognitive 68) www/public/commentics/system/library/user.php:399— User.getAvatar has cognitive complexity 68 (threshold 15). Drivers by points: if/else 20 (63 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 46). 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.
ManageAdminsController.index (cognitive 66) www/public/commentics/backend/controller/manage/admins.php:6— ManageAdminsController.index has cognitive complexity 66 (threshold 15). Drivers by points: if/else 40 (60 pts), ternaries 2 (4 pts), boolean chains 1, loops 1 (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.
SettingsLayoutCommentsModel.update (cognitive 66) www/public/commentics/backend/model/settings/layout_comments.php:6— SettingsLayoutCommentsModel.update has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 66. 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.
SettingsLayoutFormModel.update (cognitive 66) www/public/commentics/backend/model/settings/layout_form.php:6— SettingsLayoutFormModel.update has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 66. 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.
MainFormModel.validateEmail (cognitive 66) REDACTED:507— MainFormModel.validateEmail has cognitive complexity 66 (threshold 15). Drivers by points: if/else 24 (60 pts), boolean chains 6 (nesting depth added 36). 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.
ManageCountriesController.index (cognitive 64) www/public/commentics/backend/controller/manage/countries.php:6— ManageCountriesController.index has cognitive complexity 64 (threshold 15). Drivers by points: if/else 38 (58 pts), ternaries 2 (4 pts), boolean chains 1, loops 1 (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.
SettingsCacheController.validate (cognitive 63) www/public/commentics/backend/controller/settings/cache.php:75— SettingsCacheController.validate has cognitive complexity 63 (threshold 15). Drivers by points: if/else 22 (48 pts), boolean chains 9, error handling 1 (6 pts) (nesting depth added 31). 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.
SettingsSystemController.index (cognitive 61) www/public/commentics/backend/controller/settings/system.php:6— SettingsSystemController.index has cognitive complexity 61 (threshold 15). Drivers by points: if/else 54 (58 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.
ToolDatabaseBackupController.index (cognitive 61) www/public/commentics/backend/controller/tool/database_backup.php:6— ToolDatabaseBackupController.index has cognitive complexity 61 (threshold 15). Drivers by points: if/else 33 (59 pts), boolean chains 1, loops 1 (nesting depth added 26). 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.
ModuleExtraFieldsController.index (cognitive 60) www/public/commentics/backend/controller/module/extra_fields.php:6— ModuleExtraFieldsController.index has cognitive complexity 60 (threshold 15). Drivers by points: if/else 31 (54 pts), ternaries 2 (4 pts), boolean chains 1, loops 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.
ManageStatesController.index (cognitive 59) www/public/commentics/backend/controller/manage/states.php:6— ManageStatesController.index has cognitive complexity 59 (threshold 15). Drivers by points: if/else 35 (55 pts), ternaries 1 (2 pts), boolean chains 1, 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.
ManageQuestionsController.index (cognitive 58) www/public/commentics/backend/controller/manage/questions.php:6— ManageQuestionsController.index has cognitive complexity 58 (threshold 15). Drivers by points: if/else 36 (56 pts), boolean chains 1, loops 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.
EditCommentModel.update (cognitive 58) www/public/commentics/backend/model/edit/comment.php:6— EditCommentModel.update has cognitive complexity 58 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 3 (7 pts), boolean chains 4, match/switch 1 (3 pts), ternaries 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.
MainCommentsController.vote (cognitive 58) www/public/commentics/frontend/controller/main/comments.php:510— MainCommentsController.vote has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (54 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.
ManageSitesController.index (cognitive 57) www/public/commentics/backend/controller/manage/sites.php:6— ManageSitesController.index has cognitive complexity 57 (threshold 15). Drivers by points: if/else 33 (53 pts), ternaries 1 (2 pts), boolean chains 1, 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.
ManageBansController.index (cognitive 56) www/public/commentics/backend/controller/manage/bans.php:6— ManageBansController.index has cognitive complexity 56 (threshold 15). Drivers by points: if/else 34 (54 pts), boolean chains 1, loops 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.
ModuleExtraFieldsController.edit (cognitive 56) www/public/commentics/backend/controller/module/extra_fields.php:315— ModuleExtraFieldsController.edit has cognitive complexity 56 (threshold 15). Drivers by points: if/else 48 (52 pts), boolean chains 4 (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.
ExtensionInstallerModel.install (cognitive 56) www/public/commentics/backend/model/extension/installer.php:6— ExtensionInstallerModel.install has cognitive complexity 56 (threshold 15). Drivers by points: if/else 25 (50 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 26). 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.
ModuleExtraFieldsController.add (cognitive 54) www/public/commentics/backend/controller/module/extra_fields.php:160— ModuleExtraFieldsController.add has cognitive complexity 54 (threshold 15). Drivers by points: if/else 47 (51 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.
SettingsAdministratorController.index (cognitive 53) www/public/commentics/backend/controller/settings/administrator.php:6— SettingsAdministratorController.index has cognitive complexity 53 (threshold 15). Drivers by points: if/else 40 (47 pts), boolean chains 6 (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.
SettingsEmailSetupController.index (cognitive 53) www/public/commentics/backend/controller/settings/email_setup.php:6— SettingsEmailSetupController.index has cognitive complexity 53 (threshold 15). Drivers by points: if/else 52 (53 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.
MainUserModel.saveUploadedAvatar (cognitive 52) www/public/commentics/frontend/model/main/user.php:55— MainUserModel.saveUploadedAvatar has cognitive complexity 52 (threshold 15). Drivers by points: if/else 23 (47 pts), loops 1 (2 pts), match/switch 1 (2 pts), boolean chains 1 (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.
ApiController.api_all_benches (cognitive 51) www/src/Controller/ApiController.php:200— ApiController.api_all_benches has cognitive complexity 51 (threshold 15). Drivers by points: if/else 27 (48 pts), loops 2, boolean chains 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.
LoginLoginController.index (cognitive 50) www/public/commentics/backend/controller/login/login.php:6— LoginLoginController.index has cognitive complexity 50 (threshold 15). Drivers by points: if/else 21 (46 pts), boolean chains 4 (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.
Page.__construct (cognitive 49) www/public/commentics/system/library/page.php:19— Page.__construct has cognitive complexity 49 (threshold 15). Drivers by points: if/else 23 (42 pts), boolean chains 7 (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.
PartAverageRatingController.rate (cognitive 46) www/public/commentics/frontend/controller/part/average_rating.php:71— PartAverageRatingController.rate has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (44 pts), boolean chains 2 (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.
SettingsSecurityController.index (cognitive 45) www/public/commentics/backend/controller/settings/security.php:6— SettingsSecurityController.index has cognitive complexity 45 (threshold 15). Drivers by points: if/else 32 (39 pts), boolean chains 6 (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.
MainUserController.saveSelectedAvatar (cognitive 45) www/public/commentics/frontend/controller/main/user.php:246— MainUserController.saveSelectedAvatar has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (45 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.
MainPageModel.identifyViewer (cognitive 44) www/public/commentics/frontend/model/main/page.php:22— MainPageModel.identifyViewer has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (44 pts) (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.
EditController.update (cognitive 43) www/src/Controller/EditController.php:121— EditController.update has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 2 (6 pts), error handling 1 (3 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.
EditSiteController.index (cognitive 41) www/public/commentics/backend/controller/edit/site.php:6— EditSiteController.index has cognitive complexity 41 (threshold 15). Drivers by points: if/else 35 (38 pts), boolean chains 3 (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, 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.
SettingsEmailSetupController.validate (cognitive 41) www/public/commentics/backend/controller/settings/email_setup.php:179— SettingsEmailSetupController.validate has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 24, if/else 17. 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.
SettingsSystemController.validate (cognitive 41) www/public/commentics/backend/controller/settings/system.php:175— SettingsSystemController.validate has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 24, if/else 17. 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.
common.cmtx_start_upgrade (cognitive 41) www/public/commentics/backend/view/default/javascript/common.js:2516— common.cmtx_start_upgrade has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (41 pts) (nesting depth added 27). None of this is in the body itself: all 41 points belong to 7 function literals inside it that branch (lines 2525, 2541, 2557, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
MainFormModel.validateUpload (cognitive 40) REDACTED:992— MainFormModel.validateUpload has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 2 (10 pts), boolean chains 6 (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.
ApiController.api_bench (cognitive 40) www/src/Controller/ApiController.php:25— ApiController.api_bench has cognitive complexity 40 (threshold 15). Drivers by points: if/else 22 (37 pts), loops 1 (3 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.
AddSiteController.index (cognitive 39) www/public/commentics/backend/controller/add/site.php:6— AddSiteController.index has cognitive complexity 39 (threshold 15). Drivers by points: if/else 34 (37 pts), boolean chains 2 (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, 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.
SettingsFloodingController.index (cognitive 39) www/public/commentics/backend/controller/settings/flooding.php:6— SettingsFloodingController.index has cognitive complexity 39 (threshold 15). Drivers by points: if/else 30 (35 pts), boolean chains 4 (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.
SettingsProcessorModel.update (cognitive 39) www/public/commentics/backend/model/settings/processor.php:6— SettingsProcessorModel.update has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 39. 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.
ToolUpgradeModel.install (cognitive 39) REDACTED:195— ToolUpgradeModel.install has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 3 (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.
MainCommentsController.original (cognitive 39) www/public/commentics/frontend/controller/main/comments.php:618— MainCommentsController.original has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (39 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. This shape REPEATS in the file: one other method here (MainCommentsController.delete) 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.
MainCommentsController.delete (cognitive 39) www/public/commentics/frontend/controller/main/comments.php:661— MainCommentsController.delete has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (39 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. This shape REPEATS in the file: one other method here (MainCommentsController.original) 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.
MainCommentsModel.getComments (cognitive 39) www/public/commentics/frontend/model/main/comments.php:7— MainCommentsModel.getComments has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 11, 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.
Home.getLatestVersion (cognitive 39) REDACTED:21— Home.getLatestVersion has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (39 pts) (nesting depth added 20). 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.
ModuleLanguageEditorModel.getText (cognitive 38) www/public/commentics/backend/model/module/language_editor.php:16— ModuleLanguageEditorModel.getText has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 20). 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.
Template.parseIfAndElseIf (cognitive 38) www/public/commentics/system/library/template.php:151— Template.parseIfAndElseIf has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (35 pts), loops 2 (3 pts) (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.
EditCommentController.validate (cognitive 37) www/public/commentics/backend/controller/edit/comment.php:388— EditCommentController.validate has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 19, if/else 18. 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.
ModuleExtraFieldsController.validateForm (cognitive 36) www/public/commentics/backend/controller/module/extra_fields.php:537— ModuleExtraFieldsController.validateForm has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 18, if/else 13 (18 pts) (nesting depth added 5). 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.
SettingsLayoutCommentsModel.checkLayoutSettings (cognitive 36) www/public/commentics/backend/model/settings/layout_comments.php:337— SettingsLayoutCommentsModel.checkLayoutSettings has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 12 (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.
SettingsLayoutFormModel.checkLayoutSettings (cognitive 36) www/public/commentics/backend/model/settings/layout_form.php:383— SettingsLayoutFormModel.checkLayoutSettings has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 12 (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.
MainUserController.deleteSubscription (cognitive 36) www/public/commentics/frontend/controller/main/user.php:332— MainUserController.deleteSubscription has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (35 pts), boolean chains 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.
ApiController.api_tagged_benches (cognitive 35) www/src/Controller/ApiController.php:668— ApiController.api_tagged_benches has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (32 pts), loops 2, 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.
EditAdminController.index (cognitive 34) www/public/commentics/backend/controller/edit/admin.php:6— EditAdminController.index has cognitive complexity 34 (threshold 15). Drivers by points: if/else 26 (29 pts), boolean chains 5 (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, 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.
ExtensionThemesController.index (cognitive 33) www/public/commentics/backend/controller/extension/themes.php:6— ExtensionThemesController.index has cognitive complexity 33 (threshold 15). Drivers by points: if/else 28 (31 pts), boolean chains 2 (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, 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.
PartSortByController.index (cognitive 33) www/public/commentics/frontend/controller/part/sort_by.php:6— PartSortByController.index has cognitive complexity 33 (threshold 15). Drivers by points: if/else 26, boolean chains 7. 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.
MainSystemModel.check (cognitive 33) www/public/commentics/install/model/main/system.php:6— MainSystemModel.check has cognitive complexity 33 (threshold 15). Drivers by points: if/else 30, boolean chains 3. 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.
EditPageController.index (cognitive 31) www/public/commentics/backend/controller/edit/page.php:6— EditPageController.index has cognitive complexity 31 (threshold 15). Drivers by points: if/else 27 (29 pts), boolean chains 2 (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.
ReportViewersController.index (cognitive 31) www/public/commentics/backend/controller/report/viewers.php:6— ReportViewersController.index has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25 (27 pts), ternaries 1 (2 pts), boolean chains 1, loops 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, 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.
ReportAccessController.index (cognitive 30) www/public/commentics/backend/controller/report/access.php:6— ReportAccessController.index has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24 (26 pts), ternaries 1 (2 pts), boolean chains 1, loops 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, 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.
MainFormController.captcha (cognitive 30) www/public/commentics/frontend/controller/main/form.php:754— MainFormController.captcha has cognitive complexity 30 (threshold 15). Drivers by points: loops 5 (20 pts), if/else 3 (6 pts), boolean chains 4 (nesting depth added 18). 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.
AddAdminController.index (cognitive 28) www/public/commentics/backend/controller/add/admin.php:6— AddAdminController.index has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23 (26 pts), boolean chains 2 (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, 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.
ReportVersionController.index (cognitive 28) www/public/commentics/backend/controller/report/version.php:6— ReportVersionController.index has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22 (24 pts), ternaries 1 (2 pts), boolean chains 1, loops 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, 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.
Template.parseForEach (cognitive 28) www/public/commentics/system/library/template.php:216— Template.parseForEach has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 2 (5 pts) (nesting depth added 20). 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.
SettingsLicenceController.validate (cognitive 27) www/public/commentics/backend/controller/settings/licence.php:47— SettingsLicenceController.validate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 4 (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.
MainUserController.save (cognitive 27) www/public/commentics/frontend/controller/main/user.php:294— MainUserController.save has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (27 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. This shape REPEATS in the file: one other method here (MainUserController.deleteAllSubscriptions) 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.
MainUserController.deleteAllSubscriptions (cognitive 27) www/public/commentics/frontend/controller/main/user.php:376— MainUserController.deleteAllSubscriptions has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (27 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. This shape REPEATS in the file: one other method here (MainUserController.save) 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.
MainFormModel.validateUser (cognitive 27) REDACTED:572— MainFormModel.validateUser has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (25 pts), boolean chains 2 (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.
MainFormModel.validateRating (cognitive 27) REDACTED:601— MainFormModel.validateRating has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 3 (nesting depth added 13). 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.
MainUpgrade2Model.upgrade (cognitive 27) www/public/commentics/install/model/main/upgrade_2.php:6— MainUpgrade2Model.upgrade has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 2 (6 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.
UploadController.upload (cognitive 27) www/src/Controller/UploadController.php:20— UploadController.upload has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (22 pts), error handling 1 (3 pts), loops 1 (2 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.
AddSiteController.validate (cognitive 26) www/public/commentics/backend/controller/add/site.php:117— AddSiteController.validate has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 12. 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.
EditSiteController.validate (cognitive 26) www/public/commentics/backend/controller/edit/site.php:127— EditSiteController.validate has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 12. 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.
Controller.loadLanguage (cognitive 26) www/public/commentics/system/engine/controller.php:167— Controller.loadLanguage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (26 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.
ManageCommentsController.autocomplete (cognitive 25) www/public/commentics/backend/controller/manage/comments.php:350— ManageCommentsController.autocomplete has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, loops 1 (3 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.
ManageSubscriptionsController.autocomplete (cognitive 25) www/public/commentics/backend/controller/manage/subscriptions.php:252— ManageSubscriptionsController.autocomplete has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, loops 1 (3 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.
ReportViewersController.autocomplete (cognitive 25) www/public/commentics/backend/controller/report/viewers.php:176— ReportViewersController.autocomplete has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, loops 1 (3 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.
MainDatabaseController.index (cognitive 25) www/public/commentics/install/controller/main/database.php:6— MainDatabaseController.index has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21 (22 pts), ternaries 1 (3 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, 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.
EditSpamController.index (cognitive 24) www/public/commentics/backend/controller/edit/spam.php:6— EditSpamController.index has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22 (23 pts), boolean chains 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.
Base.changePurpose (cognitive 24) www/public/commentics/system/engine/base.php:169— Base.changePurpose has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 1 (2 pts) (nesting depth added 13). 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.
AddAdminController.validate (cognitive 23) www/public/commentics/backend/controller/add/admin.php:89— AddAdminController.validate has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 11. 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.
ModuleAkismetController.index (cognitive 23) www/public/commentics/backend/controller/module/akismet.php:6— ModuleAkismetController.index has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 4 (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, 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.
ManageCommentsModel.getComments (cognitive 23) www/public/commentics/backend/model/manage/comments.php:6— ManageCommentsModel.getComments has cognitive complexity 23 (threshold 15). Drivers by points: if/else 22 (23 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.
ReportPermissionsController.index (cognitive 22) www/public/commentics/backend/controller/report/permissions.php:6— ReportPermissionsController.index has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 16, if/else 4 (5 pts), loops 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.
SettingsCacheController.index (cognitive 22) www/public/commentics/backend/controller/settings/cache.php:6— SettingsCacheController.index has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19 (22 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, 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.
EditAdminModel.update (cognitive 22) www/public/commentics/backend/model/edit/admin.php:6— EditAdminModel.update has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (6 pts), boolean chains 2 (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.
CommonHeaderController.index (cognitive 22) www/public/commentics/frontend/controller/common/header.php:6— CommonHeaderController.index has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 4, match/switch 1 (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.
PartRssController.rss (cognitive 22) www/public/commentics/frontend/controller/part/rss.php:21— PartRssController.rss has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (7 pts), boolean chains 3 (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.
Controller.loadView (cognitive 22) www/public/commentics/system/engine/controller.php:6— Controller.loadView has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (18 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.
EditAdminController.validate (cognitive 21) www/public/commentics/backend/controller/edit/admin.php:107— EditAdminController.validate has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 10. 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.
EditCountryController.index (cognitive 21) www/public/commentics/backend/controller/edit/country.php:6— EditCountryController.index has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 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.
EditUserController.index (cognitive 21) www/public/commentics/backend/controller/edit/user.php:6— EditUserController.index has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 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.
EditUserController.validate (cognitive 21) www/public/commentics/backend/controller/edit/user.php:87— EditUserController.validate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 9 (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.
SettingsAdministratorController.validate (cognitive 21) www/public/commentics/backend/controller/settings/administrator.php:117— SettingsAdministratorController.validate has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 10. 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.
SettingsApprovalController.index (cognitive 21) www/public/commentics/backend/controller/settings/approval.php:6— SettingsApprovalController.index has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (18 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.
ToolClearCacheController.index (cognitive 21) www/public/commentics/backend/controller/tool/clear_cache.php:6— ToolClearCacheController.index has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (18 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.
CommonPaginationModel.paginate (cognitive 21) www/public/commentics/backend/model/common/pagination.php:6— CommonPaginationModel.paginate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 1 (2 pts), ternaries 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.
ManageUsersModel.getUsers (cognitive 21) www/public/commentics/backend/model/manage/users.php:6— ManageUsersModel.getUsers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18 (21 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, 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.
MainPageController.index (cognitive 21) www/public/commentics/frontend/controller/main/page.php:6— MainPageController.index has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 5 (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.
Controller.parse (cognitive 21) www/public/commentics/system/engine/controller.php:114— Controller.parse has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 1 (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.
User.__construct (cognitive 21) www/public/commentics/system/library/user.php:21— User.__construct has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (14 pts), boolean chains 4, if/else 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.
BenchFunctions.getBench (cognitive 21) REDACTED:29— BenchFunctions.getBench has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (4 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.
common.cmtxRefreshComments (cognitive 21) REDACTED:2498— common.cmtxRefreshComments has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2 (nesting depth added 7). None of this is in the body itself: all 21 points belong to 4 function literals inside it that branch (lines 2522, 2576, 2505, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ManagePagesController.autocomplete (cognitive 20) www/public/commentics/backend/controller/manage/pages.php:265— ManagePagesController.autocomplete has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (3 pts), boolean chains 2 (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.
ManageQuestionsController.autocomplete (cognitive 20) www/public/commentics/backend/controller/manage/questions.php:213— ManageQuestionsController.autocomplete has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (3 pts), boolean chains 2 (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.
ModuleRichSnippetsController.index (cognitive 20) www/public/commentics/backend/controller/module/rich_snippets.php:6— ModuleRichSnippetsController.index has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 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.
ReportAccessController.autocomplete (cognitive 20) www/public/commentics/backend/controller/report/access.php:164— ReportAccessController.autocomplete has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (3 pts), boolean chains 2 (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.
MainFormModel.validateQuestion (cognitive 20) REDACTED:816— MainFormModel.validateQuestion has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 1 (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.
Home.callHome (cognitive 20) REDACTED:233— Home.callHome has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4 (7 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.
Task.__construct (cognitive 20) www/public/commentics/system/library/task.php:14— Task.__construct has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 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.
UserController.mastodon_login (cognitive 20) www/src/Controller/UserController.php:19— UserController.mastodon_login has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), error handling 1 (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.
AddCountryController.index (cognitive 19) www/public/commentics/backend/controller/add/country.php:6— AddCountryController.index has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18 (19 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.
ExtensionLanguagesController.index (cognitive 19) www/public/commentics/backend/controller/extension/languages.php:6— ExtensionLanguagesController.index has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 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.
LoginResetController.index (cognitive 19) www/public/commentics/backend/controller/login/reset.php:6— LoginResetController.index has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (19 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.
SettingsErrorReportingController.index (cognitive 19) www/public/commentics/backend/controller/settings/error_reporting.php:6— SettingsErrorReportingController.index has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 2 (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, 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.
ToolUpgradeController.download (cognitive 19) www/public/commentics/backend/controller/tool/upgrade.php:56— ToolUpgradeController.download has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (19 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.
Variable.formatDate (cognitive 19) www/public/commentics/system/library/variable.php:141— Variable.formatDate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19. 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.
CommonHeaderController.index (cognitive 18) www/public/commentics/backend/controller/common/header.php:6— CommonHeaderController.index has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 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.
EditPageController.validate (cognitive 18) www/public/commentics/backend/controller/edit/page.php:107— EditPageController.validate has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 9. 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.
EditQuestionController.index (cognitive 18) www/public/commentics/backend/controller/edit/question.php:6— EditQuestionController.index has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 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.
ManagePagesModel.getPages (cognitive 18) www/public/commentics/backend/model/manage/pages.php:6— ManagePagesModel.getPages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17 (18 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.
MainFormModel.validateImageCaptcha (cognitive 18) REDACTED:929— MainFormModel.validateImageCaptcha has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5 (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.
EditStateController.index (cognitive 17) www/public/commentics/backend/controller/edit/state.php:6— EditStateController.index has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 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.
ManageCommentsModel.sortUrl (cognitive 17) www/public/commentics/backend/model/manage/comments.php:99— ManageCommentsModel.sortUrl has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16 (17 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.
Geo.getCountries (cognitive 17) www/public/commentics/system/library/geo.php:57— Geo.getCountries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, 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.
MediaFunctions.getMediaMetadata (cognitive 17) www/src/Service/MediaFunctions.php:102— MediaFunctions.getMediaMetadata has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 2 (8 pts), if/else 3 (6 pts), boolean chains 3 (nesting depth added 9). 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.
AddCountryController.validate (cognitive 16) www/public/commentics/backend/controller/add/country.php:81— AddCountryController.validate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, loops 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.
AddQuestionController.index (cognitive 16) www/public/commentics/backend/controller/add/question.php:6— AddQuestionController.index has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15 (16 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.
EditCountryController.validate (cognitive 16) www/public/commentics/backend/controller/edit/country.php:91— EditCountryController.validate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, loops 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.
SettingsEmailEditorController.index (cognitive 16) www/public/commentics/backend/controller/settings/email_editor.php:6— SettingsEmailEditorController.index has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), match/switch 1 (2 pts) (nesting depth added 2). 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.
SettingsEmailEditorController.validate (cognitive 16) www/public/commentics/backend/controller/settings/email_editor.php:181— SettingsEmailEditorController.validate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, 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.
ManageSubscriptionsModel.getSubscriptions (cognitive 16) www/public/commentics/backend/model/manage/subscriptions.php:6— ManageSubscriptionsModel.getSubscriptions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. 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.
ToolUpgradeModel.download (cognitive 16) REDACTED:57— ToolUpgradeModel.download has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 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.
MainFormModel.validateReCaptcha (cognitive 16) REDACTED:904— MainFormModel.validateReCaptcha has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3 (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.
MainFormModel.addBBCode (cognitive 16) REDACTED:1123— MainFormModel.addBBCode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. 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.
MainFormModel.estimateMimeTypeFromBase64 (cognitive 16) REDACTED:1878— MainFormModel.estimateMimeTypeFromBase64 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3 (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.
UserController.show_user (cognitive 16) www/src/Controller/UserController.php:173— UserController.show_user has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (16 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, 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.
(anonymous) (cognitive 16) www/public/commentics/install/view/default/javascript/common.js:1— (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 3, 60). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
FunctionTooLong: common.cmtx_wait_for_jquery REDACTED:2— FunctionTooLong — cmtx_wait_for_jquery runs 1188 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1088 over it, 11.88× 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.
TooManyMethods: MainFormModel REDACTED:4— TooManyMethods — 79 methods. The bar is 30 methods; this is 49 over it, 2.63× 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.
Change coupling: AddController.php ↔ UploadController.php www/src/Controller/AddController.php:1— `www/src/Controller/AddController.php` and `www/src/Controller/UploadController.php` change together 69% of the time (9 of the 13 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 9 shared commits counted here, the most recent 3 are `9c3d01ef` Prepare for Android app; `378b880d` Fix phpstan errors; `73bcdfdf` Fix OSM login — run `git show` on any of them.
D4 · Code Duplication· Near-duplicate member family (15 members, 31 shared lines) · ×1
Near-duplicate member family (15 members, 31 shared lines) www/public/commentics/backend/controller/manage/admins.php:8— www/public/commentics/backend/controller/manage/admins.php:8-208 | www/public/commentics/backend/controller/manage/bans.php:8-172 | www/public/commentics/backend/controller/manage/comments.php:8-323 | www/public/commentics/backend/controller/manage/countries.php:8-197 | www/public/commentics/backend/controller/manage/pages.php:8-231 | www/public/commentics/backend/controller/manage/questions.php:8-186 | www/public/commentics/backend/controller/manage/sites.php:8-182 | www/public/commentics/backend/controller/manage/states.php:8-183 | www/public/commentics/backend/controller/manage/subscriptions.php:8-225 | www/public/commentics/backend/controller/manage/users.php:8-236 | www/public/commentics/backend/controller/module/extra_fields.php:8-157 | www/public/commentics/backend/controller/report/access.php:8-144 | www/public/commentics/backend/controller/report/version.php:8-134 | www/public/commentics/backend/controller/report/viewers.php:8-156 | www/public/commentics/backend/controller/tool/database_backup.php:8-167 — These 15 members are variants of one another: a block of 31 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 15 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 15 times.
D4 · Code Duplication· Near-duplicate member family (15 members, 17 shared lines) · ×1
Near-duplicate member family (15 members, 17 shared lines) www/public/commentics/backend/model/manage/admins.php:200— www/public/commentics/backend/model/manage/admins.php:200-218 | www/public/commentics/backend/model/manage/bans.php:151-169 | www/public/commentics/backend/model/manage/comments.php:333-351 | www/public/commentics/backend/model/manage/countries.php:171-189 | www/public/commentics/backend/model/manage/pages.php:200-218 | www/public/commentics/backend/model/manage/questions.php:161-179 | www/public/commentics/backend/model/manage/sites.php:156-174 | www/public/commentics/backend/model/manage/states.php:163-181 | www/public/commentics/backend/model/manage/subscriptions.php:215-233 | www/public/commentics/backend/model/manage/users.php:246-264 | www/public/commentics/backend/model/module/extra_fields.php:120-138 | www/public/commentics/backend/model/report/access.php:127-145 | www/public/commentics/backend/model/report/version.php:115-133 | www/public/commentics/backend/model/report/viewers.php:127-145 | www/public/commentics/backend/model/tool/database_backup.php:262-280 — These 15 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 15 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 15 times.
D4 · Code Duplication· Near-duplicate member family (12 members, 45 shared lines) · ×1
Near-duplicate member family (12 members, 45 shared lines) www/public/commentics/backend/controller/manage/admins.php:8— www/public/commentics/backend/controller/manage/admins.php:8-208 | www/public/commentics/backend/controller/manage/bans.php:8-172 | www/public/commentics/backend/controller/manage/comments.php:8-323 | www/public/commentics/backend/controller/manage/countries.php:8-197 | www/public/commentics/backend/controller/manage/pages.php:8-231 | www/public/commentics/backend/controller/manage/questions.php:8-186 | www/public/commentics/backend/controller/manage/sites.php:8-182 | www/public/commentics/backend/controller/manage/states.php:8-183 | www/public/commentics/backend/controller/manage/subscriptions.php:8-225 | www/public/commentics/backend/controller/manage/users.php:8-236 | www/public/commentics/backend/controller/module/extra_fields.php:8-157 | www/public/commentics/backend/controller/tool/database_backup.php:8-167 — These 12 members are variants of one another: a block of 45 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 12 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 12 times.
D4 · Code Duplication· Near-duplicate member family (11 members, 24 shared lines) · ×1
Near-duplicate member family (11 members, 24 shared lines) www/public/commentics/backend/model/manage/admins.php:8— www/public/commentics/backend/model/manage/admins.php:8-62 | www/public/commentics/backend/model/manage/bans.php:8-52 | www/public/commentics/backend/model/manage/comments.php:8-96 | www/public/commentics/backend/model/manage/countries.php:8-62 | www/public/commentics/backend/model/manage/questions.php:8-54 | www/public/commentics/backend/model/manage/states.php:8-67 | www/public/commentics/backend/model/manage/subscriptions.php:8-76 | www/public/commentics/backend/model/report/access.php:8-54 | www/public/commentics/backend/model/report/version.php:8-50 | www/public/commentics/backend/model/report/viewers.php:8-54 | www/public/commentics/backend/model/tool/database_backup.php:80-122 — These 11 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 11 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 11 times.
D4 · Code Duplication· Near-duplicate member family (11 members, 22 shared lines) · ×1
Near-duplicate member family (11 members, 22 shared lines) www/public/commentics/backend/controller/edit/admin.php:8— www/public/commentics/backend/controller/edit/admin.php:8-104 | www/public/commentics/backend/controller/edit/ban.php:8-60 | www/public/commentics/backend/controller/edit/comment.php:8-323 | www/public/commentics/backend/controller/edit/country.php:8-88 | www/public/commentics/backend/controller/edit/page.php:8-104 | www/public/commentics/backend/controller/edit/question.php:8-80 | www/public/commentics/backend/controller/edit/site.php:8-124 | www/public/commentics/backend/controller/edit/state.php:8-74 | www/public/commentics/backend/controller/edit/user.php:8-84 | www/public/commentics/backend/controller/module/extra_fields.php:317-475 | www/public/commentics/backend/controller/settings/administrator.php:8-114 — These 11 members are variants of one another: a block of 22 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 11 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 11 times.
D4 · Code Duplication· Near-duplicate member family (10 members, 22 shared lines) · ×1
Near-duplicate member family (10 members, 22 shared lines) www/public/commentics/backend/controller/add/admin.php:8— www/public/commentics/backend/controller/add/admin.php:8-86 | www/public/commentics/backend/controller/add/ban.php:8-50 | www/public/commentics/backend/controller/add/country.php:8-78 | www/public/commentics/backend/controller/add/question.php:8-70 | www/public/commentics/backend/controller/add/site.php:8-114 | www/public/commentics/backend/controller/add/state.php:8-64 | www/public/commentics/backend/controller/edit/spam.php:8-98 | www/public/commentics/backend/controller/module/extra_fields.php:162-312 | www/public/commentics/backend/controller/module/merge_users.php:8-60 | www/public/commentics/backend/controller/tool/text_finder.php:8-62 — These 10 members are variants of one another: a block of 22 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 10 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 10 times.
D4 · Code Duplication· Near-duplicate member family (8 members, 2 shared lines) · ×1
Near-duplicate member family (8 members, 2 shared lines) www/public/commentics/backend/controller/manage/admins.php:220— www/public/commentics/backend/controller/manage/admins.php:220-232 | www/public/commentics/backend/controller/manage/comments.php:335-347 | www/public/commentics/backend/controller/manage/countries.php:209-221 | www/public/commentics/backend/controller/manage/pages.php:250-262 | www/public/commentics/backend/controller/manage/sites.php:187-199 | www/public/commentics/backend/controller/manage/subscriptions.php:237-249 | www/public/commentics/backend/controller/manage/users.php:241-253 | www/public/commentics/backend/controller/report/viewers.php:161-173 — These 8 members are variants of one another: a block of 2 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 8 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 8 times.
D4 · Code Duplication· Near-duplicate member family (7 members, 21 shared lines) · ×1
Near-duplicate member family (7 members, 21 shared lines) www/public/commentics/backend/controller/tool/upgrade.php:58— www/public/commentics/backend/controller/tool/upgrade.php:58-110 | www/public/commentics/backend/controller/tool/upgrade.php:115-152 | www/public/commentics/backend/controller/tool/upgrade.php:157-194 | www/public/commentics/backend/controller/tool/upgrade.php:199-236 | www/public/commentics/backend/controller/tool/upgrade.php:241-282 | www/public/commentics/backend/controller/tool/upgrade.php:287-324 | www/public/commentics/backend/controller/tool/upgrade.php:329-372 — These 7 members are variants of one another: a block of 21 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Near-duplicate member family (5 members, 14 shared lines) · ×1
Near-duplicate member family (5 members, 14 shared lines) www/public/commentics/system/library/notify.php:31— www/public/commentics/system/library/notify.php:31-65 | www/public/commentics/system/library/notify.php:71-107 | www/public/commentics/system/library/notify.php:113-147 | www/public/commentics/system/library/notify.php:153-187 | www/public/commentics/system/library/notify.php:193-227 — These 5 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 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 5 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 33 shared lines) · ×1
Near-duplicate member family (4 members, 33 shared lines) www/src/Controller/LocationController.php:19— www/src/Controller/LocationController.php:19-90 | www/src/Controller/SearchController.php:19-84 | www/src/Controller/UserController.php:175-262 | www/src/Controller/UserController.php:267-339 — These 4 members are variants of one another: a block of 33 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 5 shared lines) · ×1
Near-duplicate member family (4 members, 5 shared lines) www/public/commentics/system/library/notify.php:266— www/public/commentics/system/library/notify.php:266-313 | www/public/commentics/system/library/notify.php:399-445 | www/public/commentics/system/library/notify.php:451-496 | www/public/commentics/system/library/notify.php:502-547 — These 4 members are variants of one another: a block of 5 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 47 shared lines) · ×1
Near-duplicate member family (3 members, 47 shared lines) www/src/Controller/ApiController.php:405— www/src/Controller/ApiController.php:405-477 | www/src/Controller/ApiController.php:482-547 | www/src/Controller/ApiController.php:552-620 — These 3 members are variants of one another: a block of 47 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 39 shared lines) · ×1
Near-duplicate member family (3 members, 39 shared lines) www/src/Controller/ApiController.php:26— www/src/Controller/ApiController.php:26-196 | www/src/Controller/ApiController.php:201-400 | www/src/Controller/ApiController.php:669-825 — These 3 members are variants of one another: a block of 39 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
Near-duplicate member pair (51 shared lines) REDACTED:80— REDACTED:80-277 | REDACTED:282-424 — These two members are variants of one another: 51 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.
Near-duplicate member pair (35 shared lines) www/public/commentics/backend/controller/extension/modules.php:40— www/public/commentics/backend/controller/extension/modules.php:40-84 | www/public/commentics/backend/controller/extension/modules.php:89-133 — These two members are variants of one another: 35 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.
Near-duplicate member pair (30 shared lines) www/public/commentics/backend/controller/add/country.php:83— www/public/commentics/backend/controller/add/country.php:83-121 | www/public/commentics/backend/controller/edit/country.php:93-131 — These two members are variants of one another: 30 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· Members sharing a duplicated core (28 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (28 members, 50+ identical tokens) www/public/commentics/backend/model/manage/admins.php:67— www/public/commentics/backend/model/manage/admins.php:67-107 | www/public/commentics/backend/model/manage/admins.php:112-146 | www/public/commentics/backend/model/manage/bans.php:57-85 | www/public/commentics/backend/model/manage/bans.php:90-112 | www/public/commentics/backend/model/manage/comments.php:101-161 | www/public/commentics/backend/model/manage/comments.php:166-220 | www/public/commentics/backend/model/manage/countries.php:67-103 | www/public/commentics/backend/model/manage/countries.php:108-138 | www/public/commentics/backend/model/manage/pages.php:83-123 | www/public/commentics/backend/model/manage/pages.php:128-162 | www/public/commentics/backend/model/manage/questions.php:59-91 | www/public/commentics/backend/model/manage/questions.php:96-122 | www/public/commentics/backend/model/manage/sites.php:73-101 | www/public/commentics/backend/model/manage/sites.php:106-128 | www/public/commentics/backend/model/manage/states.php:72-104 | www/public/commentics/backend/model/manage/states.php:109-135 | www/public/commentics/backend/model/manage/subscriptions.php:81-129 | www/public/commentics/backend/model/manage/subscriptions.php:134-176 | www/public/commentics/backend/model/manage/users.php:81-117 | www/public/commentics/backend/model/manage/users.php:122-152 | www/public/commentics/backend/model/report/access.php:59-91 | www/public/commentics/backend/model/report/access.php:96-122 | www/public/commentics/backend/model/report/version.php:55-83 | www/public/commentics/backend/model/report/version.php:88-110 | www/public/commentics/backend/model/report/viewers.php:59-91 | www/public/commentics/backend/model/report/viewers.php:96-122 | www/public/commentics/backend/model/tool/database_backup.php:142-170 | www/public/commentics/backend/model/tool/database_backup.php:175-197 — These 28 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 28 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 28 times.
D4 · Code Duplication· Members sharing a duplicated core (23 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (23 members, 50+ identical tokens) www/public/commentics/backend/controller/add/admin.php:91— www/public/commentics/backend/controller/add/admin.php:91-143 | www/public/commentics/backend/controller/add/site.php:119-171 | www/public/commentics/backend/controller/data/list.php:189-211 | www/public/commentics/backend/controller/edit/admin.php:109-157 | www/public/commentics/backend/controller/edit/site.php:129-181 | www/public/commentics/backend/controller/main/dashboard.php:232-254 | www/public/commentics/backend/controller/module/akismet.php:77-105 | www/public/commentics/backend/controller/module/extra_fields.php:539-591 | www/public/commentics/backend/controller/module/rich_snippets.php:85-115 | www/public/commentics/backend/controller/settings/email_setup.php:181-255 | www/public/commentics/backend/controller/settings/flooding.php:93-123 | www/public/commentics/backend/controller/settings/layout_comments.php:1185-1393 | www/public/commentics/backend/controller/settings/maintenance.php:45-67 | www/public/commentics/backend/controller/settings/processor.php:843-1027 | www/public/commentics/backend/controller/settings/security.php:91-123 | www/public/commentics/backend/controller/settings/system.php:177-253 | www/public/commentics/backend/controller/settings/viewers.php:56-78 | www/public/commentics/backend/controller/task/delete_bans.php:45-67 | www/public/commentics/backend/controller/task/delete_comments.php:45-67 | www/public/commentics/backend/controller/task/delete_reporters.php:45-67 | www/public/commentics/backend/controller/task/delete_subscriptions.php:45-67 | www/public/commentics/backend/controller/task/delete_voters.php:45-67 | www/public/commentics/backend/controller/tool/text_finder.php:67-95 — These 23 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 23 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 23 times.
D4 · Code Duplication· Members sharing a duplicated core (16 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (16 members, 50+ identical tokens) www/public/commentics/backend/controller/main/checklist.php:27— www/public/commentics/backend/controller/main/checklist.php:27-45 | www/public/commentics/backend/controller/manage/admins.php:296-312 | www/public/commentics/backend/controller/manage/bans.php:257-273 | www/public/commentics/backend/controller/manage/comments.php:438-454 | www/public/commentics/backend/controller/manage/countries.php:284-300 | www/public/commentics/backend/controller/manage/pages.php:337-353 | www/public/commentics/backend/controller/manage/questions.php:283-299 | www/public/commentics/backend/controller/manage/sites.php:260-276 | www/public/commentics/backend/controller/manage/states.php:262-278 | www/public/commentics/backend/controller/manage/subscriptions.php:337-353 | www/public/commentics/backend/controller/manage/users.php:316-332 | www/public/commentics/backend/controller/module/chart.php:53-71 | www/public/commentics/backend/controller/module/extra_fields.php:518-534 | www/public/commentics/backend/controller/settings/approval.php:49-67 | www/public/commentics/backend/controller/tool/clear_cache.php:49-67 | www/public/commentics/backend/controller/tool/optimize_tables.php:27-45 — These 16 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 16 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 16 times.
D4 · Code Duplication· Members sharing a duplicated core (15 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (15 members, 50+ identical tokens) www/public/commentics/backend/model/manage/admins.php:112— www/public/commentics/backend/model/manage/admins.php:112-146 | www/public/commentics/backend/model/manage/bans.php:90-112 | www/public/commentics/backend/model/manage/comments.php:166-220 | www/public/commentics/backend/model/manage/countries.php:108-138 | www/public/commentics/backend/model/manage/pages.php:128-162 | www/public/commentics/backend/model/manage/questions.php:96-122 | www/public/commentics/backend/model/manage/sites.php:106-128 | www/public/commentics/backend/model/manage/states.php:109-135 | www/public/commentics/backend/model/manage/subscriptions.php:134-176 | www/public/commentics/backend/model/manage/users.php:122-152 | www/public/commentics/backend/model/module/extra_fields.php:60-70 | www/public/commentics/backend/model/report/access.php:96-122 | www/public/commentics/backend/model/report/version.php:88-110 | www/public/commentics/backend/model/report/viewers.php:96-122 | www/public/commentics/backend/model/tool/database_backup.php:175-197 — These 15 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 15 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 15 times.
D4 · Code Duplication· Members sharing a duplicated core (14 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (14 members, 50+ identical tokens) www/public/commentics/backend/controller/manage/admins.php:237— www/public/commentics/backend/controller/manage/admins.php:237-291 | www/public/commentics/backend/controller/manage/bans.php:201-252 | www/public/commentics/backend/controller/manage/comments.php:352-433 | www/public/commentics/backend/controller/manage/countries.php:226-279 | www/public/commentics/backend/controller/manage/pages.php:267-332 | www/public/commentics/backend/controller/manage/questions.php:215-278 | www/public/commentics/backend/controller/manage/sites.php:204-255 | www/public/commentics/backend/controller/manage/states.php:205-257 | www/public/commentics/backend/controller/manage/subscriptions.php:254-332 | www/public/commentics/backend/controller/manage/users.php:258-311 | www/public/commentics/backend/controller/report/access.php:166-229 | www/public/commentics/backend/controller/report/version.php:156-196 | www/public/commentics/backend/controller/report/viewers.php:178-252 | www/public/commentics/backend/controller/tool/database_backup.php:189-240 — These 14 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 14 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 14 times.
D4 · Code Duplication· Members sharing a duplicated core (12 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (12 members, 50+ identical tokens) www/public/commentics/backend/controller/add/ban.php:55— www/public/commentics/backend/controller/add/ban.php:55-85 | www/public/commentics/backend/controller/add/question.php:82-112 | www/public/commentics/backend/controller/add/site.php:119-171 | www/public/commentics/backend/controller/add/state.php:69-97 | www/public/commentics/backend/controller/data/list.php:189-211 | www/public/commentics/backend/controller/edit/ban.php:65-95 | www/public/commentics/backend/controller/edit/question.php:92-122 | www/public/commentics/backend/controller/edit/site.php:129-181 | www/public/commentics/backend/controller/edit/state.php:79-107 | www/public/commentics/backend/controller/main/dashboard.php:232-254 | www/public/commentics/backend/controller/module/extra_fields.php:539-591 | www/public/commentics/backend/controller/settings/maintenance.php:45-67 — These 12 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 12 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 12 times.
D4 · Code Duplication· Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (11 members, 50+ identical tokens) www/src/Controller/ApiController.php:26— www/src/Controller/ApiController.php:26-196 | REDACTED:30-160 | REDACTED:190-208 | REDACTED:212-226 | www/src/Service/SearchFunctions.php:240-252 | www/src/Service/TagsFunctions.php:46-58 | www/src/Service/UserFunctions.php:16-29 | www/src/Service/UserFunctions.php:52-66 | www/src/Service/UserFunctions.php:70-92 | www/src/Service/UserFunctions.php:96-116 | www/src/Service/UserFunctions.php:459-472 — These 11 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 11 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 11 times.
D4 · Code Duplication· Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (10 members, 50+ identical tokens) REDACTED:33— REDACTED:33-54 | REDACTED:59-113 | REDACTED:1460-1483 | REDACTED:1738-1797 | REDACTED:23-139 | REDACTED:144-169 | REDACTED:174-199 | REDACTED:204-229 | REDACTED:235-287 | REDACTED:292-325 — These 10 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 10 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 10 times.
D4 · Code Duplication· Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (9 members, 50+ identical tokens) www/public/commentics/backend/model/module/css_editor.php:67— www/public/commentics/backend/model/module/css_editor.php:67-92 | www/public/commentics/backend/model/module/css_editor.php:97-128 | www/public/commentics/install/model/main/install_2.php:194-401 | www/public/commentics/install/model/main/install_2.php:408-435 | www/public/commentics/install/model/main/install_2.php:457-481 | www/public/commentics/install/model/main/install_2.php:488-692 | www/public/commentics/install/model/main/install_2.php:743-772 | www/public/commentics/install/model/main/install_2.php:806-1220 | www/public/commentics/install/model/main/upgrade_2.php:8-391 — These 9 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 9 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 9 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) www/public/commentics/frontend/controller/main/user.php:190— www/public/commentics/frontend/controller/main/user.php:190-243 | www/public/commentics/frontend/controller/main/user.php:248-291 | www/public/commentics/frontend/controller/main/user.php:296-329 | www/public/commentics/frontend/controller/main/user.php:334-373 | www/public/commentics/frontend/controller/main/user.php:378-411 — These 5 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 5 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 5 times.
D4 · Code Duplication· Edited copy of a member (265 corresponding lines) · ×1
Edited copy of a member (265 corresponding lines) www/public/commentics/backend/model/settings/layout_comments.php:10— www/public/commentics/backend/model/settings/layout_comments.php:10-274 | www/public/commentics/backend/model/settings/layout_form.php:10-282 — These two members are one piece of code written twice and then edited apart: 265 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) www/public/commentics/backend/model/settings/layout_comments.php:339— www/public/commentics/backend/model/settings/layout_comments.php:339-382 | www/public/commentics/backend/model/settings/layout_form.php:385-428 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 61+ corresponding lines) · ×1
Edited copies of one member (3 members, 61+ corresponding lines) www/public/commentics/backend/model/manage/pages.php:8— www/public/commentics/backend/model/manage/pages.php:8-78 | www/public/commentics/backend/model/manage/sites.php:8-68 | www/public/commentics/backend/model/manage/users.php:8-76 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 61 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (65 corresponding lines) · ×1
Edited copy of a member (65 corresponding lines) www/src/Controller/ImageController.php:56— www/src/Controller/ImageController.php:56-128 | www/src/Controller/ImageController.php:161-225 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×1
Edited copy of a member (17 corresponding lines) www/public/commentics/backend/model/login/reset.php:8— www/public/commentics/backend/model/login/reset.php:8-24 | www/public/commentics/backend/model/settings/email_setup.php:59-81 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 34+ corresponding lines) · ×1
Edited copies of one member (3 members, 34+ corresponding lines) www/src/Service/LocationFunctions.php:77— www/src/Service/LocationFunctions.php:77-115 | www/src/Service/SearchFunctions.php:18-51 | www/src/Service/SearchFunctions.php:113-156 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 34 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 32+ corresponding lines) · ×1
Edited copies of one member (4 members, 32+ corresponding lines) www/src/Service/SearchFunctions.php:160— www/src/Service/SearchFunctions.php:160-201 | www/src/Service/SearchFunctions.php:205-236 | www/src/Service/UserFunctions.php:298-333 | www/src/Service/UserFunctions.php:337-371 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 32 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (46 corresponding lines) · ×1
Edited copy of a member (46 corresponding lines) REDACTED:16— REDACTED:16-61 | REDACTED:232-282 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) www/src/Service/UploadFunctions.php:15— www/src/Service/UploadFunctions.php:15-41 | www/src/Service/UploadFunctions.php:45-72 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) www/src/Controller/TestingController.php:124— www/src/Controller/TestingController.php:124-155 | www/src/Service/SearchFunctions.php:78-109 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) www/src/Service/UploadFunctions.php:157— www/src/Service/UploadFunctions.php:157-179 | www/src/Service/UploadFunctions.php:186-213 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) www/public/commentics/backend/controller/edit/comment.php:328— www/public/commentics/backend/controller/edit/comment.php:328-349 | www/public/commentics/backend/controller/edit/comment.php:354-378 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 5+ corresponding lines) · ×1
Edited copies of one member (3 members, 5+ corresponding lines) www/public/commentics/backend/model/add/country.php:8— www/public/commentics/backend/model/add/country.php:8-12 | www/public/commentics/backend/model/edit/country.php:23-29 | www/public/commentics/backend/model/settings/email_editor.php:27-31 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) REDACTED:1563— REDACTED:1563-1585 | REDACTED:1591-1611 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×1
Edited copies of one member (3 members, 13+ corresponding lines) www/public/commentics/system/library/comment.php:276— www/public/commentics/system/library/comment.php:276-288 | www/public/commentics/system/library/comment.php:332-344 | www/public/commentics/system/library/task.php:85-99 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×1
Edited copy of a member (12 corresponding lines) www/src/Service/TagsFunctions.php:12— www/src/Service/TagsFunctions.php:12-23 | www/src/Service/TagsFunctions.php:27-42 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 11+ corresponding lines) · ×1
Edited copies of one member (6 members, 11+ corresponding lines) www/public/commentics/backend/model/edit/comment.php:142— www/public/commentics/backend/model/edit/comment.php:142-152 | www/public/commentics/backend/model/edit/country.php:8-18 | www/public/commentics/backend/model/extension/modules.php:8-18 | www/public/commentics/system/library/comment.php:137-147 | www/public/commentics/system/library/page.php:204-214 | www/public/commentics/system/library/user.php:192-202 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×1
Edited copy of a member (3 corresponding lines) www/public/commentics/system/library/comment.php:15— www/public/commentics/system/library/comment.php:15-18 | www/public/commentics/system/library/geo.php:12-14 — These two members are one piece of code written twice and then edited apart: 3 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.
Duplicated block (65–66 lines × 2) www/src/Controller/ApiController.php:275— www/src/Controller/ApiController.php:275-340 | www/src/Controller/ApiController.php:728-792 — 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 `www/src/Controller/ApiController.php:275` 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 (66 lines × 2) www/src/Controller/EditController.php:142— www/src/Controller/EditController.php:142-207 | www/src/Controller/UploadController.php:64-129 — 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, `www/src/Controller/EditController.php:141` calls `UserFunctions` and `www/src/Controller/UploadController.php:61` 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 (47–48 lines × 3) www/src/Controller/ApiController.php:431— www/src/Controller/ApiController.php:431-477 | www/src/Controller/ApiController.php:501-547 | www/src/Controller/ApiController.php:573-620 — 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 `www/src/Controller/ApiController.php:431` 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 (28–36 lines × 13) www/public/commentics/backend/controller/manage/admins.php:248— www/public/commentics/backend/controller/manage/admins.php:248-278 | www/public/commentics/backend/controller/manage/bans.php:212-239 | www/public/commentics/backend/controller/manage/comments.php:383-418 | www/public/commentics/backend/controller/manage/countries.php:237-266 | www/public/commentics/backend/controller/manage/pages.php:288-318 | www/public/commentics/backend/controller/manage/questions.php:236-264 | www/public/commentics/backend/controller/manage/sites.php:215-242 | www/public/commentics/backend/controller/manage/states.php:216-244 | www/public/commentics/backend/controller/manage/subscriptions.php:285-317 | www/public/commentics/backend/controller/manage/users.php:269-298 | www/public/commentics/backend/controller/report/access.php:187-215 | www/public/commentics/backend/controller/report/viewers.php:209-237 | www/public/commentics/backend/controller/tool/database_backup.php:200-227 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 `www/public/commentics/backend/controller/manage/admins.php:248` 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 (35 lines × 2) www/src/Controller/ImageController.php:75— www/src/Controller/ImageController.php:75-109 | www/src/Controller/ImageController.php:169-203 — 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 (23–33 lines × 3) www/public/commentics/backend/model/edit/subscription.php:17— www/public/commentics/backend/model/edit/subscription.php:17-39 | www/public/commentics/system/library/page.php:175-199 | www/public/commentics/system/library/user.php:155-187 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `www/public/commentics/backend/model/edit/subscription.php:17` 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 (29–30 lines × 2) www/src/Controller/AddController.php:43— www/src/Controller/AddController.php:43-71 | www/src/Controller/EditController.php:37-66 — 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, `www/src/Controller/AddController.php:73` calls `TagsFunctions`, `getTagsNames` and `www/src/Controller/EditController.php:69` 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 (18–29 lines × 2) REDACTED:27— REDACTED:27-44 | REDACTED:241-269 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:45` calls `fetchAssociative` and `REDACTED:271` 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 (20–27 lines × 3) www/public/commentics/backend/controller/manage/pages.php:135— www/public/commentics/backend/controller/manage/pages.php:135-161 | www/public/commentics/backend/controller/manage/users.php:150-176 | www/public/commentics/backend/controller/module/extra_fields.php:90-109 — before extracting anything, compare `www/public/commentics/backend/controller/manage/pages.php` and `www/public/commentics/backend/controller/manage/users.php` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 259 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 (26–27 lines × 2) www/src/Service/SearchFunctions.php:131— www/src/Service/SearchFunctions.php:131-156 | www/src/Service/UserFunctions.php:207-233 — before extracting anything, compare `www/src/Service/SearchFunctions.php` and `www/src/Service/UserFunctions.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 100 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 (26 lines × 2) REDACTED:1829— REDACTED:1829-1854 | www/public/commentics/frontend/model/main/user.php:109-134 — 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 `REDACTED:1829` 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–24 lines × 3) www/public/commentics/frontend/controller/main/user.php:190— www/public/commentics/frontend/controller/main/user.php:190-212 | www/public/commentics/frontend/controller/main/user.php:248-270 | www/public/commentics/frontend/controller/main/user.php:378-401 — 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 `www/public/commentics/frontend/controller/main/user.php:190` 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, `www/public/commentics/frontend/controller/main/user.php:271` calls `get` and `www/public/commentics/frontend/controller/main/user.php:401` 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 (37 lines × 2) www/public/commentics/backend/model/extension/installer.php:100— www/public/commentics/backend/model/extension/installer.php:100-136 | REDACTED:206-242 — 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 `www/public/commentics/backend/model/extension/installer.php:100` 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, `www/public/commentics/backend/model/extension/installer.php:137` calls `remove_directory` and `REDACTED:243` 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 (14–24 lines × 2) www/src/Service/SearchFunctions.php:267— www/src/Service/SearchFunctions.php:267-290 | www/src/Service/UploadFunctions.php:119-132 — before extracting anything, compare `www/src/Service/SearchFunctions.php` and `www/src/Service/UploadFunctions.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 112 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–23 lines × 2) www/src/Service/SearchFunctions.php:271— www/src/Service/SearchFunctions.php:271-293 | www/src/Service/UploadFunctions.php:27-38 — before extracting anything, compare `www/src/Service/SearchFunctions.php` and `www/src/Service/UploadFunctions.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 112 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. 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 (12–22 lines × 4) www/src/Service/LocationFunctions.php:51— www/src/Service/LocationFunctions.php:51-64 | www/src/Service/SearchFunctions.php:268-289 | www/src/Service/UploadFunctions.php:120-131 | www/src/Service/UserFunctions.php:477-489 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
Duplicated block (21 lines × 13) www/public/commentics/backend/controller/manage/admins.php:243— www/public/commentics/backend/controller/manage/admins.php:243-263 | www/public/commentics/backend/controller/manage/bans.php:207-227 | www/public/commentics/backend/controller/manage/comments.php:358-378 | www/public/commentics/backend/controller/manage/countries.php:232-252 | www/public/commentics/backend/controller/manage/pages.php:273-293 | www/public/commentics/backend/controller/manage/questions.php:221-241 | www/public/commentics/backend/controller/manage/sites.php:210-230 | www/public/commentics/backend/controller/manage/states.php:211-231 | www/public/commentics/backend/controller/manage/subscriptions.php:260-280 | www/public/commentics/backend/controller/manage/users.php:264-284 | www/public/commentics/backend/controller/report/access.php:172-192 | www/public/commentics/backend/controller/report/viewers.php:184-204 | www/public/commentics/backend/controller/tool/database_backup.php:195-215 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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–21 lines × 4) REDACTED:214— REDACTED:214-226 | www/src/Service/UserFunctions.php:54-66 | www/src/Service/UserFunctions.php:72-92 | www/src/Service/UserFunctions.php:98-116 — there are 4 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 4 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 (21 lines × 2) www/public/commentics/backend/model/common/pagination.php:25— www/public/commentics/backend/model/common/pagination.php:25-45 | www/public/commentics/frontend/controller/part/pagination.php:18-38 — 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 (20 lines × 4) www/src/Controller/LocationController.php:27— www/src/Controller/LocationController.php:27-46 | www/src/Controller/SearchController.php:24-43 | www/src/Controller/UserController.php:182-201 | www/src/Controller/UserController.php:269-288 — there are 4 copies across 3 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 4 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `www/src/Controller/UserController.php:266` calls `show_service_user` and `www/src/Controller/UserController.php:178` 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 (17–20 lines × 3) www/src/Controller/TestingController.php:124— www/src/Controller/TestingController.php:124-143 | www/src/Service/UserFunctions.php:305-323 | www/src/Service/UserFunctions.php:344-360 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `www/src/Controller/TestingController.php:124` 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, `www/src/Service/UserFunctions.php:360` calls `array`, `fetchAssociative` and `www/src/Controller/TestingController.php:143` 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 (20 lines × 2) www/src/Controller/ApiController.php:201— www/src/Controller/ApiController.php:201-220 | www/src/Controller/ApiController.php:669-688 — 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 (17–19 lines × 4) www/src/Controller/ApiController.php:73— www/src/Controller/ApiController.php:73-89 | www/src/Controller/ApiController.php:438-456 | www/src/Controller/ApiController.php:508-526 | www/src/Controller/ApiController.php:581-599 — all 4 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 `www/src/Controller/ApiController.php:438` 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 (19 lines × 3) www/public/commentics/backend/model/edit/comment.php:76— www/public/commentics/backend/model/edit/comment.php:76-94 | REDACTED:1839-1857 | www/public/commentics/frontend/model/main/user.php:119-137 — 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.
Duplicated block (19 lines × 2) www/public/commentics/backend/model/manage/pages.php:8— www/public/commentics/backend/model/manage/pages.php:8-26 | www/public/commentics/backend/model/manage/users.php:8-26 — before extracting anything, compare `www/public/commentics/backend/model/manage/pages.php` and `www/public/commentics/backend/model/manage/users.php` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 147 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 `www/public/commentics/backend/model/manage/pages.php:8` 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 (13–18 lines × 7) www/public/commentics/backend/controller/tool/upgrade.php:93— www/public/commentics/backend/controller/tool/upgrade.php:93-110 | www/public/commentics/backend/controller/tool/upgrade.php:140-152 | www/public/commentics/backend/controller/tool/upgrade.php:182-194 | www/public/commentics/backend/controller/tool/upgrade.php:224-236 | www/public/commentics/backend/controller/tool/upgrade.php:270-282 | www/public/commentics/backend/controller/tool/upgrade.php:312-324 | www/public/commentics/backend/controller/tool/upgrade.php:360-372 — all 7 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 `www/public/commentics/backend/controller/tool/upgrade.php:93` 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–18 lines × 7) www/src/Controller/ApiController.php:46— www/src/Controller/ApiController.php:46-59 | REDACTED:33-43 | REDACTED:191-203 | REDACTED:213-222 | www/src/Service/UserFunctions.php:53-62 | www/src/Service/UserFunctions.php:71-88 | www/src/Service/UserFunctions.php:97-112 — there are 7 copies across 3 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 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `www/src/Controller/ApiController.php:46` 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 (18 lines × 3) www/public/commentics/backend/model/manage/pages.php:61— www/public/commentics/backend/model/manage/pages.php:61-78 | www/public/commentics/backend/model/manage/sites.php:51-68 | www/public/commentics/backend/model/manage/users.php:59-76 — before extracting anything, compare `www/public/commentics/backend/model/manage/pages.php` and `www/public/commentics/backend/model/manage/sites.php` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 128 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 `www/public/commentics/backend/model/manage/pages.php:61` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 15) www/public/commentics/backend/controller/manage/admins.php:96— www/public/commentics/backend/controller/manage/admins.php:96-112 | www/public/commentics/backend/controller/manage/bans.php:78-94 | www/public/commentics/backend/controller/manage/comments.php:170-186 | www/public/commentics/backend/controller/manage/countries.php:90-106 | www/public/commentics/backend/controller/manage/pages.php:96-112 | www/public/commentics/backend/controller/manage/questions.php:86-102 | www/public/commentics/backend/controller/manage/sites.php:78-94 | www/public/commentics/backend/controller/manage/states.php:84-100 | www/public/commentics/backend/controller/manage/subscriptions.php:108-124 | www/public/commentics/backend/controller/manage/users.php:112-128 | www/public/commentics/backend/controller/module/extra_fields.php:58-74 | www/public/commentics/backend/controller/report/access.php:56-72 | www/public/commentics/backend/controller/report/version.php:52-68 | www/public/commentics/backend/controller/report/viewers.php:60-76 | www/public/commentics/backend/controller/tool/database_backup.php:78-94 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 `www/public/commentics/backend/controller/manage/admins.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `www/public/commentics/backend/controller/tool/database_backup.php:98` calls `deleteOrphans` and `www/public/commentics/backend/controller/manage/admins.php:116` 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 (17 lines × 5) www/public/commentics/backend/controller/main/checklist.php:29— www/public/commentics/backend/controller/main/checklist.php:29-45 | www/public/commentics/backend/controller/module/chart.php:55-71 | www/public/commentics/backend/controller/settings/approval.php:51-67 | www/public/commentics/backend/controller/tool/clear_cache.php:51-67 | www/public/commentics/backend/controller/tool/optimize_tables.php:29-45 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 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 (16 lines × 11) www/public/commentics/backend/model/manage/admins.php:44— www/public/commentics/backend/model/manage/admins.php:44-59 | www/public/commentics/backend/model/manage/bans.php:34-49 | www/public/commentics/backend/model/manage/comments.php:78-93 | www/public/commentics/backend/model/manage/countries.php:44-59 | www/public/commentics/backend/model/manage/questions.php:36-51 | www/public/commentics/backend/model/manage/subscriptions.php:58-73 | www/public/commentics/backend/model/module/extra_fields.php:16-31 | www/public/commentics/backend/model/report/access.php:36-51 | www/public/commentics/backend/model/report/version.php:32-47 | www/public/commentics/backend/model/report/viewers.php:36-51 | www/public/commentics/backend/model/tool/database_backup.php:104-119 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 `www/public/commentics/backend/model/manage/admins.php:44` 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. 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 (1–16 lines × 4) www/public/commentics/backend/model/login/login.php:16— www/public/commentics/backend/model/login/login.php:16-17 | www/public/commentics/backend/model/login/login.php:57-72 | www/public/commentics/frontend/model/main/user.php:293-308 | www/public/commentics/system/library/email.php:31-31 — there are 4 copies across 3 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `www/public/commentics/backend/model/login/login.php:16` 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. 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. 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 (15 lines × 16) www/public/commentics/backend/controller/main/checklist.php:27— www/public/commentics/backend/controller/main/checklist.php:27-41 | www/public/commentics/backend/controller/manage/admins.php:296-310 | www/public/commentics/backend/controller/manage/bans.php:257-271 | www/public/commentics/backend/controller/manage/comments.php:438-452 | www/public/commentics/backend/controller/manage/countries.php:284-298 | www/public/commentics/backend/controller/manage/pages.php:337-351 | www/public/commentics/backend/controller/manage/questions.php:283-297 | www/public/commentics/backend/controller/manage/sites.php:260-274 | www/public/commentics/backend/controller/manage/states.php:262-276 | www/public/commentics/backend/controller/manage/subscriptions.php:337-351 | www/public/commentics/backend/controller/manage/users.php:316-330 | www/public/commentics/backend/controller/module/chart.php:53-67 | www/public/commentics/backend/controller/module/extra_fields.php:518-532 | www/public/commentics/backend/controller/settings/approval.php:49-63 | www/public/commentics/backend/controller/tool/clear_cache.php:49-63 | www/public/commentics/backend/controller/tool/optimize_tables.php:27-41 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 `www/public/commentics/backend/controller/main/checklist.php:27` 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10–15 lines × 13) www/public/commentics/backend/controller/add/admin.php:25— www/public/commentics/backend/controller/add/admin.php:25-34 | www/public/commentics/backend/controller/add/ban.php:23-32 | www/public/commentics/backend/controller/add/country.php:31-40 | www/public/commentics/backend/controller/add/question.php:25-34 | www/public/commentics/backend/controller/add/site.php:23-32 | www/public/commentics/backend/controller/add/site.php:57-66 | www/public/commentics/backend/controller/add/state.php:23-32 | www/public/commentics/backend/controller/edit/spam.php:29-38 | www/public/commentics/backend/controller/module/extra_fields.php:181-190 | www/public/commentics/backend/controller/module/extra_fields.php:201-210 | www/public/commentics/backend/controller/module/merge_users.php:19-28 | www/public/commentics/backend/controller/tool/text_finder.php:23-32 | www/public/commentics/install/controller/main/database.php:26-40 — before extracting anything, compare `www/public/commentics/backend/controller/add/admin.php` and `www/public/commentics/backend/controller/add/ban.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 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 `www/public/commentics/backend/controller/add/admin.php:25` 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 before the matched lines, `www/public/commentics/backend/controller/edit/spam.php:26` calls `getComment` and `www/public/commentics/backend/controller/add/admin.php:22` 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 (15 lines × 3) www/public/commentics/backend/controller/extension/installer.php:31— www/public/commentics/backend/controller/extension/installer.php:31-45 | www/public/commentics/backend/controller/module/akismet.php:77-91 | www/public/commentics/backend/controller/tool/upgrade.php:418-432 — 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 (14 lines × 15) www/public/commentics/backend/controller/manage/admins.php:169— www/public/commentics/backend/controller/manage/admins.php:169-182 | www/public/commentics/backend/controller/manage/bans.php:139-152 | www/public/commentics/backend/controller/manage/comments.php:264-277 | www/public/commentics/backend/controller/manage/countries.php:160-173 | www/public/commentics/backend/controller/manage/pages.php:188-201 | www/public/commentics/backend/controller/manage/questions.php:151-164 | www/public/commentics/backend/controller/manage/sites.php:151-164 | www/public/commentics/backend/controller/manage/states.php:150-163 | www/public/commentics/backend/controller/manage/subscriptions.php:186-199 | www/public/commentics/backend/controller/manage/users.php:199-212 | www/public/commentics/backend/controller/module/extra_fields.php:126-139 | www/public/commentics/backend/controller/report/access.php:119-132 | www/public/commentics/backend/controller/report/version.php:111-124 | www/public/commentics/backend/controller/report/viewers.php:131-144 | www/public/commentics/backend/controller/tool/database_backup.php:142-155 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 `www/public/commentics/backend/controller/manage/admins.php:169` 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 before the matched lines, `www/public/commentics/backend/controller/manage/pages.php:186` calls `isset` and `www/public/commentics/backend/controller/manage/admins.php:167` 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 (14 lines × 6) www/src/Controller/ApiController.php:78— www/src/Controller/ApiController.php:78-92 | www/src/Controller/ApiController.php:313-326 | www/src/Controller/ApiController.php:442-470 | www/src/Controller/ApiController.php:512-540 | www/src/Controller/ApiController.php:585-613 | www/src/Controller/ApiController.php:765-778 — all 6 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. 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–13 lines × 14) www/public/commentics/backend/controller/add/admin.php:24— www/public/commentics/backend/controller/add/admin.php:24-30 | www/public/commentics/backend/controller/add/ban.php:22-28 | www/public/commentics/backend/controller/add/country.php:30-36 | www/public/commentics/backend/controller/add/question.php:24-30 | www/public/commentics/backend/controller/add/site.php:22-28 | www/public/commentics/backend/controller/add/site.php:56-62 | www/public/commentics/backend/controller/add/state.php:22-28 | www/public/commentics/backend/controller/edit/spam.php:28-40 | www/public/commentics/backend/controller/module/extra_fields.php:180-186 | www/public/commentics/backend/controller/module/extra_fields.php:200-206 | www/public/commentics/backend/controller/module/extra_fields.php:238-244 | www/public/commentics/backend/controller/module/merge_users.php:18-24 | www/public/commentics/backend/controller/tool/text_finder.php:22-28 | www/public/commentics/install/controller/main/database.php:30-36 — before extracting anything, compare `www/public/commentics/backend/controller/add/admin.php` and `www/public/commentics/backend/controller/add/ban.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 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 `www/public/commentics/backend/controller/add/admin.php:24` 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 before the matched lines, `www/public/commentics/backend/controller/edit/spam.php:26` calls `getComment` and `www/public/commentics/backend/controller/add/admin.php:22` 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 (13 lines × 14) www/public/commentics/backend/controller/manage/admins.php:46— www/public/commentics/backend/controller/manage/admins.php:46-58 | www/public/commentics/backend/controller/manage/bans.php:46-58 | www/public/commentics/backend/controller/manage/comments.php:90-102 | www/public/commentics/backend/controller/manage/countries.php:46-58 | www/public/commentics/backend/controller/manage/pages.php:46-58 | www/public/commentics/backend/controller/manage/questions.php:48-60 | www/public/commentics/backend/controller/manage/sites.php:46-58 | www/public/commentics/backend/controller/manage/states.php:46-58 | www/public/commentics/backend/controller/manage/subscriptions.php:46-58 | www/public/commentics/backend/controller/manage/users.php:68-80 | www/public/commentics/backend/controller/report/access.php:18-30 | www/public/commentics/backend/controller/report/version.php:20-32 | www/public/commentics/backend/controller/report/viewers.php:22-34 | www/public/commentics/backend/controller/tool/database_backup.php:46-58 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 `www/public/commentics/backend/controller/manage/admins.php:46` 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, `www/public/commentics/backend/controller/report/version.php:18` calls `sprintf`, `getCurrent` and `www/public/commentics/backend/controller/report/access.php:16` 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 (13 lines × 12) www/public/commentics/backend/model/manage/admins.php:46— www/public/commentics/backend/model/manage/admins.php:46-58 | www/public/commentics/backend/model/manage/bans.php:36-48 | www/public/commentics/backend/model/manage/comments.php:80-92 | www/public/commentics/backend/model/manage/countries.php:46-58 | www/public/commentics/backend/model/manage/questions.php:38-50 | www/public/commentics/backend/model/manage/subscriptions.php:60-72 | www/public/commentics/backend/model/module/extra_fields.php:18-30 | www/public/commentics/backend/model/report/access.php:38-50 | www/public/commentics/backend/model/report/version.php:34-46 | www/public/commentics/backend/model/report/viewers.php:38-50 | www/public/commentics/backend/model/tool/database_backup.php:106-118 | www/public/commentics/frontend/model/main/comments.php:64-76 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 `www/public/commentics/backend/model/manage/admins.php:46` 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, `www/public/commentics/backend/model/manage/admins.php:44` calls `backticks` and `www/public/commentics/frontend/model/main/comments.php:62` 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 (12–13 lines × 4) www/src/Service/LocationFunctions.php:79— www/src/Service/LocationFunctions.php:79-91 | www/src/Service/SearchFunctions.php:18-29 | www/src/Service/SearchFunctions.php:78-89 | www/src/Service/UserFunctions.php:199-210 — there are 4 copies across 3 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 4 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `www/src/Service/SearchFunctions.php:30` calls `setFirstResult`, `setMaxResults` and `www/src/Service/SearchFunctions.php:90` 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 (13 lines × 3) www/public/commentics/backend/model/manage/bans.php:153— www/public/commentics/backend/model/manage/bans.php:153-165 | www/public/commentics/backend/model/report/version.php:117-129 | www/public/commentics/backend/model/tool/database_backup.php:264-276 — before extracting anything, compare `www/public/commentics/backend/model/manage/bans.php` and `www/public/commentics/backend/model/report/version.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 183 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 (12 lines × 17) www/public/commentics/backend/controller/data/list.php:200— www/public/commentics/backend/controller/data/list.php:200-211 | www/public/commentics/backend/controller/main/dashboard.php:243-254 | www/public/commentics/backend/controller/module/akismet.php:94-105 | www/public/commentics/backend/controller/module/rich_snippets.php:104-115 | www/public/commentics/backend/controller/settings/email_setup.php:244-255 | www/public/commentics/backend/controller/settings/flooding.php:112-123 | www/public/commentics/backend/controller/settings/layout_comments.php:1382-1393 | www/public/commentics/backend/controller/settings/maintenance.php:56-67 | www/public/commentics/backend/controller/settings/processor.php:1016-1027 | www/public/commentics/backend/controller/settings/security.php:112-123 | www/public/commentics/backend/controller/settings/system.php:242-253 | www/public/commentics/backend/controller/settings/viewers.php:67-78 | www/public/commentics/backend/controller/task/delete_bans.php:56-67 | www/public/commentics/backend/controller/task/delete_comments.php:56-67 | www/public/commentics/backend/controller/task/delete_reporters.php:56-67 | www/public/commentics/backend/controller/task/delete_subscriptions.php:56-67 | www/public/commentics/backend/controller/task/delete_voters.php:56-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 17 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 17 times. Read the line range as the matched WINDOW rather than a finished unit: at `www/public/commentics/backend/controller/data/list.php:200` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `www/public/commentics/backend/controller/module/rich_snippets.php:100` calls `sprintf`, `isset` and `www/public/commentics/backend/controller/settings/email_setup.php:243` 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 (12 lines × 10) www/public/commentics/system/library/email.php:235— www/public/commentics/system/library/email.php:235-246 | www/public/commentics/system/library/email.php:256-267 | www/public/commentics/system/library/email.php:273-284 | www/public/commentics/system/library/email.php:290-301 | www/public/commentics/system/library/email.php:307-318 | www/public/commentics/system/library/email.php:324-335 | www/public/commentics/system/library/email.php:342-353 | www/public/commentics/system/library/email.php:378-389 | www/public/commentics/system/library/email.php:413-424 | www/public/commentics/system/library/email.php:430-441 — all 10 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 `www/public/commentics/system/library/email.php:235` 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 before the matched lines, `www/public/commentics/system/library/email.php:232` calls `get` and `www/public/commentics/system/library/email.php:374` 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 (12 lines × 6) www/public/commentics/backend/controller/extension/languages.php:88— www/public/commentics/backend/controller/extension/languages.php:88-99 | www/public/commentics/backend/controller/extension/themes.php:172-183 | www/public/commentics/backend/controller/settings/administrator.php:156-167 | www/public/commentics/backend/controller/settings/error_reporting.php:66-77 | www/public/commentics/backend/controller/settings/layout_form.php:1575-1586 | www/public/commentics/backend/controller/settings/licence.php:88-99 — before extracting anything, compare `www/public/commentics/backend/controller/extension/languages.php` and `www/public/commentics/backend/controller/extension/themes.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 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 `www/public/commentics/backend/controller/extension/languages.php:88` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `www/public/commentics/backend/controller/extension/themes.php:171` calls `isset`, `in_array`, `array` and `www/public/commentics/backend/controller/settings/error_reporting.php:65` 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 × 4) REDACTED:119— REDACTED:119-133 | REDACTED:144-158 | REDACTED:328-342 | REDACTED:353-367 — all 4 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 `REDACTED:119` 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–12 lines × 4) www/src/Service/CameraFunctions.php:16— www/src/Service/CameraFunctions.php:16-26 | www/src/Service/SearchFunctions.php:160-170 | www/src/Service/SearchFunctions.php:205-215 | www/src/Twig/AppExtension.php:67-78 — there are 4 copies across 3 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `www/src/Service/CameraFunctions.php:16` 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–12 lines × 3) www/src/Service/UserFunctions.php:237— www/src/Service/UserFunctions.php:237-248 | www/src/Service/UserFunctions.php:298-307 | www/src/Service/UserFunctions.php:337-346 — 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 `www/src/Service/UserFunctions.php:237` 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 (2–12 lines × 18) www/public/commentics/system/library/notify.php:33— www/public/commentics/system/library/notify.php:33-44 | www/public/commentics/system/library/notify.php:54-55 | www/public/commentics/system/library/notify.php:73-84 | www/public/commentics/system/library/notify.php:95-96 | www/public/commentics/system/library/notify.php:126-127 | www/public/commentics/system/library/notify.php:136-137 | www/public/commentics/system/library/notify.php:166-167 | www/public/commentics/system/library/notify.php:176-177 | www/public/commentics/system/library/notify.php:206-207 | www/public/commentics/system/library/notify.php:216-217 | www/public/commentics/system/library/notify.php:296-297 | www/public/commentics/system/library/notify.php:305-306 | www/public/commentics/system/library/notify.php:419-420 | www/public/commentics/system/library/notify.php:429-430 | www/public/commentics/system/library/notify.php:470-471 | www/public/commentics/system/library/notify.php:480-481 | www/public/commentics/system/library/notify.php:521-522 | www/public/commentics/system/library/notify.php:531-532 — all 18 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 `www/public/commentics/system/library/notify.php:33` 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, `www/public/commentics/system/library/notify.php:44` calls `str_ireplace` and `www/public/commentics/system/library/notify.php:55` 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 (11 lines × 56) www/public/commentics/backend/controller/add/admin.php:58— www/public/commentics/backend/controller/add/admin.php:58-68 | www/public/commentics/backend/controller/add/ban.php:34-44 | www/public/commentics/backend/controller/add/country.php:48-58 | www/public/commentics/backend/controller/add/question.php:42-52 | www/public/commentics/backend/controller/add/site.php:74-84 | www/public/commentics/backend/controller/add/state.php:40-50 | www/public/commentics/backend/controller/edit/admin.php:68-78 | www/public/commentics/backend/controller/edit/ban.php:42-52 | www/public/commentics/backend/controller/edit/comment.php:184-194 | www/public/commentics/backend/controller/edit/country.php:56-66 | www/public/commentics/backend/controller/edit/page.php:74-84 | www/public/commentics/backend/controller/edit/question.php:50-60 | www/public/commentics/backend/controller/edit/site.php:82-92 | www/public/commentics/backend/controller/edit/spam.php:58-68 | www/public/commentics/backend/controller/edit/state.php:48-58 | www/public/commentics/backend/controller/edit/user.php:60-70 | www/public/commentics/backend/controller/extension/languages.php:40-50 | www/public/commentics/backend/controller/extension/themes.php:58-68 | www/public/commentics/backend/controller/module/css_editor.php:184-194 | www/public/commentics/backend/controller/module/extra_fields.php:252-262 | www/public/commentics/backend/controller/module/extra_fields.php:413-423 | www/public/commentics/backend/controller/module/merge_users.php:30-40 | www/public/commentics/backend/controller/module/rich_snippets.php:48-58 | www/public/commentics/backend/controller/settings/administrator.php:88-98 | www/public/commentics/backend/controller/settings/cache.php:46-56 | www/public/commentics/backend/controller/settings/email_editor.php:147-157 | www/public/commentics/backend/controller/settings/email_setup.php:96-106 | www/public/commentics/backend/controller/settings/flooding.php:68-78 | www/public/commentics/backend/controller/settings/layout_comments.php:114-124 | www/public/commentics/backend/controller/settings/layout_comments.php:346-356 | www/public/commentics/backend/controller/settings/layout_comments.php:662-672 | www/public/commentics/backend/controller/settings/layout_comments.php:862-872 | www/public/commentics/backend/controller/settings/layout_form.php:386-396 | www/public/commentics/backend/controller/settings/layout_form.php:428-438 | www/public/commentics/backend/controller/settings/layout_form.php:468-478 | www/public/commentics/backend/controller/settings/layout_form.php:516-526 | www/public/commentics/backend/controller/settings/layout_form.php:554-564 | www/public/commentics/backend/controller/settings/layout_form.php:620-630 | www/public/commentics/backend/controller/settings/layout_form.php:686-696 | www/public/commentics/backend/controller/settings/layout_form.php:752-762 | www/public/commentics/backend/controller/settings/layout_form.php:812-822 | www/public/commentics/backend/controller/settings/layout_form.php:870-880 | www/public/commentics/backend/controller/settings/layout_form.php:1022-1032 | www/public/commentics/backend/controller/settings/layout_form.php:1228-1238 | www/public/commentics/backend/controller/settings/licence.php:30-40 | www/public/commentics/backend/controller/settings/processor.php:100-110 | www/public/commentics/backend/controller/settings/processor.php:176-186 | www/public/commentics/backend/controller/settings/processor.php:260-270 | www/public/commentics/backend/controller/settings/processor.php:344-354 | www/public/commentics/backend/controller/settings/processor.php:492-502 | www/public/commentics/backend/controller/settings/processor.php:588-598 | www/public/commentics/backend/controller/settings/processor.php:632-642 | www/public/commentics/backend/controller/settings/processor.php:756-766 | www/public/commentics/backend/controller/settings/security.php:72-82 | www/public/commentics/backend/controller/settings/system.php:104-114 | www/public/commentics/backend/controller/tool/text_finder.php:40-50 — before extracting anything, compare `www/public/commentics/backend/controller/add/admin.php` and `www/public/commentics/backend/controller/add/ban.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 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 after the matched lines, `www/public/commentics/backend/controller/module/rich_snippets.php:60` calls `sprintf`, `loadImage` and `www/public/commentics/backend/controller/add/ban.php:46` 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 (11 lines × 15) www/public/commentics/backend/model/manage/admins.php:208— www/public/commentics/backend/model/manage/admins.php:208-218 | www/public/commentics/backend/model/manage/bans.php:159-169 | www/public/commentics/backend/model/manage/comments.php:341-351 | www/public/commentics/backend/model/manage/countries.php:179-189 | www/public/commentics/backend/model/manage/pages.php:208-218 | www/public/commentics/backend/model/manage/questions.php:169-179 | www/public/commentics/backend/model/manage/sites.php:164-174 | www/public/commentics/backend/model/manage/states.php:171-181 | www/public/commentics/backend/model/manage/subscriptions.php:223-233 | www/public/commentics/backend/model/manage/users.php:254-264 | www/public/commentics/backend/model/module/extra_fields.php:128-138 | www/public/commentics/backend/model/report/access.php:135-145 | www/public/commentics/backend/model/report/version.php:123-133 | www/public/commentics/backend/model/report/viewers.php:135-145 | www/public/commentics/backend/model/tool/database_backup.php:270-280 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 `www/public/commentics/backend/model/manage/admins.php:208` 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 (11 lines × 14) www/public/commentics/backend/controller/manage/admins.php:243— www/public/commentics/backend/controller/manage/admins.php:243-253 | www/public/commentics/backend/controller/manage/bans.php:207-217 | www/public/commentics/backend/controller/manage/comments.php:358-368 | www/public/commentics/backend/controller/manage/countries.php:232-242 | www/public/commentics/backend/controller/manage/pages.php:273-283 | www/public/commentics/backend/controller/manage/questions.php:221-231 | www/public/commentics/backend/controller/manage/sites.php:210-220 | www/public/commentics/backend/controller/manage/states.php:211-221 | www/public/commentics/backend/controller/manage/subscriptions.php:260-270 | www/public/commentics/backend/controller/manage/users.php:264-274 | www/public/commentics/backend/controller/report/access.php:172-182 | www/public/commentics/backend/controller/report/version.php:162-172 | www/public/commentics/backend/controller/report/viewers.php:184-194 | www/public/commentics/backend/controller/tool/database_backup.php:195-205 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 × 11) www/public/commentics/backend/controller/manage/admins.php:41— www/public/commentics/backend/controller/manage/admins.php:41-50 | www/public/commentics/backend/controller/manage/bans.php:41-50 | www/public/commentics/backend/controller/manage/comments.php:84-94 | www/public/commentics/backend/controller/manage/countries.php:41-50 | www/public/commentics/backend/controller/manage/pages.php:41-50 | www/public/commentics/backend/controller/manage/questions.php:43-52 | www/public/commentics/backend/controller/manage/sites.php:41-50 | www/public/commentics/backend/controller/manage/states.php:41-50 | www/public/commentics/backend/controller/manage/subscriptions.php:41-50 | www/public/commentics/backend/controller/manage/users.php:63-72 | www/public/commentics/backend/controller/module/extra_fields.php:45-54 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 `www/public/commentics/backend/controller/manage/admins.php:41` 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 before the matched lines, `www/public/commentics/backend/controller/manage/comments.php:81` calls `unset`, `isset` and `www/public/commentics/backend/controller/manage/admins.php:41` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 10) www/public/commentics/backend/model/manage/admins.php:40— www/public/commentics/backend/model/manage/admins.php:40-50 | www/public/commentics/backend/model/manage/bans.php:30-40 | www/public/commentics/backend/model/manage/countries.php:40-50 | www/public/commentics/backend/model/manage/questions.php:32-42 | www/public/commentics/backend/model/manage/states.php:41-51 | www/public/commentics/backend/model/module/extra_fields.php:12-22 | www/public/commentics/backend/model/report/access.php:32-42 | www/public/commentics/backend/model/report/version.php:28-38 | www/public/commentics/backend/model/report/viewers.php:32-42 | www/public/commentics/backend/model/tool/database_backup.php:100-110 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 (11 lines × 8) www/public/commentics/backend/controller/add/admin.php:52— www/public/commentics/backend/controller/add/admin.php:52-62 | www/public/commentics/backend/controller/add/ban.php:28-38 | www/public/commentics/backend/controller/add/country.php:42-52 | www/public/commentics/backend/controller/add/site.php:68-78 | www/public/commentics/backend/controller/add/state.php:34-44 | www/public/commentics/backend/controller/module/merge_users.php:24-34 | www/public/commentics/backend/controller/tool/export_import.php:24-34 | www/public/commentics/backend/controller/tool/text_finder.php:34-44 — before extracting anything, compare `www/public/commentics/backend/controller/add/admin.php` and `www/public/commentics/backend/controller/add/ban.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 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 (11 lines × 5) www/public/commentics/backend/controller/edit/page.php:109— www/public/commentics/backend/controller/edit/page.php:109-119 | www/public/commentics/backend/controller/extension/languages.php:71-81 | www/public/commentics/backend/controller/extension/themes.php:147-157 | www/public/commentics/backend/controller/settings/administrator.php:119-129 | www/public/commentics/backend/controller/settings/system.php:177-187 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `www/public/commentics/backend/controller/edit/page.php:121` calls `isset`, `identifierExists` and `www/public/commentics/backend/controller/settings/system.php:189` 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 (4–11 lines × 13) www/public/commentics/backend/controller/edit/page.php:141— www/public/commentics/backend/controller/edit/page.php:141-151 | www/public/commentics/backend/controller/edit/user.php:121-131 | www/public/commentics/backend/controller/module/extra_fields.php:550-553 | www/public/commentics/backend/controller/settings/layout_comments.php:1356-1361 | www/public/commentics/backend/controller/settings/layout_form.php:1357-1360 | www/public/commentics/backend/controller/settings/layout_form.php:1375-1378 | www/public/commentics/backend/controller/settings/layout_form.php:1393-1396 | www/public/commentics/backend/controller/settings/layout_form.php:1411-1414 | www/public/commentics/backend/controller/settings/processor.php:936-939 | www/public/commentics/backend/controller/settings/processor.php:958-961 | www/public/commentics/backend/controller/settings/processor.php:988-991 | www/public/commentics/backend/controller/settings/processor.php:996-999 | www/public/commentics/backend/controller/settings/system.php:230-233 — before extracting anything, compare `www/public/commentics/backend/controller/edit/page.php` and `www/public/commentics/backend/controller/edit/user.php` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 115 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 `www/public/commentics/backend/controller/module/extra_fields.php:550` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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 before the matched lines, `www/public/commentics/backend/controller/edit/user.php:121` calls `isset`, `in_array`, `array` and `www/public/commentics/backend/controller/module/extra_fields.php:550` 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 lines × 16) www/public/commentics/backend/model/manage/admins.php:13— www/public/commentics/backend/model/manage/admins.php:13-22 | www/public/commentics/backend/model/manage/admins.php:29-38 | www/public/commentics/backend/model/manage/bans.php:15-24 | www/public/commentics/backend/model/manage/comments.php:25-34 | www/public/commentics/backend/model/manage/countries.php:17-26 | www/public/commentics/backend/model/manage/pages.php:23-32 | www/public/commentics/backend/model/manage/questions.php:13-22 | www/public/commentics/backend/model/manage/sites.php:29-38 | www/public/commentics/backend/model/manage/states.php:22-31 | www/public/commentics/backend/model/manage/subscriptions.php:25-34 | www/public/commentics/backend/model/manage/subscriptions.php:41-50 | www/public/commentics/backend/model/manage/users.php:23-32 | www/public/commentics/backend/model/report/access.php:13-22 | www/public/commentics/backend/model/report/version.php:13-22 | www/public/commentics/backend/model/report/viewers.php:13-22 | www/public/commentics/backend/model/tool/database_backup.php:85-94 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 `www/public/commentics/backend/model/manage/admins.php:13` 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, `www/public/commentics/backend/model/manage/subscriptions.php:37` calls `escape` and `www/public/commentics/backend/model/manage/admins.php:24` 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 × 7) www/public/commentics/backend/controller/add/country.php:112— www/public/commentics/backend/controller/add/country.php:112-121 | www/public/commentics/backend/controller/add/state.php:88-97 | www/public/commentics/backend/controller/edit/comment.php:459-468 | www/public/commentics/backend/controller/edit/country.php:122-131 | www/public/commentics/backend/controller/edit/spam.php:125-134 | www/public/commentics/backend/controller/edit/state.php:98-107 | www/public/commentics/backend/controller/edit/subscription.php:76-85 — before extracting anything, compare `www/public/commentics/backend/controller/add/country.php` and `www/public/commentics/backend/controller/add/state.php` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 87 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 `www/public/commentics/backend/controller/add/country.php:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 6) www/src/Service/LocationFunctions.php:50— www/src/Service/LocationFunctions.php:50-63 | www/src/Service/SearchFunctions.php:267-288 | www/src/Service/UploadFunctions.php:76-85 | www/src/Service/UploadFunctions.php:119-130 | www/src/Service/UserFunctions.php:33-44 | www/src/Service/UserFunctions.php:476-488 — there are 6 copies across 4 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 6 sites; resolving a subset leaves the remainder to drift apart. 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, `www/src/Service/SearchFunctions.php:288` calls `prepare` and `www/src/Service/LocationFunctions.php:63` 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 (2–10 lines × 8) www/public/commentics/backend/controller/manage/admins.php:221— www/public/commentics/backend/controller/manage/admins.php:221-230 | www/public/commentics/backend/controller/manage/comments.php:336-337 | www/public/commentics/backend/controller/manage/countries.php:210-211 | www/public/commentics/backend/controller/manage/pages.php:251-252 | www/public/commentics/backend/controller/manage/sites.php:188-197 | www/public/commentics/backend/controller/manage/subscriptions.php:238-247 | www/public/commentics/backend/controller/manage/users.php:242-243 | www/public/commentics/backend/controller/report/viewers.php:162-171 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/comments.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 245 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 `www/public/commentics/backend/controller/manage/admins.php:221` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `www/public/commentics/backend/controller/manage/comments.php:339` calls `isset`, `in_array`, `array` and `www/public/commentics/backend/controller/manage/admins.php:232` 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 × 3) www/public/commentics/backend/controller/module/chart.php:8— www/public/commentics/backend/controller/module/chart.php:8-17 | www/public/commentics/backend/controller/module/css_editor.php:44-53 | www/public/commentics/backend/controller/module/rich_snippets.php:8-17 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `www/public/commentics/backend/controller/module/chart.php:8` 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–10 lines × 2) www/public/commentics/frontend/controller/main/form.php:1225— www/public/commentics/frontend/controller/main/form.php:1225-1233 | www/public/commentics/frontend/controller/main/form.php:1347-1356 — 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 `www/public/commentics/frontend/controller/main/form.php:1225` 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 (8–10 lines × 2) www/src/Controller/ApiController.php:832— www/src/Controller/ApiController.php:832-841 | www/src/Controller/ApiController.php:865-872 — 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 `www/src/Controller/ApiController.php:832` 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 (9 lines × 34) www/public/commentics/backend/controller/add/admin.php:66— www/public/commentics/backend/controller/add/admin.php:66-74 | www/public/commentics/backend/controller/add/ban.php:36-44 | www/public/commentics/backend/controller/add/country.php:62-70 | www/public/commentics/backend/controller/add/question.php:50-58 | www/public/commentics/backend/controller/add/site.php:100-108 | www/public/commentics/backend/controller/add/state.php:48-56 | www/public/commentics/backend/controller/edit/admin.php:76-84 | www/public/commentics/backend/controller/edit/ban.php:44-52 | www/public/commentics/backend/controller/edit/comment.php:264-272 | www/public/commentics/backend/controller/edit/country.php:70-78 | www/public/commentics/backend/controller/edit/page.php:88-96 | www/public/commentics/backend/controller/edit/question.php:58-66 | www/public/commentics/backend/controller/edit/site.php:108-116 | www/public/commentics/backend/controller/edit/state.php:56-64 | www/public/commentics/backend/controller/edit/user.php:68-76 | www/public/commentics/backend/controller/extension/languages.php:42-50 | www/public/commentics/backend/controller/extension/themes.php:78-86 | www/public/commentics/backend/controller/module/css_editor.php:294-302 | www/public/commentics/backend/controller/module/extra_fields.php:290-298 | www/public/commentics/backend/controller/module/extra_fields.php:451-459 | www/public/commentics/backend/controller/module/merge_users.php:32-40 | www/public/commentics/backend/controller/module/rich_snippets.php:50-58 | www/public/commentics/backend/controller/settings/administrator.php:102-110 | www/public/commentics/backend/controller/settings/cache.php:60-68 | www/public/commentics/backend/controller/settings/email_setup.php:164-172 | www/public/commentics/backend/controller/settings/flooding.php:76-84 | www/public/commentics/backend/controller/settings/layout_form.php:820-828 | www/public/commentics/backend/controller/settings/layout_form.php:878-886 | www/public/commentics/backend/controller/settings/layout_form.php:1230-1238 | www/public/commentics/backend/controller/settings/licence.php:32-40 | www/public/commentics/backend/controller/settings/processor.php:794-802 | www/public/commentics/backend/controller/settings/security.php:74-82 | www/public/commentics/backend/controller/settings/system.php:154-162 | www/public/commentics/backend/controller/tool/text_finder.php:48-56 — before extracting anything, compare `www/public/commentics/backend/controller/add/admin.php` and `www/public/commentics/backend/controller/add/ban.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 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 `www/public/commentics/backend/controller/add/admin.php:66` 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, `www/public/commentics/backend/controller/add/country.php:72` calls `getFrontendLanguages` and `www/public/commentics/backend/controller/add/ban.php:46` 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 (7–9 lines × 28) www/public/commentics/backend/model/manage/admins.php:73— www/public/commentics/backend/model/manage/admins.php:73-79 | www/public/commentics/backend/model/manage/admins.php:114-122 | www/public/commentics/backend/model/manage/bans.php:63-69 | www/public/commentics/backend/model/manage/bans.php:92-100 | www/public/commentics/backend/model/manage/comments.php:107-113 | www/public/commentics/backend/model/manage/comments.php:168-176 | www/public/commentics/backend/model/manage/countries.php:73-79 | www/public/commentics/backend/model/manage/countries.php:110-118 | www/public/commentics/backend/model/manage/pages.php:89-95 | www/public/commentics/backend/model/manage/pages.php:130-138 | www/public/commentics/backend/model/manage/questions.php:65-71 | www/public/commentics/backend/model/manage/questions.php:98-106 | www/public/commentics/backend/model/manage/sites.php:79-85 | www/public/commentics/backend/model/manage/sites.php:108-116 | www/public/commentics/backend/model/manage/states.php:78-84 | www/public/commentics/backend/model/manage/states.php:111-119 | www/public/commentics/backend/model/manage/subscriptions.php:87-93 | www/public/commentics/backend/model/manage/subscriptions.php:136-144 | www/public/commentics/backend/model/manage/users.php:87-93 | www/public/commentics/backend/model/manage/users.php:124-132 | www/public/commentics/backend/model/report/access.php:65-71 | www/public/commentics/backend/model/report/access.php:98-106 | www/public/commentics/backend/model/report/version.php:61-67 | www/public/commentics/backend/model/report/version.php:90-98 | www/public/commentics/backend/model/report/viewers.php:65-71 | www/public/commentics/backend/model/report/viewers.php:98-106 | www/public/commentics/backend/model/tool/database_backup.php:148-154 | www/public/commentics/backend/model/tool/database_backup.php:177-185 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 `www/public/commentics/backend/model/manage/admins.php:114` 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 (9 lines × 19) www/public/commentics/backend/controller/edit/admin.php:32— www/public/commentics/backend/controller/edit/admin.php:32-40 | www/public/commentics/backend/controller/edit/admin.php:54-62 | www/public/commentics/backend/controller/edit/ban.php:30-38 | www/public/commentics/backend/controller/edit/comment.php:36-44 | www/public/commentics/backend/controller/edit/comment.php:84-92 | www/public/commentics/backend/controller/edit/comment.php:112-120 | www/public/commentics/backend/controller/edit/comment.php:158-166 | www/public/commentics/backend/controller/edit/country.php:38-46 | www/public/commentics/backend/controller/edit/page.php:30-38 | www/public/commentics/backend/controller/edit/question.php:32-40 | www/public/commentics/backend/controller/edit/site.php:30-38 | www/public/commentics/backend/controller/edit/site.php:58-66 | www/public/commentics/backend/controller/edit/state.php:30-38 | www/public/commentics/backend/controller/edit/user.php:30-38 | www/public/commentics/backend/controller/module/extra_fields.php:343-351 | www/public/commentics/backend/controller/module/extra_fields.php:357-365 | www/public/commentics/backend/controller/module/extra_fields.php:395-403 | www/public/commentics/backend/controller/settings/administrator.php:24-32 | www/public/commentics/backend/controller/settings/administrator.php:78-86 — before extracting anything, compare `www/public/commentics/backend/controller/edit/admin.php` and `www/public/commentics/backend/controller/edit/ban.php` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 60 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 `www/public/commentics/backend/controller/edit/admin.php:32` 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, `www/public/commentics/backend/controller/edit/admin.php:66` calls `formatDate` and `www/public/commentics/backend/controller/edit/ban.php:42` 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 (9 lines × 15) www/public/commentics/backend/model/manage/admins.php:138— www/public/commentics/backend/model/manage/admins.php:138-146 | www/public/commentics/backend/model/manage/bans.php:104-112 | www/public/commentics/backend/model/manage/comments.php:212-220 | www/public/commentics/backend/model/manage/countries.php:130-138 | www/public/commentics/backend/model/manage/pages.php:154-162 | www/public/commentics/backend/model/manage/questions.php:114-122 | www/public/commentics/backend/model/manage/sites.php:120-128 | www/public/commentics/backend/model/manage/states.php:127-135 | www/public/commentics/backend/model/manage/subscriptions.php:168-176 | www/public/commentics/backend/model/manage/users.php:144-152 | www/public/commentics/backend/model/module/extra_fields.php:62-70 | www/public/commentics/backend/model/report/access.php:114-122 | www/public/commentics/backend/model/report/version.php:102-110 | www/public/commentics/backend/model/report/viewers.php:114-122 | www/public/commentics/backend/model/tool/database_backup.php:189-197 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 (11 lines × 12) www/public/commentics/backend/controller/add/ban.php:55— www/public/commentics/backend/controller/add/ban.php:55-65 | www/public/commentics/backend/controller/add/question.php:82-92 | www/public/commentics/backend/controller/add/site.php:119-129 | www/public/commentics/backend/controller/add/state.php:69-79 | www/public/commentics/backend/controller/data/list.php:189-199 | www/public/commentics/backend/controller/edit/ban.php:65-75 | www/public/commentics/backend/controller/edit/question.php:92-102 | www/public/commentics/backend/controller/edit/site.php:129-139 | www/public/commentics/backend/controller/edit/state.php:79-89 | www/public/commentics/backend/controller/main/dashboard.php:232-242 | www/public/commentics/backend/controller/module/extra_fields.php:539-549 | www/public/commentics/backend/controller/settings/maintenance.php:45-55 — before extracting anything, compare `www/public/commentics/backend/controller/add/ban.php` and `www/public/commentics/backend/controller/add/question.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 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 `www/public/commentics/backend/controller/add/ban.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 (8–9 lines × 12) www/public/commentics/backend/controller/manage/admins.php:32— www/public/commentics/backend/controller/manage/admins.php:32-39 | www/public/commentics/backend/controller/manage/bans.php:32-39 | www/public/commentics/backend/controller/manage/comments.php:69-77 | www/public/commentics/backend/controller/manage/countries.php:32-39 | www/public/commentics/backend/controller/manage/pages.php:32-39 | www/public/commentics/backend/controller/manage/questions.php:34-41 | www/public/commentics/backend/controller/manage/sites.php:32-39 | www/public/commentics/backend/controller/manage/states.php:32-39 | www/public/commentics/backend/controller/manage/subscriptions.php:32-39 | www/public/commentics/backend/controller/manage/users.php:53-61 | www/public/commentics/backend/controller/module/extra_fields.php:36-43 | www/public/commentics/backend/controller/tool/database_backup.php:36-44 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 `www/public/commentics/backend/controller/manage/admins.php:32` 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 (4–9 lines × 21) www/public/commentics/backend/controller/add/country.php:104— www/public/commentics/backend/controller/add/country.php:104-107 | www/public/commentics/backend/controller/add/country.php:111-119 | www/public/commentics/backend/controller/add/state.php:87-95 | www/public/commentics/backend/controller/edit/comment.php:439-442 | www/public/commentics/backend/controller/edit/comment.php:451-454 | www/public/commentics/backend/controller/edit/comment.php:458-466 | www/public/commentics/backend/controller/edit/country.php:114-117 | www/public/commentics/backend/controller/edit/country.php:121-129 | www/public/commentics/backend/controller/edit/spam.php:124-132 | www/public/commentics/backend/controller/edit/state.php:97-105 | www/public/commentics/backend/controller/edit/subscription.php:75-83 | www/public/commentics/backend/controller/extension/themes.php:171-179 | www/public/commentics/backend/controller/settings/administrator.php:155-163 | www/public/commentics/backend/controller/settings/error_reporting.php:65-73 | www/public/commentics/backend/controller/settings/layout_form.php:1343-1346 | www/public/commentics/backend/controller/settings/layout_form.php:1453-1456 | www/public/commentics/backend/controller/settings/layout_form.php:1477-1480 | www/public/commentics/backend/controller/settings/layout_form.php:1574-1582 | www/public/commentics/backend/controller/settings/processor.php:966-971 | www/public/commentics/backend/controller/settings/processor.php:972-975 | www/public/commentics/backend/controller/tool/text_finder.php:78-81 — before extracting anything, compare `www/public/commentics/backend/controller/add/country.php` and `www/public/commentics/backend/controller/add/state.php` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 87 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 `www/public/commentics/backend/controller/add/country.php:104` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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, `www/public/commentics/backend/controller/add/country.php:107` calls `isset`, `in_array`, `array` and `www/public/commentics/backend/controller/edit/comment.php:442` 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 (9 lines × 9) www/public/commentics/backend/controller/edit/spam.php:110— www/public/commentics/backend/controller/edit/spam.php:110-118 | www/public/commentics/backend/controller/edit/subscription.php:65-73 | www/public/commentics/backend/controller/module/rich_snippets.php:85-93 | www/public/commentics/backend/controller/settings/cache.php:77-85 | www/public/commentics/backend/controller/settings/email_setup.php:181-189 | www/public/commentics/backend/controller/settings/error_reporting.php:55-63 | www/public/commentics/backend/controller/settings/layout_comments.php:1185-1193 | www/public/commentics/backend/controller/settings/processor.php:843-851 | www/public/commentics/backend/controller/tool/text_finder.php:67-75 — before extracting anything, compare `www/public/commentics/backend/controller/edit/spam.php` and `www/public/commentics/backend/controller/tool/text_finder.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 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 (9 lines × 7) www/public/commentics/backend/controller/add/admin.php:18— www/public/commentics/backend/controller/add/admin.php:18-26 | www/public/commentics/backend/controller/add/ban.php:16-24 | www/public/commentics/backend/controller/add/country.php:18-26 | www/public/commentics/backend/controller/add/question.php:18-26 | www/public/commentics/backend/controller/add/site.php:16-24 | www/public/commentics/backend/controller/add/state.php:16-24 | www/public/commentics/backend/controller/module/extra_fields.php:174-182 — before extracting anything, compare `www/public/commentics/backend/controller/add/admin.php` and `www/public/commentics/backend/controller/add/ban.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 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 `www/public/commentics/backend/controller/add/admin.php:18` 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–8 lines × 16) www/public/commentics/backend/controller/manage/admins.php:31— www/public/commentics/backend/controller/manage/admins.php:31-38 | www/public/commentics/backend/controller/manage/bans.php:31-38 | www/public/commentics/backend/controller/manage/comments.php:48-54 | www/public/commentics/backend/controller/manage/comments.php:58-64 | www/public/commentics/backend/controller/manage/comments.php:68-75 | www/public/commentics/backend/controller/manage/countries.php:31-38 | www/public/commentics/backend/controller/manage/pages.php:31-38 | www/public/commentics/backend/controller/manage/questions.php:33-40 | www/public/commentics/backend/controller/manage/sites.php:31-38 | www/public/commentics/backend/controller/manage/states.php:31-38 | www/public/commentics/backend/controller/manage/subscriptions.php:31-38 | www/public/commentics/backend/controller/manage/users.php:32-38 | www/public/commentics/backend/controller/manage/users.php:42-48 | www/public/commentics/backend/controller/manage/users.php:52-59 | www/public/commentics/backend/controller/module/extra_fields.php:35-42 | www/public/commentics/backend/controller/tool/database_backup.php:35-42 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 `www/public/commentics/backend/controller/manage/admins.php:31` 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 (8 lines × 14) www/public/commentics/backend/model/manage/admins.php:33— www/public/commentics/backend/model/manage/admins.php:33-40 | www/public/commentics/backend/model/manage/bans.php:19-26 | www/public/commentics/backend/model/manage/comments.php:29-36 | www/public/commentics/backend/model/manage/comments.php:61-68 | www/public/commentics/backend/model/manage/pages.php:27-34 | www/public/commentics/backend/model/manage/questions.php:17-24 | www/public/commentics/backend/model/manage/sites.php:33-40 | www/public/commentics/backend/model/manage/subscriptions.php:29-36 | www/public/commentics/backend/model/manage/subscriptions.php:45-52 | www/public/commentics/backend/model/manage/users.php:41-48 | www/public/commentics/backend/model/report/access.php:17-24 | www/public/commentics/backend/model/report/version.php:17-24 | www/public/commentics/backend/model/report/viewers.php:17-24 | www/public/commentics/backend/model/tool/database_backup.php:89-96 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 `www/public/commentics/backend/model/manage/admins.php:33` 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, `www/public/commentics/backend/model/manage/bans.php:27` calls `escape` and `www/public/commentics/backend/model/manage/admins.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 × 8) REDACTED:43— REDACTED:43-50 | REDACTED:74-81 | REDACTED:1774-1781 | REDACTED:155-162 | REDACTED:185-192 | REDACTED:215-222 | REDACTED:274-281 | REDACTED:311-318 — there are 8 copies across 3 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 8 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:1773` calls `curl_setopt` and `REDACTED:42` 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 (7–8 lines × 4) www/src/Controller/ApiController.php:831— www/src/Controller/ApiController.php:831-837 | www/src/Controller/ApiController.php:863-870 | www/src/Twig/AppExtension.php:29-36 | www/src/Twig/AppExtension.php:48-55 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `www/src/Controller/ApiController.php:831` 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 (1–8 lines × 4) www/public/commentics/system/library/notify.php:313— www/public/commentics/system/library/notify.php:313-313 | www/public/commentics/system/library/notify.php:438-445 | www/public/commentics/system/library/notify.php:489-496 | www/public/commentics/system/library/notify.php:540-547 — all 4 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 `www/public/commentics/system/library/notify.php:438` 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 × 11) www/public/commentics/backend/controller/manage/admins.php:14— www/public/commentics/backend/controller/manage/admins.php:14-20 | www/public/commentics/backend/controller/manage/bans.php:14-20 | www/public/commentics/backend/controller/manage/comments.php:14-20 | www/public/commentics/backend/controller/manage/countries.php:14-20 | www/public/commentics/backend/controller/manage/pages.php:14-20 | www/public/commentics/backend/controller/manage/questions.php:16-22 | www/public/commentics/backend/controller/manage/sites.php:14-20 | www/public/commentics/backend/controller/manage/states.php:14-20 | www/public/commentics/backend/controller/manage/subscriptions.php:14-20 | www/public/commentics/backend/controller/manage/users.php:14-20 | www/public/commentics/backend/controller/module/extra_fields.php:18-24 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 `www/public/commentics/backend/controller/manage/admins.php:14` 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, `www/public/commentics/backend/controller/manage/questions.php:10` calls `loadModel` and `www/public/commentics/backend/controller/manage/admins.php:8` 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 (6–7 lines × 11) www/public/commentics/backend/model/manage/admins.php:36— www/public/commentics/backend/model/manage/admins.php:36-42 | www/public/commentics/backend/model/manage/bans.php:26-32 | www/public/commentics/backend/model/manage/comments.php:64-69 | www/public/commentics/backend/model/manage/questions.php:28-34 | www/public/commentics/backend/model/manage/sites.php:40-45 | www/public/commentics/backend/model/manage/subscriptions.php:48-53 | www/public/commentics/backend/model/manage/users.php:44-49 | www/public/commentics/backend/model/report/access.php:28-34 | www/public/commentics/backend/model/report/version.php:24-30 | www/public/commentics/backend/model/report/viewers.php:28-34 | www/public/commentics/backend/model/tool/database_backup.php:96-102 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/bans.php` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 184 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 `www/public/commentics/backend/model/manage/comments.php:64` 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, `www/public/commentics/backend/model/manage/subscriptions.php:53` calls `backticks` and `www/public/commentics/backend/model/manage/admins.php:42` 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 lines × 10) www/public/commentics/backend/controller/edit/admin.php:66— www/public/commentics/backend/controller/edit/admin.php:66-72 | www/public/commentics/backend/controller/edit/ban.php:40-46 | www/public/commentics/backend/controller/edit/comment.php:182-188 | www/public/commentics/backend/controller/edit/country.php:54-60 | www/public/commentics/backend/controller/edit/page.php:72-78 | www/public/commentics/backend/controller/edit/question.php:48-54 | www/public/commentics/backend/controller/edit/site.php:80-86 | www/public/commentics/backend/controller/edit/state.php:46-52 | www/public/commentics/backend/controller/edit/subscription.php:42-48 | www/public/commentics/backend/controller/edit/user.php:58-64 — before extracting anything, compare `www/public/commentics/backend/controller/edit/admin.php` and `www/public/commentics/backend/controller/edit/ban.php` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 60 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, `www/public/commentics/backend/controller/edit/admin.php:64` calls `formatDate` and `www/public/commentics/backend/controller/edit/ban.php:38` 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 (7 lines × 9) www/public/commentics/backend/controller/edit/ban.php:48— www/public/commentics/backend/controller/edit/ban.php:48-54 | www/public/commentics/backend/controller/edit/country.php:74-80 | www/public/commentics/backend/controller/edit/page.php:92-98 | www/public/commentics/backend/controller/edit/question.php:62-68 | www/public/commentics/backend/controller/edit/site.php:112-118 | www/public/commentics/backend/controller/edit/state.php:60-66 | www/public/commentics/backend/controller/edit/subscription.php:44-50 | www/public/commentics/backend/controller/edit/user.php:72-78 | www/public/commentics/backend/controller/module/extra_fields.php:455-461 — before extracting anything, compare `www/public/commentics/backend/controller/edit/ban.php` and `www/public/commentics/backend/controller/edit/country.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 72 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 after the matched lines, `www/public/commentics/backend/controller/edit/country.php:82` calls `getFrontendLanguages` and `www/public/commentics/backend/controller/edit/ban.php:56` 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 (7 lines × 8) www/public/commentics/backend/controller/edit/admin.php:37— www/public/commentics/backend/controller/edit/admin.php:37-43 | www/public/commentics/backend/controller/edit/comment.php:117-123 | www/public/commentics/backend/controller/edit/page.php:59-65 | www/public/commentics/backend/controller/edit/site.php:41-47 | www/public/commentics/backend/controller/module/extra_fields.php:348-354 | www/public/commentics/backend/controller/module/extra_fields.php:386-392 | www/public/commentics/backend/controller/module/extra_fields.php:400-406 | www/public/commentics/backend/controller/settings/administrator.php:29-35 — before extracting anything, compare `www/public/commentics/backend/controller/edit/admin.php` and `www/public/commentics/backend/controller/edit/comment.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 67 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 `www/public/commentics/backend/controller/edit/admin.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 (7 lines × 7) www/public/commentics/backend/controller/edit/admin.php:58— www/public/commentics/backend/controller/edit/admin.php:58-64 | www/public/commentics/backend/controller/edit/ban.php:34-40 | www/public/commentics/backend/controller/edit/country.php:48-54 | www/public/commentics/backend/controller/edit/question.php:42-48 | www/public/commentics/backend/controller/edit/site.php:74-80 | www/public/commentics/backend/controller/edit/state.php:40-46 | www/public/commentics/backend/controller/edit/user.php:52-58 — before extracting anything, compare `www/public/commentics/backend/controller/edit/admin.php` and `www/public/commentics/backend/controller/edit/ban.php` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 60 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 after the matched lines, `www/public/commentics/backend/controller/edit/admin.php:66` calls `formatDate` and `www/public/commentics/backend/controller/edit/ban.php:42` 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 (7 lines × 6) www/public/commentics/backend/model/manage/admins.php:20— www/public/commentics/backend/model/manage/admins.php:20-26 | www/public/commentics/backend/model/manage/comments.php:40-46 | www/public/commentics/backend/model/manage/countries.php:24-30 | www/public/commentics/backend/model/manage/pages.php:38-44 | www/public/commentics/backend/model/manage/states.php:29-35 | www/public/commentics/backend/model/manage/subscriptions.php:36-42 — before extracting anything, compare `www/public/commentics/backend/model/manage/admins.php` and `www/public/commentics/backend/model/manage/comments.php` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 167 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 (7 lines × 5) www/public/commentics/backend/controller/add/admin.php:46— www/public/commentics/backend/controller/add/admin.php:46-52 | www/public/commentics/backend/controller/add/site.php:42-48 | www/public/commentics/backend/controller/add/site.php:50-56 | www/public/commentics/backend/controller/tool/clear_cache.php:20-26 | www/public/commentics/backend/controller/tool/clear_cache.php:28-34 — before extracting anything, compare `www/public/commentics/backend/controller/add/admin.php` and `www/public/commentics/backend/controller/add/site.php` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 99 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 `www/public/commentics/backend/controller/add/admin.php:46` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 156) www/public/commentics/backend/controller/extension/languages.php:28— www/public/commentics/backend/controller/extension/languages.php:28-33 | www/public/commentics/backend/controller/extension/themes.php:26-31 | www/public/commentics/backend/controller/extension/themes.php:34-39 | www/public/commentics/backend/controller/module/akismet.php:36-41 | www/public/commentics/backend/controller/settings/approval.php:22-27 | www/public/commentics/backend/controller/settings/approval.php:30-35 | www/public/commentics/backend/controller/settings/error_reporting.php:22-27 | www/public/commentics/backend/controller/settings/flooding.php:28-33 | www/public/commentics/backend/controller/settings/flooding.php:36-41 | www/public/commentics/backend/controller/settings/flooding.php:56-61 | www/public/commentics/backend/controller/settings/layout_comments.php:24-29 | www/public/commentics/backend/controller/settings/layout_comments.php:244-249 | www/public/commentics/backend/controller/settings/layout_comments.php:252-257 | www/public/commentics/backend/controller/settings/layout_comments.php:266-271 | www/public/commentics/backend/controller/settings/layout_comments.php:310-315 | www/public/commentics/backend/controller/settings/layout_comments.php:318-323 | www/public/commentics/backend/controller/settings/layout_comments.php:326-331 | www/public/commentics/backend/controller/settings/layout_comments.php:334-339 | www/public/commentics/backend/controller/settings/layout_comments.php:448-453 | www/public/commentics/backend/controller/settings/layout_comments.php:456-461 | www/public/commentics/backend/controller/settings/layout_comments.php:464-469 | www/public/commentics/backend/controller/settings/layout_comments.php:472-479 | www/public/commentics/backend/controller/settings/layout_comments.php:482-489 | www/public/commentics/backend/controller/settings/layout_comments.php:492-499 | www/public/commentics/backend/controller/settings/layout_comments.php:502-509 | www/public/commentics/backend/controller/settings/layout_comments.php:512-519 | www/public/commentics/backend/controller/settings/layout_comments.php:522-529 | www/public/commentics/backend/controller/settings/layout_comments.php:532-537 | www/public/commentics/backend/controller/settings/layout_comments.php:540-547 | www/public/commentics/backend/controller/settings/layout_comments.php:550-557 | www/public/commentics/backend/controller/settings/layout_comments.php:560-567 | www/public/commentics/backend/controller/settings/layout_comments.php:570-575 | www/public/commentics/backend/controller/settings/layout_comments.php:578-583 | www/public/commentics/backend/controller/settings/layout_comments.php:586-591 | www/public/commentics/backend/controller/settings/layout_comments.php:594-599 | www/public/commentics/backend/controller/settings/layout_comments.php:602-607 | www/public/commentics/backend/controller/settings/layout_comments.php:610-615 | www/public/commentics/backend/controller/settings/layout_comments.php:618-623 | www/public/commentics/backend/controller/settings/layout_comments.php:650-655 | www/public/commentics/backend/controller/settings/layout_comments.php:702-709 | www/public/commentics/backend/controller/settings/layout_comments.php:712-719 | www/public/commentics/backend/controller/settings/layout_comments.php:722-727 | www/public/commentics/backend/controller/settings/layout_comments.php:730-735 | www/public/commentics/backend/controller/settings/layout_comments.php:760-765 | www/public/commentics/backend/controller/settings/layout_comments.php:768-775 | www/public/commentics/backend/controller/settings/layout_comments.php:800-807 | www/public/commentics/backend/controller/settings/layout_comments.php:810-815 | www/public/commentics/backend/controller/settings/layout_comments.php:908-913 | www/public/commentics/backend/controller/settings/layout_comments.php:916-921 | www/public/commentics/backend/controller/settings/layout_comments.php:946-953 | www/public/commentics/backend/controller/settings/layout_comments.php:956-961 | www/public/commentics/backend/controller/settings/layout_comments.php:964-969 | www/public/commentics/backend/controller/settings/layout_comments.php:972-977 | www/public/commentics/backend/controller/settings/layout_comments.php:980-985 | www/public/commentics/backend/controller/settings/layout_comments.php:988-993 | www/public/commentics/backend/controller/settings/layout_comments.php:996-1001 | www/public/commentics/backend/controller/settings/layout_comments.php:1004-1009 | www/public/commentics/backend/controller/settings/layout_comments.php:1024-1029 | www/public/commentics/backend/controller/settings/layout_comments.php:1032-1037 | www/public/commentics/backend/controller/settings/layout_comments.php:1040-1045 | www/public/commentics/backend/controller/settings/layout_comments.php:1048-1053 | www/public/commentics/backend/controller/settings/layout_comments.php:1056-1061 | www/public/commentics/backend/controller/settings/layout_comments.php:1064-1069 | www/public/commentics/backend/controller/settings/layout_comments.php:1072-1079 | www/public/commentics/backend/controller/settings/layout_form.php:26-31 | www/public/commentics/backend/controller/settings/layout_form.php:34-39 | www/public/commentics/backend/controller/settings/layout_form.php:42-47 | www/public/commentics/backend/controller/settings/layout_form.php:50-55 | www/public/commentics/backend/controller/settings/layout_form.php:98-103 | www/public/commentics/backend/controller/settings/layout_form.php:106-111 | www/public/commentics/backend/controller/settings/layout_form.php:114-119 | www/public/commentics/backend/controller/settings/layout_form.php:122-127 | www/public/commentics/backend/controller/settings/layout_form.php:130-135 | www/public/commentics/backend/controller/settings/layout_form.php:138-143 | www/public/commentics/backend/controller/settings/layout_form.php:146-151 | www/public/commentics/backend/controller/settings/layout_form.php:154-159 | www/public/commentics/backend/controller/settings/layout_form.php:162-167 | www/public/commentics/backend/controller/settings/layout_form.php:170-175 | www/public/commentics/backend/controller/settings/layout_form.php:178-183 | www/public/commentics/backend/controller/settings/layout_form.php:186-191 | www/public/commentics/backend/controller/settings/layout_form.php:194-199 | www/public/commentics/backend/controller/settings/layout_form.php:202-207 | www/public/commentics/backend/controller/settings/layout_form.php:210-215 | www/public/commentics/backend/controller/settings/layout_form.php:218-223 | www/public/commentics/backend/controller/settings/layout_form.php:238-243 | www/public/commentics/backend/controller/settings/layout_form.php:246-251 | www/public/commentics/backend/controller/settings/layout_form.php:254-259 | www/public/commentics/backend/controller/settings/layout_form.php:262-267 | www/public/commentics/backend/controller/settings/layout_form.php:270-275 | www/public/commentics/backend/controller/settings/layout_form.php:278-283 | www/public/commentics/backend/controller/settings/layout_form.php:286-291 | www/public/commentics/backend/controller/settings/layout_form.php:294-299 | www/public/commentics/backend/controller/settings/layout_form.php:302-307 | www/public/commentics/backend/controller/settings/layout_form.php:310-315 | www/public/commentics/backend/controller/settings/layout_form.php:318-323 | www/public/commentics/backend/controller/settings/layout_form.php:326-331 | www/public/commentics/backend/controller/settings/layout_form.php:334-339 | www/public/commentics/backend/controller/settings/layout_form.php:342-347 | www/public/commentics/backend/controller/settings/layout_form.php:350-355 | www/public/commentics/backend/controller/settings/layout_form.php:374-379 | www/public/commentics/backend/controller/settings/layout_form.php:404-409 | www/public/commentics/backend/controller/settings/layout_form.php:492-497 | www/public/commentics/backend/controller/settings/layout_form.php:584-589 | www/public/commentics/backend/controller/settings/layout_form.php:650-655 | www/public/commentics/backend/controller/settings/layout_form.php:716-721 | www/public/commentics/backend/controller/settings/layout_form.php:782-787 | www/public/commentics/backend/controller/settings/layout_form.php:840-845 | www/public/commentics/backend/controller/settings/layout_form.php:1136-1141 | www/public/commentics/backend/controller/settings/layout_form.php:1144-1151 | www/public/commentics/backend/controller/settings/layout_form.php:1154-1159 | www/public/commentics/backend/controller/settings/layout_form.php:1162-1169 | www/public/commentics/backend/controller/settings/layout_form.php:1172-1179 | www/public/commentics/backend/controller/settings/layout_form.php:1182-1189 | www/public/commentics/backend/controller/settings/layout_form.php:1192-1197 | www/public/commentics/backend/controller/settings/layout_form.php:1200-1207 | www/public/commentics/backend/controller/settings/layout_form.php:1216-1221 | www/public/commentics/backend/controller/settings/processor.php:24-29 | www/public/commentics/backend/controller/settings/processor.php:32-37 | www/public/commentics/backend/controller/settings/processor.php:40-45 | www/public/commentics/backend/controller/settings/processor.php:54-59 | www/public/commentics/backend/controller/settings/processor.php:68-73 | www/public/commentics/backend/controller/settings/processor.php:82-87 | www/public/commentics/backend/controller/settings/processor.php:130-135 | www/public/commentics/backend/controller/settings/processor.php:144-149 | www/public/commentics/backend/controller/settings/processor.php:158-163 | www/public/commentics/backend/controller/settings/processor.php:200-205 | www/public/commentics/backend/controller/settings/processor.php:214-219 | www/public/commentics/backend/controller/settings/processor.php:228-233 | www/public/commentics/backend/controller/settings/processor.php:242-247 | www/public/commentics/backend/controller/settings/processor.php:290-295 | www/public/commentics/backend/controller/settings/processor.php:298-303 | www/public/commentics/backend/controller/settings/processor.php:312-317 | www/public/commentics/backend/controller/settings/processor.php:326-331 | www/public/commentics/backend/controller/settings/processor.php:368-373 | www/public/commentics/backend/controller/settings/processor.php:376-381 | www/public/commentics/backend/controller/settings/processor.php:384-389 | www/public/commentics/backend/controller/settings/processor.php:392-397 | www/public/commentics/backend/controller/settings/processor.php:400-405 | www/public/commentics/backend/controller/settings/processor.php:408-413 | www/public/commentics/backend/controller/settings/processor.php:452-457 | www/public/commentics/backend/controller/settings/processor.php:460-465 | www/public/commentics/backend/controller/settings/processor.php:474-479 | www/public/commentics/backend/controller/settings/processor.php:556-561 | www/public/commentics/backend/controller/settings/processor.php:570-575 | www/public/commentics/backend/controller/settings/processor.php:684-689 | www/public/commentics/backend/controller/settings/processor.php:704-709 | www/public/commentics/backend/controller/settings/processor.php:718-723 | www/public/commentics/backend/controller/settings/processor.php:732-737 | www/public/commentics/backend/controller/settings/security.php:22-27 | www/public/commentics/backend/controller/settings/security.php:30-35 | www/public/commentics/backend/controller/settings/security.php:38-43 | www/public/commentics/backend/controller/settings/security.php:46-51 | www/public/commentics/backend/controller/settings/security.php:54-59 | www/public/commentics/backend/controller/settings/system.php:64-69 | www/public/commentics/backend/controller/settings/system.php:72-77 | www/public/commentics/backend/controller/settings/system.php:80-85 — before extracting anything, compare `www/public/commentics/backend/controller/extension/languages.php` and `www/public/commentics/backend/controller/extension/themes.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 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 `www/public/commentics/backend/controller/extension/languages.php:28` 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 (6 lines × 12) www/public/commentics/backend/controller/manage/admins.php:23— www/public/commentics/backend/controller/manage/admins.php:23-28 | www/public/commentics/backend/controller/manage/bans.php:23-28 | www/public/commentics/backend/controller/manage/comments.php:23-28 | www/public/commentics/backend/controller/manage/comments.php:31-36 | www/public/commentics/backend/controller/manage/countries.php:23-28 | www/public/commentics/backend/controller/manage/pages.php:23-28 | www/public/commentics/backend/controller/manage/questions.php:25-30 | www/public/commentics/backend/controller/manage/sites.php:23-28 | www/public/commentics/backend/controller/manage/states.php:23-28 | www/public/commentics/backend/controller/manage/subscriptions.php:23-28 | www/public/commentics/backend/controller/module/extra_fields.php:27-32 | www/public/commentics/backend/controller/tool/database_backup.php:27-32 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 `www/public/commentics/backend/controller/manage/admins.php:23` 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 (6 lines × 10) www/public/commentics/backend/model/settings/layout_comments.php:345— www/public/commentics/backend/model/settings/layout_comments.php:345-350 | www/public/commentics/backend/model/settings/layout_comments.php:351-356 | www/public/commentics/backend/model/settings/layout_comments.php:357-362 | www/public/commentics/backend/model/settings/layout_comments.php:363-368 | www/public/commentics/backend/model/settings/layout_comments.php:369-374 | www/public/commentics/backend/model/settings/layout_form.php:391-396 | www/public/commentics/backend/model/settings/layout_form.php:397-402 | www/public/commentics/backend/model/settings/layout_form.php:403-408 | www/public/commentics/backend/model/settings/layout_form.php:409-414 | www/public/commentics/backend/model/settings/layout_form.php:415-420 — there are 10 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 10 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `www/public/commentics/backend/model/settings/layout_comments.php:345` 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 (6 lines × 7) www/public/commentics/backend/controller/add/admin.php:45— www/public/commentics/backend/controller/add/admin.php:45-50 | www/public/commentics/backend/controller/add/site.php:41-46 | www/public/commentics/backend/controller/add/site.php:49-54 | www/public/commentics/backend/controller/module/extra_fields.php:245-250 | www/public/commentics/backend/controller/tool/clear_cache.php:19-24 | www/public/commentics/backend/controller/tool/clear_cache.php:27-32 | www/public/commentics/backend/controller/tool/clear_cache.php:35-40 — before extracting anything, compare `www/public/commentics/backend/controller/add/admin.php` and `www/public/commentics/backend/controller/add/site.php` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 99 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 `www/public/commentics/backend/controller/add/admin.php:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 4) www/public/commentics/system/library/notify.php:120— www/public/commentics/system/library/notify.php:120-125 | www/public/commentics/system/library/notify.php:160-165 | www/public/commentics/system/library/notify.php:200-205 | www/public/commentics/system/library/user.php:305-310 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `www/public/commentics/system/library/notify.php:120` 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 (3–6 lines × 28) www/public/commentics/backend/controller/add/site.php:150— www/public/commentics/backend/controller/add/site.php:150-153 | www/public/commentics/backend/controller/add/site.php:158-161 | www/public/commentics/backend/controller/edit/comment.php:403-406 | www/public/commentics/backend/controller/edit/comment.php:423-426 | www/public/commentics/backend/controller/edit/comment.php:443-446 | www/public/commentics/backend/controller/edit/site.php:160-163 | www/public/commentics/backend/controller/edit/site.php:168-171 | www/public/commentics/backend/controller/module/extra_fields.php:564-566 | www/public/commentics/backend/controller/module/rich_snippets.php:96-99 | www/public/commentics/backend/controller/settings/email_setup.php:211-213 | www/public/commentics/backend/controller/settings/email_setup.php:239-241 | www/public/commentics/backend/controller/settings/layout_comments.php:1266-1269 | www/public/commentics/backend/controller/settings/layout_comments.php:1278-1281 | www/public/commentics/backend/controller/settings/layout_comments.php:1349-1351 | www/public/commentics/backend/controller/settings/layout_form.php:1303-1308 | www/public/commentics/backend/controller/settings/layout_form.php:1318-1320 | www/public/commentics/backend/controller/settings/layout_form.php:1347-1352 | www/public/commentics/backend/controller/settings/layout_form.php:1365-1370 | www/public/commentics/backend/controller/settings/layout_form.php:1383-1388 | www/public/commentics/backend/controller/settings/layout_form.php:1401-1406 | www/public/commentics/backend/controller/settings/layout_form.php:1407-1424 | www/public/commentics/backend/controller/settings/layout_form.php:1428-1430 | www/public/commentics/backend/controller/settings/layout_form.php:1442-1444 | www/public/commentics/backend/controller/settings/layout_form.php:1457-1460 | www/public/commentics/backend/controller/settings/processor.php:859-861 | www/public/commentics/backend/controller/settings/processor.php:943-945 | www/public/commentics/backend/controller/settings/processor.php:965-967 | www/public/commentics/backend/controller/settings/processor.php:1003-1005 — there are 28 copies across 9 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 28 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `www/public/commentics/backend/controller/add/site.php:150` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `www/public/commentics/backend/controller/add/site.php:149` calls `isset`, `isEmail` and `www/public/commentics/backend/controller/settings/layout_form.php:1407` 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 (3–6 lines × 7) REDACTED:92— REDACTED:92-94 | REDACTED:197-199 | REDACTED:303-305 | REDACTED:316-318 | REDACTED:393-395 | REDACTED:451-456 | REDACTED:717-722 — all 7 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 `REDACTED:92` 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, `REDACTED:456` calls `get` and `REDACTED:94` 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 (6 lines × 16) www/public/commentics/backend/controller/edit/admin.php:43— www/public/commentics/backend/controller/edit/admin.php:43-48 | www/public/commentics/backend/controller/edit/admin.php:51-56 | www/public/commentics/backend/controller/edit/comment.php:123-128 | www/public/commentics/backend/controller/edit/comment.php:155-160 | www/public/commentics/backend/controller/edit/page.php:65-70 | www/public/commentics/backend/controller/edit/site.php:47-52 | www/public/commentics/backend/controller/edit/site.php:55-60 | www/public/commentics/backend/controller/module/extra_fields.php:354-359 | www/public/commentics/backend/controller/module/extra_fields.php:392-397 | www/public/commentics/backend/controller/module/extra_fields.php:406-411 | www/public/commentics/backend/controller/settings/administrator.php:35-40 | www/public/commentics/backend/controller/settings/administrator.php:43-48 | www/public/commentics/backend/controller/settings/administrator.php:51-56 | www/public/commentics/backend/controller/settings/administrator.php:59-64 | www/public/commentics/backend/controller/settings/administrator.php:67-72 | www/public/commentics/backend/controller/settings/administrator.php:75-80 — before extracting anything, compare `www/public/commentics/backend/controller/edit/admin.php` and `www/public/commentics/backend/controller/edit/comment.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 67 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 `www/public/commentics/backend/controller/edit/admin.php:43` 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, `www/public/commentics/backend/controller/edit/page.php:72` calls `formatDate` and `www/public/commentics/backend/controller/module/extra_fields.php:413` 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 (5 lines × 14) www/public/commentics/backend/controller/manage/admins.php:23— www/public/commentics/backend/controller/manage/admins.php:23-27 | www/public/commentics/backend/controller/manage/bans.php:23-27 | www/public/commentics/backend/controller/manage/comments.php:23-27 | www/public/commentics/backend/controller/manage/comments.php:31-35 | www/public/commentics/backend/controller/manage/comments.php:39-43 | www/public/commentics/backend/controller/manage/countries.php:23-27 | www/public/commentics/backend/controller/manage/pages.php:23-27 | www/public/commentics/backend/controller/manage/questions.php:25-29 | www/public/commentics/backend/controller/manage/sites.php:23-27 | www/public/commentics/backend/controller/manage/states.php:23-27 | www/public/commentics/backend/controller/manage/subscriptions.php:23-27 | www/public/commentics/backend/controller/manage/users.php:23-27 | www/public/commentics/backend/controller/module/extra_fields.php:27-31 | www/public/commentics/backend/controller/tool/database_backup.php:27-31 — before extracting anything, compare `www/public/commentics/backend/controller/manage/admins.php` and `www/public/commentics/backend/controller/manage/bans.php` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 255 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 × 12) www/public/commentics/backend/model/module/css_editor.php:67— www/public/commentics/backend/model/module/css_editor.php:67-71 | www/public/commentics/backend/model/module/css_editor.php:97-101 | www/public/commentics/install/model/main/install_2.php:194-206 | www/public/commentics/install/model/main/install_2.php:408-419 | www/public/commentics/install/model/main/install_2.php:457-470 | www/public/commentics/install/model/main/install_2.php:488-499 | www/public/commentics/install/model/main/install_2.php:743-755 | www/public/commentics/install/model/main/install_2.php:806-816 | www/public/commentics/install/model/main/upgrade_2.php:19-23 | www/public/commentics/install/model/main/upgrade_2.php:41-47 | www/public/commentics/install/model/main/upgrade_2.php:87-93 | www/public/commentics/install/model/main/upgrade_2.php:337-343 — there are 12 copies across 3 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 12 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7 lines × 4) www/public/commentics/backend/model/settings/layout_comments.php:298— www/public/commentics/backend/model/settings/layout_comments.php:298-304 | www/public/commentics/backend/model/settings/layout_comments.php:328-334 | www/public/commentics/backend/model/settings/layout_form.php:326-332 | www/public/commentics/backend/model/settings/layout_form.php:374-380 — there are 4 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 4 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 (8 lines × 4) www/public/commentics/frontend/controller/main/form.php:960— www/public/commentics/frontend/controller/main/form.php:960-967 | www/public/commentics/frontend/controller/main/form.php:1245-1252 | www/public/commentics/frontend/controller/main/form.php:1358-1365 | www/public/commentics/frontend/controller/part/notify.php:122-129 — before extracting anything, compare `www/public/commentics/frontend/controller/main/form.php` and `www/public/commentics/frontend/controller/part/notify.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 84 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 `www/public/commentics/frontend/controller/main/form.php:960` 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 (4–5 lines × 5) www/public/commentics/backend/controller/add/ban.php:70— www/public/commentics/backend/controller/add/ban.php:70-73 | www/public/commentics/backend/controller/add/question.php:100-104 | www/public/commentics/backend/controller/edit/ban.php:80-83 | www/public/commentics/backend/controller/edit/question.php:110-114 | www/public/commentics/backend/controller/extension/languages.php:81-85 — before extracting anything, compare `www/public/commentics/backend/controller/add/ban.php` and `www/public/commentics/backend/controller/add/question.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 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 `www/public/commentics/backend/controller/add/ban.php:70` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `www/public/commentics/backend/controller/extension/languages.php:87` calls `isset`, `in_array`, `getBackendLanguages` and `www/public/commentics/backend/controller/add/question.php:106` 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 (4–5 lines × 6) www/public/commentics/backend/controller/manage/comments.php:352— www/public/commentics/backend/controller/manage/comments.php:352-355 | www/public/commentics/backend/controller/manage/pages.php:268-272 | www/public/commentics/backend/controller/manage/questions.php:216-220 | www/public/commentics/backend/controller/manage/subscriptions.php:254-257 | www/public/commentics/backend/controller/report/access.php:167-171 | www/public/commentics/backend/controller/report/viewers.php:178-181 — before extracting anything, compare `www/public/commentics/backend/controller/manage/comments.php` and `www/public/commentics/backend/controller/manage/pages.php` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 250 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 `www/public/commentics/backend/controller/manage/comments.php:352` 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 before the matched lines, `www/public/commentics/backend/controller/manage/pages.php:268` calls `addHeader` and `www/public/commentics/backend/controller/manage/comments.php:352` does not — after which the two agree again for 5 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 (2–5 lines × 4) www/public/commentics/backend/controller/edit/page.php:48— www/public/commentics/backend/controller/edit/page.php:48-52 | www/public/commentics/backend/controller/edit/page.php:53-54 | www/public/commentics/backend/controller/edit/user.php:42-46 | www/public/commentics/backend/controller/edit/user.php:47-48 — before extracting anything, compare `www/public/commentics/backend/controller/edit/page.php` and `www/public/commentics/backend/controller/edit/user.php` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 115 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 `www/public/commentics/backend/controller/edit/page.php:48` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `www/public/commentics/backend/controller/edit/page.php:53` calls `sprintf`, `link` and `www/public/commentics/backend/controller/edit/page.php:54` 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 (5 lines × 15) www/public/commentics/backend/model/common/administrator.php:8— www/public/commentics/backend/model/common/administrator.php:8-12 | www/public/commentics/backend/model/edit/ban.php:8-12 | www/public/commentics/backend/model/edit/question.php:8-12 | www/public/commentics/backend/model/edit/subscription.php:8-12 | www/public/commentics/backend/model/module/extra_fields.php:148-152 | REDACTED:1637-1641 | REDACTED:1728-1732 | www/public/commentics/system/library/comment.php:45-49 | www/public/commentics/system/library/comment.php:197-201 | www/public/commentics/system/library/geo.php:19-23 | www/public/commentics/system/library/geo.php:37-41 | www/public/commentics/system/library/geo.php:148-152 | www/public/commentics/system/library/page.php:150-154 | www/public/commentics/system/library/site.php:17-21 | www/public/commentics/system/library/user.php:76-80 — there are 15 copies across 11 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 15 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 (5 lines × 7) www/public/commentics/backend/model/common/administrator.php:35— www/public/commentics/backend/model/common/administrator.php:35-39 | www/public/commentics/backend/model/common/administrator.php:53-57 | www/public/commentics/backend/model/edit/ban.php:17-21 | www/public/commentics/backend/model/edit/page.php:8-12 | www/public/commentics/backend/model/edit/user.php:8-12 | www/public/commentics/backend/model/edit/user.php:17-21 | www/public/commentics/system/library/geo.php:28-32 — there are 7 copies across 5 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 7 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 (5 lines × 3) www/public/commentics/backend/model/common/administrator.php:44— www/public/commentics/backend/model/common/administrator.php:44-48 | www/public/commentics/backend/model/common/administrator.php:62-66 | www/public/commentics/backend/model/data/list.php:8-12 — 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 `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 × 10) www/public/commentics/backend/model/main/dashboard.php:8— www/public/commentics/backend/model/main/dashboard.php:8-12 | www/public/commentics/backend/model/main/dashboard.php:17-21 | www/public/commentics/backend/model/main/dashboard.php:192-196 | www/public/commentics/backend/model/report/version.php:143-147 | www/public/commentics/backend/model/settings/email_setup.php:41-45 | www/public/commentics/backend/model/settings/email_setup.php:50-54 | www/public/commentics/backend/model/tool/optimize_tables.php:23-27 | www/public/commentics/install/model/main/upgrade_1.php:8-12 | www/public/commentics/install/model/main/upgrade_2.php:396-400 | www/public/commentics/install/model/main/upgrade_2.php:414-418 — there are 10 copies across 6 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 10 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.
Duplicated block (5 lines × 6) REDACTED:1130— REDACTED:1130-1134 | REDACTED:1136-1140 | REDACTED:1142-1146 | REDACTED:1148-1152 | REDACTED:1154-1158 | REDACTED:1160-1164 — all 6 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 `REDACTED:1130` 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 (35 lines × 3 locations) www/public/commentics/backend/view/default/javascript/common.js:1521— www/public/commentics/backend/view/default/javascript/common.js:1521 · www/public/commentics/backend/view/default/javascript/common.js:1577 · www/public/commentics/backend/view/default/javascript/common.js:1888 — 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 (34 lines × 2 locations) www/public/commentics/backend/view/default/javascript/common.js:45— www/public/commentics/backend/view/default/javascript/common.js:45 · www/public/commentics/install/view/default/javascript/common.js:3 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (20 lines × 2 locations) REDACTED:957— REDACTED:957 · REDACTED:1270 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (19 lines × 2 locations) www/public/commentics/backend/view/default/javascript/common.js:243— www/public/commentics/backend/view/default/javascript/common.js:243 · www/public/commentics/backend/view/default/javascript/common.js:1706 — 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 (19 lines × 4 locations) www/public/commentics/backend/view/default/javascript/common.js:300— www/public/commentics/backend/view/default/javascript/common.js:300 · www/public/commentics/backend/view/default/javascript/common.js:327 · www/public/commentics/backend/view/default/javascript/common.js:1782 · www/public/commentics/backend/view/default/javascript/common.js:1862 — all 4 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 (18 lines × 22 locations) www/public/commentics/backend/view/default/javascript/common.js:483— www/public/commentics/backend/view/default/javascript/common.js:483 · www/public/commentics/backend/view/default/javascript/common.js:547 · www/public/commentics/backend/view/default/javascript/common.js:647 · www/public/commentics/backend/view/default/javascript/common.js:666 · +18 more site(s) not listed — all 22 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 (18 lines × 2 locations) REDACTED:1516— REDACTED:1516 · REDACTED:1916 — 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 (17 lines × 3 locations) www/public/commentics/backend/view/default/javascript/common.js:202— www/public/commentics/backend/view/default/javascript/common.js:202 · www/public/commentics/backend/view/default/javascript/common.js:757 · www/public/commentics/backend/view/default/javascript/common.js:2301 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (17 lines × 2 locations) REDACTED:234— REDACTED:234 · REDACTED:261 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (16 lines × 10 locations) www/public/commentics/backend/view/default/javascript/common.js:503— www/public/commentics/backend/view/default/javascript/common.js:503 · www/public/commentics/backend/view/default/javascript/common.js:567 · www/public/commentics/backend/view/default/javascript/common.js:889 · www/public/commentics/backend/view/default/javascript/common.js:990 · +6 more site(s) not listed — all 10 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 × 7 locations) www/public/commentics/backend/view/default/javascript/common.js:2516— www/public/commentics/backend/view/default/javascript/common.js:2516 · www/public/commentics/backend/view/default/javascript/common.js:2532 · www/public/commentics/backend/view/default/javascript/common.js:2548 · www/public/commentics/backend/view/default/javascript/common.js:2564 · +3 more site(s) not listed — all 7 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (14 lines × 3 locations) REDACTED:607— REDACTED:607 · REDACTED:661 · REDACTED:719 — 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 (12 lines × 4 locations) REDACTED:509— REDACTED:509 · REDACTED:531 · REDACTED:553 · REDACTED:575 — all 4 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 (12 lines × 3 locations) www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-fetch.js:14— www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-fetch.js:14 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-meta.js:18 · www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-scale.js:14 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
Duplicated block (11 lines × 19 locations) www/public/commentics/backend/view/default/javascript/common.js:437— www/public/commentics/backend/view/default/javascript/common.js:437 · www/public/commentics/backend/view/default/javascript/common.js:455 · www/public/commentics/backend/view/default/javascript/common.js:519 · www/public/commentics/backend/view/default/javascript/common.js:583 · +15 more site(s) not listed — all 19 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 (10 lines × 3 locations) REDACTED:1360— REDACTED:1360 · REDACTED:1432 · REDACTED:1607 — 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.
Complex function scale (cyclomatic 49, cognitive 61) www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-scale.js:127— scale has cyclomatic complexity 49 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 34, cognitive 53) REDACTED:8— (anonymous) has cyclomatic complexity 34 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getTransformedOptions (cyclomatic 27, cognitive 17) www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js:224— getTransformedOptions has cyclomatic complexity 27 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function transformCoordinates (cyclomatic 24, cognitive 10) www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js:372— transformCoordinates has cyclomatic complexity 24 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 23, cognitive 56) REDACTED:827— (anonymous) has cyclomatic complexity 23 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 16, cognitive 24) REDACTED:6— (anonymous) has cyclomatic complexity 16 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function parseExifData (cyclomatic 15, cognitive 14) www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:334— parseExifData has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 14, cognitive 30) REDACTED:1655— (anonymous) has cyclomatic complexity 14 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function d (cyclomatic 13, cognitive 9) · ×1
Complex function d (cyclomatic 13, cognitive 9) REDACTED:95— d has cyclomatic complexity 13 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 12, cognitive 20) www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-meta.js:102— (anonymous) has cyclomatic complexity 12 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function e (cyclomatic 12, cognitive 10) · ×1
Complex function e (cyclomatic 12, cognitive 10) REDACTED:95— e has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 11, cognitive 22) REDACTED:1231— (anonymous) has cyclomatic complexity 11 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 11, cognitive 10) www/public/commentics/backend/view/default/javascript/common.js:1— (anonymous) has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· www/public/commentics/backend/view/default/javascript/common.js · ×1
www/public/commentics/backend/view/default/javascript/common.js: 2115 lines of code www/public/commentics/backend/view/default/javascript/common.js:1— www/public/commentics/backend/view/default/javascript/common.js has 2115 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1885 lines of code REDACTED:1— REDACTED has 1885 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js · ×1
www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js: 463 lines of code www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js:1— www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-orientation.js has 463 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js · ×1
www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js: 440 lines of code www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:1— www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js has 440 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif-map.js · ×1
www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif-map.js: 414 lines of code www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif-map.js:1— www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif-map.js has 414 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Test Coverage — 0% of 15 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
Swallowed exception (empty catch) www/public/commentics/system/library/database/mysqli.php:25— 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 predicate www/public/commentics/backend/view/default/javascript/common.js:73— `password.match(/[a-z]/) && password.match(/[A-Z]/)` appears character-identically in 2 files — www/public/commentics/backend/view/default/javascript/common.js, www/public/commentics/install/view/default/javascript/common.js. 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 www/public/commentics/backend/controller/extension/installer.php:53— `!isset($this->request->files['file']['tmp_name']) || !$this` appears character-identically in 2 files — www/public/commentics/backend/controller/extension/installer.php, www/public/commentics/backend/controller/tool/export_import.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 www/public/commentics/backend/controller/edit/admin.php:14— `!isset($this->request->get['id']) || !$this` appears character-identically in 12 files — www/public/commentics/backend/controller/edit/admin.php, www/public/commentics/backend/controller/edit/ban.php, www/public/commentics/backend/controller/edit/comment.php, www/public/commentics/backend/controller/edit/country.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 www/public/commentics/backend/controller/add/question.php:96— `!isset($this->request->post['answer']) || $this` appears character-identically in 2 files — www/public/commentics/backend/controller/add/question.php, www/public/commentics/backend/controller/edit/question.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 www/public/commentics/backend/controller/add/country.php:99— `!isset($this->request->post['code']) || $this` appears character-identically in 2 files — www/public/commentics/backend/controller/add/country.php, www/public/commentics/backend/controller/edit/country.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 www/public/commentics/backend/controller/settings/layout_form.php:1312— `!isset($this->request->post['comment_maximum_characters']) || !$this` appears character-identically in 2 files — www/public/commentics/backend/controller/settings/layout_form.php, www/public/commentics/backend/controller/settings/processor.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 www/public/commentics/backend/controller/add/state.php:83— `!isset($this->request->post['country_code']) || !$this` appears character-identically in 2 files — www/public/commentics/backend/controller/add/state.php, www/public/commentics/backend/controller/edit/state.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 www/public/commentics/backend/controller/add/site.php:133— `!isset($this->request->post['domain']) || $this` appears character-identically in 2 files — www/public/commentics/backend/controller/add/site.php, www/public/commentics/backend/controller/edit/site.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 www/public/commentics/backend/controller/add/admin.php:125— `!isset($this->request->post['email']) || !$this` appears character-identically in 3 files — www/public/commentics/backend/controller/add/admin.php, www/public/commentics/backend/controller/edit/admin.php, www/public/commentics/backend/controller/settings/administrator.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 www/public/commentics/backend/controller/add/admin.php:129— `!isset($this->request->post['email']) || $this` appears character-identically in 4 files — www/public/commentics/backend/controller/add/admin.php, www/public/commentics/backend/controller/edit/admin.php, www/public/commentics/backend/controller/edit/user.php, www/public/commentics/backend/controller/settings/administrator.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 www/public/commentics/backend/controller/add/country.php:111— `!isset($this->request->post['enabled']) || !in_array($this->request->post['enabled'], array('0', '1'))` appears character-identically in 4 files — www/public/commentics/backend/controller/add/country.php, www/public/commentics/backend/controller/add/state.php, www/public/commentics/backend/controller/edit/country.php, www/public/commentics/backend/controller/edit/state.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 www/public/commentics/backend/controller/add/site.php:153— `!isset($this->request->post['from_email']) || $this` appears character-identically in 3 files — www/public/commentics/backend/controller/add/site.php, www/public/commentics/backend/controller/edit/site.php, www/public/commentics/backend/controller/settings/email_setup.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 www/public/commentics/backend/controller/add/site.php:145— `!isset($this->request->post['from_name']) || $this` appears character-identically in 3 files — www/public/commentics/backend/controller/add/site.php, www/public/commentics/backend/controller/edit/site.php, www/public/commentics/backend/controller/settings/email_setup.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 www/public/commentics/backend/controller/settings/layout_form.php:1322— `!isset($this->request->post['headline_maximum_characters']) || !$this` appears character-identically in 2 files — www/public/commentics/backend/controller/settings/layout_form.php, www/public/commentics/backend/controller/settings/processor.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 www/public/commentics/backend/controller/add/ban.php:65— `!isset($this->request->post['ip_address']) || $this` appears character-identically in 2 files — www/public/commentics/backend/controller/add/ban.php, www/public/commentics/backend/controller/edit/ban.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 www/public/commentics/backend/controller/add/question.php:102— `!isset($this->request->post['language']) || !in_array($this->request->post['language'], $this->model_common_language->getFrontendLanguages()…` appears character-identically in 2 files — www/public/commentics/backend/controller/add/question.php, www/public/commentics/backend/controller/edit/question.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 www/public/commentics/backend/controller/edit/page.php:141— `!isset($this->request->post['moderate']) || !in_array($this->request->post['moderate'], array('default', 'never', 'always'))` appears character-identically in 2 files — www/public/commentics/backend/controller/edit/page.php, www/public/commentics/backend/controller/edit/user.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 www/public/commentics/backend/controller/add/site.php:129— `!isset($this->request->post['name']) || $this` appears character-identically in 6 files — www/public/commentics/backend/controller/add/site.php, www/public/commentics/backend/controller/add/state.php, www/public/commentics/backend/controller/edit/site.php, www/public/commentics/backend/controller/edit/state.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 www/public/commentics/backend/controller/edit/comment.php:446— `!isset($this->request->post['notes']) || $this` appears character-identically in 2 files — www/public/commentics/backend/controller/edit/comment.php, www/public/commentics/backend/controller/main/dashboard.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 www/public/commentics/backend/controller/add/question.php:92— `!isset($this->request->post['question']) || $this` appears character-identically in 2 files — www/public/commentics/backend/controller/add/question.php, www/public/commentics/backend/controller/edit/question.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 www/public/commentics/backend/controller/add/ban.php:69— `!isset($this->request->post['reason']) || $this` appears character-identically in 2 files — www/public/commentics/backend/controller/add/ban.php, www/public/commentics/backend/controller/edit/ban.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 www/public/commentics/backend/controller/add/site.php:161— `!isset($this->request->post['reply_email']) || $this` appears character-identically in 3 files — www/public/commentics/backend/controller/add/site.php, www/public/commentics/backend/controller/edit/site.php, www/public/commentics/backend/controller/settings/email_setup.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 www/public/commentics/backend/controller/data/list.php:199— `!isset($this->request->post['text']) || $this` appears character-identically in 2 files — www/public/commentics/backend/controller/data/list.php, www/public/commentics/backend/controller/tool/text_finder.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 www/public/commentics/backend/controller/add/country.php:107— `!isset($this->request->post['top']) || !in_array($this->request->post['top'], array('0', '1'))` appears character-identically in 2 files — www/public/commentics/backend/controller/add/country.php, www/public/commentics/backend/controller/edit/country.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 www/public/commentics/backend/controller/add/site.php:137— `!isset($this->request->post['url']) || !$this` appears character-identically in 3 files — www/public/commentics/backend/controller/add/site.php, www/public/commentics/backend/controller/edit/page.php, www/public/commentics/backend/controller/edit/site.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.
redundant comment www/public/commentics/backend/view/default/javascript/common.js:1752— 8 comments in this file only repeat the code they sit on (lines 1752, 1762, 1776, 1856, 2202, 2339, 2358, 2374), for example "Settings Email Editor". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:781— 6 comments in this file only repeat the code they sit on (lines 781, 1010, 1199, 1903, 2449, 2459), for example "Find any disabled inputs and remove the "disabled" attribute". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
No ADRs found www/composer.json:2— 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/`. ADRs are expected here because `www/composer.json` makes this repository a deployable product (line 2).
D28 · Secrets (history)· Rotate the exposed credentials · ×1
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation· No architecture diagram/doc · ×1
No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
No SAST — No static application security testing detected. For this repository's stack, add phpstan or psalm (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
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.
doc comments repeat the names www/public/js/JavaScript-Load-Image-5.16.0/js/load-image-exif.js:161— 15 of 88 documented parameters and 4 of 33 summaries in `.` only repeat the member or parameter name (e.g. "TIFF offset" for `tiffOffset`). Delete the restating tags, or add what the name does not say.
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.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
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 1 file(s) — `www/src/Controller/ApiController.php` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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 01a1e547-2d0f-7bec-b1e2-7eb812384b72 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 92 · Warnings: 892 · Recommendations: 63 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 16-11-2026 @ 16:53 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.