Public report of yansongda/pay, published 17 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, 17 November 2026, 12:11 UTC · Survey ID cd_563d52aa625e412393e3f420e924c3bc
yansongda/pay
Measured 17 November 2026, 12:11 UTC, at code version 01cf002
Knowledge freshness is not measured: Freshness signal contradicted by repo activity.
Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Up 4.5 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 31,351 lines of product code in 14 projects, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Maturity, 52.5
Findings by how serious they are
15 critical145 serious19 minor
16 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
17 November 2026, 12:11 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
43of 43 dimensions measured by tools.
170of 179 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.
43dimensions across 6 lenses, read from 31,351 lines of product code in 14 projects.
yansongda/pay falls short of our standard for production because we found no recorded design decisions and no architecture document or diagram. It scores 63.2 out of 100 and is rated Adequate, and 13 of its 15 critical findings are security problems.
Maturity, at 52.5, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 9.3 points. Adding build and run instructions to the README comes next, worth about 5.1 points. Raising Maturity to 70 would lift the score to about 70.6.
Nine pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. One automatic update takes new releases before a bad one can be spotted, and one known security hole in a package the code depends on can be used by attackers. Pinning each tool to an exact version, setting a waiting period for automatic updates and updating the vulnerable packages would close these risks. Limiting each secret to its own step would fix the secret exposed to more of the pipeline than needed, and the password or key in the code's history needs replacing, with the old one switched off. The loop of parts of the code that depend on each other needs breaking by moving the shared parts into a project of their own.
The product code is 31,351 lines, about €69,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.
If Maturity rose from 52.5 to 70, the lowest score rated Strong, the score would rise from 63.2 to about 70.6.
Code composition: what the lines of code are
Product code 52%Tests 48%
New since the last survey: 45 findings
These 45 critical or serious findings weren't in the previous survey, on 5 November 2026.
Code Duplication · Near-duplicate member family (3 members, 16 shared lines) src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php
Code Duplication · Members sharing a duplicated core (11 members, 50+ identical tokens) src/Plugin/Wechat/V3/Extend/ProfitSharing/ReturnPlugin.php
Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) src/Plugin/Wechat/V3/Pay/Combine/AppPayPlugin.php
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) src/Plugin/Airwallex/V1/Pay/CancelPlugin.php
Code Duplication · Edited copy of a member (39 corresponding lines) src/Plugin/Wechat/V3/PayScore/CreatePlugin.php
Code Duplication · Edited copies of one member (5 members, 30+ corresponding lines) src/Plugin/Wechat/V3/Pay/App/ClosePlugin.php
Code Duplication · Edited copy of a member (27 corresponding lines) src/Traits/AirwallexTrait.php
Code Duplication · Edited copies of one member (6 members, 28+ corresponding lines) src/Plugin/Wechat/V3/Pay/H5/PayPlugin.php
Code Duplication · Edited copies of one member (7 members, 24+ corresponding lines) src/Plugin/Wechat/V3/Pay/App/QueryRefundPlugin.php
Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) src/Plugin/Airwallex/V1/Pay/CallbackPlugin.php
Code Duplication · Edited copies of one member (4 members, 27+ corresponding lines) src/Plugin/Wechat/Openapi/Oauth/Code2SessionPlugin.php
Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) src/Plugin/Alipay/CallbackPlugin.php
Code Duplication · Edited copy of a member (21 corresponding lines) src/Plugin/Alipay/V2/AddRadarPlugin.php
Code Duplication · Edited copy of a member (19 corresponding lines) src/Traits/AllinpayTrait.php
Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) src/Plugin/Wechat/V3/Extend/ProfitSharing/QueryMerchantConfigsPlugin.php
Code Duplication · Edited copy of a member (17 corresponding lines) src/Plugin/Alipay/V3/AddRadarPlugin.php
Code Duplication · Edited copies of one member (4 members, 24+ corresponding lines) src/Plugin/Allinpay/AddPayloadSignPlugin.php
Code Duplication · Edited copy of a member (16 corresponding lines) src/Plugin/Unipay/Qra/VerifySignaturePlugin.php
Code Duplication · Edited copy of a member (15 corresponding lines) src/Traits/UnipayTrait.php
Code Duplication · Edited copies of one member (7 members, 18+ corresponding lines) src/Plugin/Airwallex/V1/AddRadarPlugin.php
Code Duplication · Edited copy of a member (16 corresponding lines) src/Plugin/Allinpay/VerifySignaturePlugin.php
Code Duplication · Edited copy of a member (15 corresponding lines) src/Plugin/Douyin/V1/ObtainClientTokenPlugin.php
Code Duplication · Edited copy of a member (29 corresponding lines) src/Plugin/Unipay/Open/Pay/H5/PayPlugin.php
Code Duplication · Edited copy of a member (14 corresponding lines) src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php
Code Duplication · Edited copy of a member (25 corresponding lines) src/Plugin/Airwallex/V1/Pay/ConfirmPlugin.php
Code Duplication · Edited copy of a member (11 corresponding lines) src/Shortcut/Unipay/CancelShortcut.php
Code Duplication · Edited copy of a member (13 corresponding lines) src/Plugin/Alipay/V3/VerifySignaturePlugin.php
Code Duplication · Edited copies of one member (4 members, 10+ corresponding lines) src/Shortcut/Airwallex/QueryShortcut.php
Code Duplication · Edited copy of a member (5 corresponding lines) src/Plugin/Wechat/V3/Pay/Combine/JsapiInvokePlugin.php
Code Duplication · Edited copy of a member (10 corresponding lines) src/Shortcut/Wechat/CancelShortcut.php
Code Duplication · Edited copies of one member (7 members, 11+ corresponding lines) src/Traits/AirwallexTrait.php
Code Duplication · Edited copy of a member (8 corresponding lines) src/Plugin/Alipay/V2/ResponseHtmlPlugin.php
Code Duplication · Edited copy of a member (17 corresponding lines) src/Plugin/Apple/AddRadarPlugin.php
Code Duplication · Edited copy of a member (7 corresponding lines) src/Plugin/Wechat/V3/Marketing/Transfer/CreatePlugin.php
Code Duplication · Edited copy of a member (10 corresponding lines) src/Plugin/Wechat/V3/Extend/ProfitSharing/DeleteReceiverPlugin.php
Code Duplication · Edited copy of a member (3 corresponding lines) src/Plugin/Alipay/V3/VerifySignaturePlugin.php
Code Duplication · Edited copy of a member (9 corresponding lines) src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php
Code Duplication · Edited copy of a member (7 corresponding lines) src/Plugin/Alipay/V2/StartPlugin.php
Code Duplication · Edited copy of a member (5 corresponding lines) src/Enum/PayMode.php
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 14 findings
These 14 critical or serious findings were in the previous survey, on 5 November 2026, and are gone from this one.
Code Duplication · Near-duplicate member family (4 members, 11 shared lines) src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php
A11y enforcement · Accessibility enforcement below the top rung web/package.json
Rebuild cost: about €69,000 · Estimate
Cost to rebuild
€23,000 to €120,000, for 382 to 1,213 hours of work, about 0.5 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.9 at a score of 63. 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: 31,351 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
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.
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.
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 €69,000 to build again, about 0.5 person-years of work. Its weakest lens is Maturity, at 52.5 (Adequate). Maturity is about how well the project explains and looks after itself, which decides whether a new developer, or a new supplier, can take over. Because the weakest lens counts most in the score, work on Maturity also moves the score most.
Based on: the rebuild estimate · the Maturity grade · how much each lens counts
What to do: Start with the Maturity actions in Top priorities.
If you do one thing first · First action
Record your significant design decisions. Of all the actions in this report, it raises the score most for the work it takes: about 9.3 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
127 modules, with 35 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 87 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
Plugin.Wechat.V2.Pay.App uses Config, so a change to Config can break Plugin.Wechat.V2.Pay.App, while a change to Plugin.Wechat.V2.Pay.App can't break Config.
Position
Below the diagonal: Plugin.Wechat.V2.Pay.App uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V2.Pay.Mini uses Config, so a change to Config can break Plugin.Wechat.V2.Pay.Mini, while a change to Plugin.Wechat.V2.Pay.Mini can't break Config.
Position
Below the diagonal: Plugin.Wechat.V2.Pay.Mini uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V2.Pay.Mp uses Config, so a change to Config can break Plugin.Wechat.V2.Pay.Mp, while a change to Plugin.Wechat.V2.Pay.Mp can't break Config.
Position
Below the diagonal: Plugin.Wechat.V2.Pay.Mp uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V2.Pay.Redpack uses Config, so a change to Config can break Plugin.Wechat.V2.Pay.Redpack, while a change to Plugin.Wechat.V2.Pay.Redpack can't break Config.
Position
Below the diagonal: Plugin.Wechat.V2.Pay.Redpack uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V3.Extend.ProfitSharing uses Config, so a change to Config can break Plugin.Wechat.V3.Extend.ProfitSharing, while a change to Plugin.Wechat.V3.Extend.ProfitSharing can't break Config.
Position
Below the diagonal: Plugin.Wechat.V3.Extend.ProfitSharing uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V3.Marketing.Coupon.Coupons uses Config, so a change to Config can break Plugin.Wechat.V3.Marketing.Coupon.Coupons, while a change to Plugin.Wechat.V3.Marketing.Coupon.Coupons can't break Config.
Position
Below the diagonal: Plugin.Wechat.V3.Marketing.Coupon.Coupons uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V3.Marketing.Coupon.Stock uses Config, so a change to Config can break Plugin.Wechat.V3.Marketing.Coupon.Stock, while a change to Plugin.Wechat.V3.Marketing.Coupon.Stock can't break Config.
Position
Below the diagonal: Plugin.Wechat.V3.Marketing.Coupon.Stock uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V3.Marketing.Fapiao.Blockchain uses Config, so a change to Config can break Plugin.Wechat.V3.Marketing.Fapiao.Blockchain, while a change to Plugin.Wechat.V3.Marketing.Fapiao.Blockchain can't break Config.
Position
Below the diagonal: Plugin.Wechat.V3.Marketing.Fapiao.Blockchain uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V3.Marketing.Transfer uses Config, so a change to Config can break Plugin.Wechat.V3.Marketing.Transfer, while a change to Plugin.Wechat.V3.Marketing.Transfer can't break Config.
Position
Below the diagonal: Plugin.Wechat.V3.Marketing.Transfer uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V3.Pay.App uses Config, so a change to Config can break Plugin.Wechat.V3.Pay.App, while a change to Plugin.Wechat.V3.Pay.App can't break Config.
Position
Below the diagonal: Plugin.Wechat.V3.Pay.App uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V3.Pay.Combine uses Config, so a change to Config can break Plugin.Wechat.V3.Pay.Combine, while a change to Plugin.Wechat.V3.Pay.Combine can't break Config.
Position
Below the diagonal: Plugin.Wechat.V3.Pay.Combine uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V3.Pay.H5 uses Config, so a change to Config can break Plugin.Wechat.V3.Pay.H5, while a change to Plugin.Wechat.V3.Pay.H5 can't break Config.
Position
Below the diagonal: Plugin.Wechat.V3.Pay.H5 uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V3.Pay.Jsapi uses Config, so a change to Config can break Plugin.Wechat.V3.Pay.Jsapi, while a change to Plugin.Wechat.V3.Pay.Jsapi can't break Config.
Position
Below the diagonal: Plugin.Wechat.V3.Pay.Jsapi uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V3.Pay.Mini uses Config, so a change to Config can break Plugin.Wechat.V3.Pay.Mini, while a change to Plugin.Wechat.V3.Pay.Mini can't break Config.
Position
Below the diagonal: Plugin.Wechat.V3.Pay.Mini uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V3.Pay.Native uses Config, so a change to Config can break Plugin.Wechat.V3.Pay.Native, while a change to Plugin.Wechat.V3.Pay.Native can't break Config.
Position
Below the diagonal: Plugin.Wechat.V3.Pay.Native uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V3.Pay.Pos uses Config, so a change to Config can break Plugin.Wechat.V3.Pay.Pos, while a change to Plugin.Wechat.V3.Pay.Pos can't break Config.
Position
Below the diagonal: Plugin.Wechat.V3.Pay.Pos uses a module listed above it, which is the healthy direction.
Plugin.Wechat.V3.Pay.Refund uses Config, so a change to Config can break Plugin.Wechat.V3.Pay.Refund, while a change to Plugin.Wechat.V3.Pay.Refund can't break Config.
Position
Below the diagonal: Plugin.Wechat.V3.Pay.Refund uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
11
High / Critical
A07:2025 — Authentication Failures
2
High / Critical
A03:2025 — Software Supply Chain Failures
1
High / Critical
Roadmap
Top priorities: Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them; Add a build/run (quick start) section to the root README — the first thing a newcomer needs; 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.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
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.
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.
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.
Your ecosystem's static analyzer is declared as a dependency but is not wired into CI — run it as a required step on push/PR (e.g. `composer phpstan` / `mix sobelow` / `bundle exec brakeman` / the spotbugs Gradle task / `sbt scalafixAll --check` / `golangci-lint run` / `rebar3 lint`) so a regression fails the build instead of relying on someone running it locally.
Add an explicit build step to your CI pipeline — your stack's own build command, or, if the pipeline delegates to a task runner, a build task that runner executes in CI — so every change is built before merge.
Code Duplication: Members sharing a duplicated core (5 members, 50+ identical tokens)
How the grades work
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 15
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 — 145
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 — 19
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 16
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 43 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.7, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 43 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, 170 of 179 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.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.php) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.php) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 2 direct Composer requirement(s) were read, but the outdated signal needs Packagist, and no committed composer.lock resolves them to releases, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D14 License Compliance — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — this repository declares a composer.json but commits no composer.lock this pass can read, so the set of packages it installs is not on disk: its composer.json states version CONSTRAINTS, and Composer's guidance is that a library leaves the lock uncommitted. Producing the graph needs Composer's solver, which this pass does not run, and grading whichever release happens to be newest today would be a verdict about a dependency graph nobody resolved. NOT a finding that this repository's licences are compliant: this dimension asserts nothing about its licensing in either direction.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (64 contributor(s) across 1304 commit(s) sampled, automation and bot accounts excluded). One of them holds 88% of the history; the other 63 hold 0.2% 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.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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. `(repository root)` (31262 LoC, 609 module-visible types across 127 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.
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: 51 commits in the last 90 days, yet 131 of 152 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.
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 a PSR-11 container (Psr\Container), whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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: 2 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).
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, Vue components 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, Vue components is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
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.
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.
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.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
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.
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.
4 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was JwsVerifier.verifyNode at 24. A further 3 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 VirtualShortcut.getPlugins at 23 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: src/Shortcut/Wechat/VirtualShortcut.php (VirtualShortcut.getPlugins at 23), src/Shortcut/Alipay/QueryShortcut.php (QueryShortcut.getPlugins at 21), src/Shortcut/Wechat/QueryShortcut.php (QueryShortcut.getPlugins at 17). 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.
Bring the 4 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with JwsVerifier.verifyNode (cyclomatic 24), TokenVerifier.parsePkcs7Signer (cyclomatic 24), TokenVerifier.verifySignedAttrs (cyclomatic 21). — 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 4 together lifts Cyclomatic Complexity from 9.2 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Bring the 4 bodies over 15 down to 15 or less in Cognitive Complexity — start with JwsVerifier.verifyNode (cognitive 27), TokenVerifier.parsePkcs7Signer (cognitive 27), TokenVerifier.verifySignedAttrs (cognitive 26). — 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 4 together lifts Cognitive Complexity from 9.1 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 Classes9.9 / 10Stronggated by 1 serious finding✓ 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 1 TooManyMethods finding(s) in God Classes — start with WechatConfig.php. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D4 · Code Duplication3.7 / 10Weak✓ Tool-verified
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
76 duplicated block group(s) detected. 15.8 % of the production lines (4,949 of 31,351) are in a reported copy. A further 50 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4src/Plugin/Airwallex/V1/Pay/CancelPlugin.php:27
Members sharing a duplicated core (5 members, 50+ identical tokens) · ×3src/Plugin/Wechat/V3/Extend/Complaints/QueryDetailPlugin.php:37
Members sharing a duplicated core (12 members, 50+ identical tokens) · ×2src/Plugin/Unipay/Open/Pay/QrCode/CancelPlugin.php:31
+ 98 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 4 Members sharing a duplicated core (4 members, 50+ identical tokens) finding(s) in Code Duplication — start with CancelPlugin.php, ClosePlugin.php, DetailPlugin.php. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 3 Members sharing a duplicated core (5 members, 50+ identical tokens) finding(s) in Code Duplication — start with QueryDetailPlugin.php, AppPayPlugin.php, Airwallex.php. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 3 Duplicated block (20 lines × 3) finding(s) in Code Duplication — start with CancelPlugin.php (2), QueryHistoryPlugin.php. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling0.0 / 10Critical✓ 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.
14 production modules (source-import), 1 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; 3 module(s) off the main sequence, with abstractness counted on 12 of the 14 (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).
Circular dependencysrc/Config.php:8
Off the main sequence: src/Action · ×3
What to do
Resolve the 3 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Circular dependency finding(s) in Coupling — start with Config.php. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
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.
1 deducted task-comment markers across 31351 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.
TodoCommentsrc/Traits/BestpayTrait.php:149
What to do
Resolve the 1 TodoComment finding(s) in Explicit Debt — start with BestpayTrait.php. — One of this dimension's main actionable groups (1 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.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
16 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
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.
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
11 finding(s): 0 critical, 11 high, 0 medium, 0 low. 9 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 9 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (9 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. 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 1 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
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 Alipay.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 the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. 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.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 2 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged
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.
Do you agree with this assessment?
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged
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.
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.
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.
`&.primary` sets color: #fff on background-color: #3eaf7c — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — web/.vitepress/theme/components/Home/Primary.vue:36
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.
The projects src → src/Config → src (one cycle inside a mutually-dependent group of 8 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference. — src/Config.php:8
What to do
Break project reference cycles by extracting shared abstractions into a separate project; keep the graph a DAG.
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 · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
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 gates8.0 / 10Strong✓ 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.
A CI pipeline exists but no build step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.
What to do
Add an explicit build step to your CI pipeline — your stack's own build command, or, if the pipeline delegates to a task runner, a build task that runner executes in CI — so every change is built before merge.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
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.
`REDACTED` schedules updates, but no `package-ecosystem` entry covers `github-actions`, `npm`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — REDACTED:7
What to do
Your ecosystem's static analyzer is declared as a dependency but is not wired into CI — run it as a required step on push/PR (e.g. `composer phpstan` / `mix sobelow` / `bundle exec brakeman` / the spotbugs Gradle task / `sbt scalafixAll --check` / `golangci-lint run` / `rebar3 lint`) so a regression fails the build instead of relying on someone running it locally.
Dependabot is configured but does not watch `github-actions`, `npm` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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 `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — 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.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
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 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 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.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 3 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.
D36 Supply-chain Provenance & Signing — 3 observation(s) recorded · The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
X10 Duplicated predicate — 13 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 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.
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 — 70 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.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
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.
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
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
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.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Laravel migration, an Eloquent $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository registers no route (no Laravel Route::…, no Symfony #[Route], no Filament panel, no WordPress REST route or AJAX action). Access control is therefore N/A here — a Composer library is authorized by the application that mounts it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone_number, …) or stored credential in a Laravel migration, an Eloquent model's $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Laravel migration, an Eloquent $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Laravel migration, an Eloquent $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~29424 lines of test source are present (.php) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — no .php test runner
D12 Dependency Hygiene — Not scored — 2 direct Composer requirement(s) were read, but the outdated signal needs Packagist, and no committed composer.lock resolves them to releases, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D14 License Compliance — Composer package licences not graded — this repository commits no composer.lock and this pass does not run Composer's solver
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D21 Naming Consistency — Naming consistency does not read PHP yet; not measured.
D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed PHP surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .php source were not judged.
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.
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) — 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.
D34 Knowledge Freshness — knowledge concentrated in recent work — freshness signal contradicted by repo activity
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.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (8 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, 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 165 current-state document(s) make no claim of a kind M4 checks. 51 claim(s) of kinds M4 does not check were not checked (path 25, command argument 1, environment variable 25); M4 checks only links and versions and artefact counts.
P2 Observability — This repository's PHP source (1 module(s), 610 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, PHP source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for PHPBench subjects (`bench*` methods, or `@Subject`/`#[Subject]` ones) in a file importing PhpBench or carrying its annotations, `bench*` methods in a `*Bench.php` file where PHPBench is installed, or phpbench/phpbench in a composer.json or a phpbench.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
PF3 Async & latency hygiene — Not applicable: PHP has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — X1 reached only 2% of this repository's production lines — php (31,262 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 — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no C# was loaded; this repository's PHP was read and makes no request a caller can cancel (amphp's HttpClient or connect) — synchronous PHP offers its callers no cancellation to take
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. PHP gives a request one thread of its own; the event-loop libraries (ReactPHP, Amp) run callbacks one at a time, and ext-parallel copies every value across its channels, so no array or collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
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.
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.
Project dependency cycle src/Config.php:8— The projects src → src/Config → src (one cycle inside a mutually-dependent group of 8 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
Circular dependency src/Config.php:8— src → src/Config → src (one cycle inside a mutually-dependent group of 8 modules)
Serious — 145 finding(s)
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (4 members, 50+ identical tokens) src/Plugin/Airwallex/V1/Pay/CancelPlugin.php:27— src/Plugin/Airwallex/V1/Pay/CancelPlugin.php:27-45 | src/Plugin/Airwallex/V1/Pay/QueryPlugin.php:24-40 | src/Plugin/Airwallex/V1/Pay/QueryRefundPlugin.php:24-40 | src/Plugin/Airwallex/V1/Pay/RefundPlugin.php:27-48 — 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) src/Plugin/Allinpay/Tranx/ClosePlugin.php:24— src/Plugin/Allinpay/Tranx/ClosePlugin.php:24-41 | src/Plugin/Allinpay/Tranx/QueryConfirmPlugin.php:24-41 | src/Plugin/Allinpay/Tranx/QueryPlugin.php:24-41 | src/Plugin/Allinpay/UnitOrder/NativeClosePlugin.php:24-41 — 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) src/Plugin/Wechat/V3/Marketing/Coupon/Coupons/DetailPlugin.php:35— src/Plugin/Wechat/V3/Marketing/Coupon/Coupons/DetailPlugin.php:35-58 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/PausePlugin.php:34-57 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryDetailPlugin.php:34-56 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/RestartPlugin.php:34-57 — 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) src/Plugin/Wechat/V3/Marketing/ECommerceRefund/QueryByWxPlugin.php:33— src/Plugin/Wechat/V3/Marketing/ECommerceRefund/QueryByWxPlugin.php:33-57 | src/Plugin/Wechat/V3/Marketing/ECommerceRefund/QueryPlugin.php:33-57 | src/Plugin/Wechat/V3/Marketing/ECommerceRefund/QueryReturnAdvancePlugin.php:33-57 | src/Plugin/Wechat/V3/Marketing/ECommerceRefund/ReturnAdvancePlugin.php:33-58 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (5 members, 50+ identical tokens) src/Plugin/Wechat/V3/Extend/Complaints/QueryDetailPlugin.php:37— src/Plugin/Wechat/V3/Extend/Complaints/QueryDetailPlugin.php:37-74 | src/Plugin/Wechat/V3/Extend/Complaints/QueryImagePlugin.php:25-41 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryRefundFlowPlugin.php:25-41 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryUseFlowPlugin.php:25-41 | src/Plugin/Wechat/V3/Pay/Combine/QueryPlugin.php:25-41 — 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.
Members sharing a duplicated core (5 members, 50+ identical tokens) src/Plugin/Wechat/V3/Pay/Combine/AppPayPlugin.php:34— src/Plugin/Wechat/V3/Pay/Combine/AppPayPlugin.php:34-57 | src/Plugin/Wechat/V3/Pay/Combine/H5PayPlugin.php:34-57 | src/Plugin/Wechat/V3/Pay/Combine/JsapiPayPlugin.php:34-57 | src/Plugin/Wechat/V3/Pay/Combine/MiniPayPlugin.php:34-57 | src/Plugin/Wechat/V3/Pay/Combine/NativePayPlugin.php:34-57 — 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.
Members sharing a duplicated core (5 members, 50+ identical tokens) src/Provider/Airwallex.php:132— src/Provider/Airwallex.php:132-144 | src/Provider/Apple.php:132-144 | src/Provider/Paypal.php:128-140 | src/Provider/Stripe.php:133-145 | src/Provider/Wechat.php:195-207 — 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.
Duplicated block (20 lines × 3) src/Plugin/Apple/Pay/QueryHistoryPlugin.php:24— src/Plugin/Apple/Pay/QueryHistoryPlugin.php:24-43 | src/Plugin/Apple/Pay/QueryPlugin.php:24-43 | src/Plugin/Apple/Pay/RefundPlugin.php:24-43 — 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 `src/Plugin/Apple/Pay/QueryHistoryPlugin.php:24` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (20 lines × 3) src/Plugin/Stripe/V1/Pay/CancelPlugin.php:24— src/Plugin/Stripe/V1/Pay/CancelPlugin.php:24-43 | src/Plugin/Stripe/V1/Pay/QueryPlugin.php:24-43 | src/Plugin/Stripe/V1/Pay/QueryRefundPlugin.php:24-43 — 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 `src/Plugin/Stripe/V1/Pay/CancelPlugin.php:24` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (20 lines × 3) src/Plugin/Wechat/V2/Pay/Pos/CancelPlugin.php:35— src/Plugin/Wechat/V2/Pay/Pos/CancelPlugin.php:35-54 | src/Plugin/Wechat/V2/Pay/Pos/PayPlugin.php:35-54 | src/Plugin/Wechat/V2/Pay/Pos/QueryPlugin.php:35-54 — before extracting anything, compare `src/Plugin/Wechat/V2/Pay/Pos/CancelPlugin.php` and `src/Plugin/Wechat/V2/Pay/Pos/PayPlugin.php` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V2/Pay/Pos/CancelPlugin.php:35` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 4) src/Plugin/Airwallex/V1/Pay/CancelPlugin.php:27— src/Plugin/Airwallex/V1/Pay/CancelPlugin.php:27-34 | src/Plugin/Airwallex/V1/Pay/QueryPlugin.php:24-31 | src/Plugin/Airwallex/V1/Pay/QueryRefundPlugin.php:24-31 | src/Plugin/Airwallex/V1/Pay/RefundPlugin.php:27-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Airwallex/V1/Pay/CancelPlugin.php:27` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 4) src/Plugin/Wechat/V3/Marketing/Coupon/Coupons/DetailPlugin.php:35— src/Plugin/Wechat/V3/Marketing/Coupon/Coupons/DetailPlugin.php:35-42 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/PausePlugin.php:34-41 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryDetailPlugin.php:34-41 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/RestartPlugin.php:34-41 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Marketing/Coupon/Coupons/DetailPlugin.php:35` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 4) src/Provider/Airwallex.php:112— src/Provider/Airwallex.php:112-119 | src/Provider/Apple.php:109-116 | src/Provider/Paypal.php:108-115 | src/Provider/Stripe.php:113-120 — before extracting anything, compare `src/Provider/Airwallex.php` and `src/Provider/Paypal.php` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: `CallbackPlugin` names `Yansongda\Pay\Plugin\Airwallex\V1\Pay\CallbackPlugin` in one and `Yansongda\Pay\Plugin\Apple\Pay\CallbackPlugin` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Off the main sequence: src/Action — src/Action: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: src/Event — src/Event: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: src/Exception — src/Exception: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
D4 · Code Duplication· Members sharing a duplicated core (12 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (12 members, 50+ identical tokens) src/Plugin/Unipay/Open/Pay/QrCode/CancelPlugin.php:31— src/Plugin/Unipay/Open/Pay/QrCode/CancelPlugin.php:31-57 | src/Plugin/Unipay/Open/Pay/QrCode/PosPlugin.php:31-58 | src/Plugin/Unipay/Open/Pay/QrCode/PosPreAuthPlugin.php:31-58 | src/Plugin/Unipay/Open/Pay/QrCode/QueryPlugin.php:31-56 | src/Plugin/Unipay/Open/Pay/QrCode/RefundPlugin.php:31-57 | src/Plugin/Unipay/Open/Pay/QrCode/ScanFeePlugin.php:31-58 | src/Plugin/Unipay/Open/Pay/QrCode/ScanPlugin.php:31-58 | src/Plugin/Unipay/Open/Pay/QrCode/ScanPreAuthPlugin.php:31-58 | src/Plugin/Unipay/Open/Pay/QrCode/ScanPreOrderPlugin.php:31-59 | src/Plugin/Unipay/Open/Pay/Web/CancelPlugin.php:31-57 | src/Plugin/Unipay/Open/Pay/Web/QueryPlugin.php:31-55 | src/Plugin/Unipay/Open/Pay/Web/RefundPlugin.php:31-57 — 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.
Members sharing a duplicated core (12 members, 50+ identical tokens) src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php:41— src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php:41-64 | src/Plugin/Wechat/V2/Pay/Mini/InvokePlugin.php:41-64 | src/Plugin/Wechat/V2/Pay/Mp/InvokePlugin.php:41-64 | src/Plugin/Wechat/V3/Marketing/Transfer/InvokeAndroidPlugin.php:39-65 | src/Plugin/Wechat/V3/Marketing/Transfer/InvokeIosPlugin.php:39-65 | src/Plugin/Wechat/V3/Marketing/Transfer/InvokeJsapiPlugin.php:39-65 | src/Plugin/Wechat/V3/Pay/App/InvokePlugin.php:42-65 | src/Plugin/Wechat/V3/Pay/Combine/AppInvokePlugin.php:42-65 | src/Plugin/Wechat/V3/Pay/Combine/JsapiInvokePlugin.php:43-66 | src/Plugin/Wechat/V3/Pay/Combine/MiniInvokePlugin.php:42-65 | src/Plugin/Wechat/V3/Pay/Jsapi/InvokePlugin.php:43-66 | src/Plugin/Wechat/V3/Pay/Mini/InvokePlugin.php:42-65 — 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· Edited copies of one member (3 members, 20+ corresponding lines) · ×2
Edited copies of one member (3 members, 20+ corresponding lines) src/Plugin/Airwallex/V1/Pay/CallbackPlugin.php:38— src/Plugin/Airwallex/V1/Pay/CallbackPlugin.php:38-58 | src/Plugin/Paypal/V2/Pay/CallbackPlugin.php:35-54 | src/Plugin/Stripe/V1/Pay/CallbackPlugin.php:35-55 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 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.
Edited copies of one member (3 members, 20+ corresponding lines) src/Plugin/Wechat/V3/Extend/ProfitSharing/QueryMerchantConfigsPlugin.php:33— src/Plugin/Wechat/V3/Extend/ProfitSharing/QueryMerchantConfigsPlugin.php:33-52 | src/Plugin/Wechat/V3/Marketing/ECommerceBalance/QueryDayEndPlugin.php:36-58 | src/Plugin/Wechat/V3/Marketing/ECommerceBalance/QueryPlugin.php:33-54 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 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 (17 corresponding lines) · ×2
Edited copy of a member (17 corresponding lines) src/Plugin/Alipay/V3/AddRadarPlugin.php:32— src/Plugin/Alipay/V3/AddRadarPlugin.php:32-48 | src/Plugin/Apple/AddRadarPlugin.php:35-52 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/Plugin/Apple/AddRadarPlugin.php:62— src/Plugin/Apple/AddRadarPlugin.php:62-78 | src/Plugin/Stripe/V1/AddRadarPlugin.php:60-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 copy of a member (16 corresponding lines) · ×2
Edited copy of a member (16 corresponding lines) src/Plugin/Unipay/Qra/VerifySignaturePlugin.php:34— src/Plugin/Unipay/Qra/VerifySignaturePlugin.php:34-49 | src/Plugin/Wechat/V2/VerifySignaturePlugin.php:34-49 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/Plugin/Allinpay/VerifySignaturePlugin.php:37— src/Plugin/Allinpay/VerifySignaturePlugin.php:37-52 | src/Plugin/Bestpay/V1/VerifySignaturePlugin.php:42-59 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×2
Edited copy of a member (15 corresponding lines) src/Traits/UnipayTrait.php:87— src/Traits/UnipayTrait.php:87-101 | src/Traits/WechatTrait.php:112-128 — 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) src/Plugin/Douyin/V1/ObtainClientTokenPlugin.php:29— src/Plugin/Douyin/V1/ObtainClientTokenPlugin.php:29-43 | src/Plugin/Paypal/V2/ObtainAccessTokenPlugin.php:29-43 — 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 (5 corresponding lines) · ×2
Edited copy of a member (5 corresponding lines) src/Plugin/Wechat/V3/Pay/Combine/JsapiInvokePlugin.php:108— src/Plugin/Wechat/V3/Pay/Combine/JsapiInvokePlugin.php:108-112 | src/Plugin/Wechat/V3/Pay/Jsapi/InvokePlugin.php:108-112 — 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) src/Enum/PayMode.php:33— src/Enum/PayMode.php:33-37 | src/Enum/Wechat/VirtualPayEnv.php:25-29 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×2
Edited copy of a member (10 corresponding lines) src/Shortcut/Wechat/CancelShortcut.php:31— src/Shortcut/Wechat/CancelShortcut.php:31-40 | src/Shortcut/Wechat/TransferShortcut.php:31-40 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/Plugin/Wechat/V3/Extend/ProfitSharing/DeleteReceiverPlugin.php:86— src/Plugin/Wechat/V3/Extend/ProfitSharing/DeleteReceiverPlugin.php:86-95 | src/Plugin/Wechat/V3/Pay/Jsapi/PayPlugin.php:87-97 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×2
Edited copy of a member (7 corresponding lines) src/Plugin/Wechat/V3/Marketing/Transfer/CreatePlugin.php:103— src/Plugin/Wechat/V3/Marketing/Transfer/CreatePlugin.php:103-111 | src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:137-143 — 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) src/Plugin/Alipay/V2/StartPlugin.php:113— src/Plugin/Alipay/V2/StartPlugin.php:113-119 | src/Traits/AlipayTrait.php:100-106 — 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.
Duplicated block (23 lines × 2) src/Plugin/Wechat/V3/Pay/App/PayPlugin.php:41— src/Plugin/Wechat/V3/Pay/App/PayPlugin.php:41-63 | src/Plugin/Wechat/V3/Pay/Mini/PayPlugin.php:41-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Pay/App/PayPlugin.php:41` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (23 lines × 2) src/Plugin/Wechat/V3/PayScore/CreatePlugin.php:50— src/Plugin/Wechat/V3/PayScore/CreatePlugin.php:50-72 | src/Plugin/Wechat/V3/PayScore/Permissions/CreatePlugin.php:50-72 — before extracting anything, compare `src/Plugin/Wechat/V3/PayScore/CreatePlugin.php` and `src/Plugin/Wechat/V3/PayScore/Permissions/CreatePlugin.php` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/PayScore/CreatePlugin.php:50` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16 lines × 2) src/Plugin/Douyin/V1/Refund/AuditPlugin.php:28— src/Plugin/Douyin/V1/Refund/AuditPlugin.php:28-43 | src/Plugin/Douyin/V1/Refund/QueryPlugin.php:28-43 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Douyin/V1/Refund/AuditPlugin.php:28` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16 lines × 2) src/Plugin/Wechat/V3/Marketing/ECommerceBalance/QueryDayEndPlugin.php:43— src/Plugin/Wechat/V3/Marketing/ECommerceBalance/QueryDayEndPlugin.php:43-58 | src/Plugin/Wechat/V3/Marketing/ECommerceBalance/QueryPlugin.php:39-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Marketing/ECommerceBalance/QueryDayEndPlugin.php:43` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 2) src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:108— src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:108-119 | src/Plugin/Wechat/V3/Extend/ProfitSharing/CreatePlugin.php:108-119 — before extracting anything, compare `src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php` and `src/Plugin/Wechat/V3/Extend/ProfitSharing/CreatePlugin.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) src/Plugin/Alipay/V2/Open/Authorization/TokenAppPlugin.php:21— src/Plugin/Alipay/V2/Open/Authorization/TokenAppPlugin.php:21-32 | src/Plugin/Alipay/V2/Open/Authorization/TokenAppQueryPlugin.php:21-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Alipay/V2/Open/Authorization/TokenAppPlugin.php:21` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 3) src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php:73— src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php:73-84 | src/Plugin/Wechat/V2/Pay/Mini/InvokePlugin.php:73-83 | src/Plugin/Wechat/V2/Pay/Mp/InvokePlugin.php:73-83 — `src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php` and `src/Plugin/Wechat/V2/Pay/Mini/InvokePlugin.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 4 separate duplicated blocks between them, totalling at least 44 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 × 3) src/Provider/Allinpay.php:145— src/Provider/Allinpay.php:145-155 | src/Provider/Jsb.php:131-141 | src/Provider/Unipay.php:135-145 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The 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) src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php:89— src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php:89-93 | src/Plugin/Wechat/V3/Pay/App/InvokePlugin.php:103-107 | src/Plugin/Wechat/V3/Pay/Combine/AppInvokePlugin.php:103-107 — before extracting anything, compare `src/Plugin/Wechat/V3/Pay/App/InvokePlugin.php` and `src/Plugin/Wechat/V3/Pay/Combine/AppInvokePlugin.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) src/Plugin/Wechat/V2/Pay/Mini/InvokePlugin.php:88— src/Plugin/Wechat/V2/Pay/Mini/InvokePlugin.php:88-92 | src/Plugin/Wechat/V3/Pay/Combine/MiniInvokePlugin.php:102-106 | src/Plugin/Wechat/V3/Pay/Mini/InvokePlugin.php:102-106 — before extracting anything, compare `src/Plugin/Wechat/V3/Pay/Combine/MiniInvokePlugin.php` and `src/Plugin/Wechat/V3/Pay/Mini/InvokePlugin.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryItemsPlugin.php:63— src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryItemsPlugin.php:63-69 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryMerchantsPlugin.php:63-69 — before extracting anything, compare `src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryItemsPlugin.php` and `src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryMerchantsPlugin.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 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 × 2) src/Traits/UnipayTrait.php:45— src/Traits/UnipayTrait.php:45-51 | src/Traits/WechatTrait.php:78-84 — 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.
Low contrast colour pair in CSS (2.8:1) web/.vitepress/theme/components/Home/Primary.vue:36— `&.primary` sets color: #fff on background-color: #3eaf7c — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
JwsVerifier.verifyNode (cyclomatic 24) src/Crypto/Apple/JwsVerifier.php:125— JwsVerifier.verifyNode 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.
TokenVerifier.parsePkcs7Signer (cyclomatic 24) src/Crypto/Apple/TokenVerifier.php:163— TokenVerifier.parsePkcs7Signer 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.
TokenVerifier.verifySignedAttrs (cyclomatic 21) src/Crypto/Apple/TokenVerifier.php:290— TokenVerifier.verifySignedAttrs has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TokenVerifier.verify (cyclomatic 19) src/Crypto/Apple/TokenVerifier.php:54— TokenVerifier.verify has cyclomatic complexity 19 (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.
TodoComment src/Traits/BestpayTrait.php:149— // TODO(联调确认后收敛):沙箱/生产确认响应与回调的实际哈希算法后,收敛为单一算法并移除另一分支。 — 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.
JwsVerifier.verifyNode (cognitive 27) src/Crypto/Apple/JwsVerifier.php:125— JwsVerifier.verifyNode has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 6, loops 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.
TokenVerifier.parsePkcs7Signer (cognitive 27) src/Crypto/Apple/TokenVerifier.php:163— TokenVerifier.parsePkcs7Signer has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 10, loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TokenVerifier.verifySignedAttrs (cognitive 26) src/Crypto/Apple/TokenVerifier.php:290— TokenVerifier.verifySignedAttrs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 6, ternaries 2 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TokenVerifier.verify (cognitive 18) src/Crypto/Apple/TokenVerifier.php:54— TokenVerifier.verify has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 8. 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.
TooManyMethods: WechatConfig src/Config/WechatConfig.php:13— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Change coupling: Alipay.php ↔ Wechat.php src/Provider/Alipay.php:1— `src/Provider/Alipay.php` and `src/Provider/Wechat.php` change together 51% of the time (18 of the 35 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 18 shared commits counted here, the most recent 3 are `1cbe8d86` fix: 微信关闭订单报解包错误的问题 (#1000); `63de1841` docs: 优化注释 && 增加单测 (#916); `381591c0` change: close 的 API 参数只支持 array,不再支持 string (#901) — run `git show` on any of them.
D4 · Code Duplication· Near-duplicate member family (3 members, 16 shared lines) · ×1
Near-duplicate member family (3 members, 16 shared lines) src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:41— src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:41-68 | src/Plugin/Wechat/V3/Extend/ProfitSharing/CreatePlugin.php:41-68 | src/Plugin/Wechat/V3/Extend/ProfitSharing/DeleteReceiverPlugin.php:37-64 — These 3 members are variants of one another: a block of 16 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· Members sharing a duplicated core (16 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (16 members, 50+ identical tokens) src/Plugin/Wechat/V3/Extend/Complaints/QueryPlugin.php:27— src/Plugin/Wechat/V3/Extend/Complaints/QueryPlugin.php:27-45 | src/Plugin/Wechat/V3/Extend/ProfitSharing/GetBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/App/GetFundBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/App/GetTradeBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Bill/GetFundPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Bill/GetTradePlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Combine/GetFundBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Combine/GetTradeBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/H5/GetFundBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/H5/GetTradeBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Jsapi/GetFundBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Jsapi/GetTradeBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Mini/GetFundBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Mini/GetTradeBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Native/GetFundBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Native/GetTradeBillPlugin.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 (11 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (11 members, 50+ identical tokens) src/Plugin/Wechat/V3/Extend/ProfitSharing/ReturnPlugin.php:35— src/Plugin/Wechat/V3/Extend/ProfitSharing/ReturnPlugin.php:35-62 | src/Plugin/Wechat/V3/Extend/ProfitSharing/UnfreezePlugin.php:35-62 | src/Plugin/Wechat/V3/Pay/App/PayPlugin.php:35-63 | src/Plugin/Wechat/V3/Pay/App/RefundPlugin.php:35-63 | src/Plugin/Wechat/V3/Pay/Combine/RefundPlugin.php:35-63 | src/Plugin/Wechat/V3/Pay/H5/RefundPlugin.php:35-63 | src/Plugin/Wechat/V3/Pay/Jsapi/RefundPlugin.php:35-63 | src/Plugin/Wechat/V3/Pay/Mini/PayPlugin.php:35-63 | src/Plugin/Wechat/V3/Pay/Mini/RefundPlugin.php:35-63 | src/Plugin/Wechat/V3/Pay/Native/RefundPlugin.php:35-63 | src/Plugin/Wechat/V3/Pay/Refund/RefundPlugin.php:35-63 — 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) src/Plugin/Unipay/Qra/Pos/CancelPlugin.php:26— src/Plugin/Unipay/Qra/Pos/CancelPlugin.php:26-45 | src/Plugin/Unipay/Qra/Pos/PayPlugin.php:26-45 | src/Plugin/Unipay/Qra/Pos/QueryOpenIdPlugin.php:26-45 | src/Plugin/Unipay/Qra/Pos/QueryPlugin.php:26-45 | src/Plugin/Unipay/Qra/Pos/QueryRefundPlugin.php:26-45 | src/Plugin/Unipay/Qra/Pos/RefundPlugin.php:26-45 | src/Plugin/Unipay/Qra/Scan/ClosePlugin.php:26-45 | src/Plugin/Unipay/Qra/Scan/QueryPlugin.php:26-45 | src/Plugin/Unipay/Qra/Scan/QueryRefundPlugin.php:26-45 | src/Plugin/Unipay/Qra/Scan/RefundPlugin.php:26-45 — 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) src/Plugin/Wechat/V3/Extend/ProfitSharing/DownloadBillPlugin.php:26— src/Plugin/Wechat/V3/Extend/ProfitSharing/DownloadBillPlugin.php:26-43 | src/Plugin/Wechat/V3/Marketing/Fapiao/Blockchain/DownloadPlugin.php:27-44 | src/Plugin/Wechat/V3/Pay/App/DownloadBillPlugin.php:26-43 | src/Plugin/Wechat/V3/Pay/Bill/DownloadPlugin.php:26-43 | src/Plugin/Wechat/V3/Pay/Combine/DownloadBillPlugin.php:26-43 | src/Plugin/Wechat/V3/Pay/H5/DownloadBillPlugin.php:26-43 | src/Plugin/Wechat/V3/Pay/Jsapi/DownloadBillPlugin.php:26-43 | src/Plugin/Wechat/V3/Pay/Mini/DownloadBillPlugin.php:26-43 | src/Plugin/Wechat/V3/Pay/Native/DownloadBillPlugin.php:26-43 — 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 (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) src/Plugin/Airwallex/V1/Pay/CallbackPlugin.php:66— src/Plugin/Airwallex/V1/Pay/CallbackPlugin.php:66-75 | src/Plugin/Apple/Pay/CallbackPlugin.php:72-81 | src/Plugin/Paypal/V2/Pay/CallbackPlugin.php:62-71 | src/Plugin/Stripe/V1/Pay/CallbackPlugin.php:63-72 | src/Plugin/Wechat/V3/CallbackPlugin.php:71-80 | src/Plugin/Wechat/Virtual/CallbackPlugin.php:82-91 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Edited copy of a member (39 corresponding lines) · ×1
Edited copy of a member (39 corresponding lines) src/Plugin/Wechat/V3/PayScore/CreatePlugin.php:34— src/Plugin/Wechat/V3/PayScore/CreatePlugin.php:34-72 | src/Plugin/Wechat/V3/PayScore/Permissions/CreatePlugin.php:34-72 — These two members are one piece of code written twice and then edited apart: 39 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 (5 members, 30+ corresponding lines) · ×1
Edited copies of one member (5 members, 30+ corresponding lines) src/Plugin/Wechat/V3/Pay/App/ClosePlugin.php:36— src/Plugin/Wechat/V3/Pay/App/ClosePlugin.php:36-65 | src/Plugin/Wechat/V3/Pay/H5/ClosePlugin.php:36-65 | src/Plugin/Wechat/V3/Pay/Jsapi/ClosePlugin.php:36-65 | src/Plugin/Wechat/V3/Pay/Mini/ClosePlugin.php:36-65 | src/Plugin/Wechat/V3/Pay/Native/ClosePlugin.php:36-65 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) src/Traits/AirwallexTrait.php:64— src/Traits/AirwallexTrait.php:64-90 | src/Traits/PaypalTrait.php:59-88 — 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 copies of one member (6 members, 28+ corresponding lines) · ×1
Edited copies of one member (6 members, 28+ corresponding lines) src/Plugin/Wechat/V3/Pay/H5/PayPlugin.php:36— src/Plugin/Wechat/V3/Pay/H5/PayPlugin.php:36-64 | src/Plugin/Wechat/V3/Pay/Jsapi/PayPlugin.php:36-64 | src/Plugin/Wechat/V3/Pay/Native/PayPlugin.php:36-64 | src/Plugin/Wechat/V3/Pay/Pos/CancelPlugin.php:37-66 | src/Plugin/Wechat/V3/Pay/Pos/PayPlugin.php:37-64 | src/Plugin/Wechat/V3/Pay/Refund/RefundAbnormalPlugin.php:39-67 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 28 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 copies of one member (7 members, 24+ corresponding lines) · ×1
Edited copies of one member (7 members, 24+ corresponding lines) src/Plugin/Wechat/V3/Pay/App/QueryRefundPlugin.php:34— src/Plugin/Wechat/V3/Pay/App/QueryRefundPlugin.php:34-57 | src/Plugin/Wechat/V3/Pay/Combine/QueryRefundPlugin.php:34-57 | src/Plugin/Wechat/V3/Pay/H5/QueryRefundPlugin.php:34-57 | src/Plugin/Wechat/V3/Pay/Jsapi/QueryRefundPlugin.php:34-57 | src/Plugin/Wechat/V3/Pay/Mini/QueryRefundPlugin.php:34-57 | src/Plugin/Wechat/V3/Pay/Native/QueryRefundPlugin.php:34-57 | src/Plugin/Wechat/V3/Pay/Refund/QueryPlugin.php:34-57 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 27+ corresponding lines) · ×1
Edited copies of one member (4 members, 27+ corresponding lines) src/Plugin/Wechat/Openapi/Oauth/Code2SessionPlugin.php:35— src/Plugin/Wechat/Openapi/Oauth/Code2SessionPlugin.php:35-63 | src/Plugin/Wechat/Openapi/Oauth/RefreshTokenPlugin.php:35-64 | src/Plugin/Wechat/Openapi/Oauth/UserInfoPlugin.php:27-53 | src/Plugin/Wechat/Openapi/Oauth/WebAccessTokenPlugin.php:35-67 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×1
Edited copies of one member (3 members, 18+ corresponding lines) src/Plugin/Alipay/CallbackPlugin.php:37— src/Plugin/Alipay/CallbackPlugin.php:37-54 | src/Plugin/Alipay/V2/AppCallbackPlugin.php:37-58 | src/Plugin/Unipay/Open/CallbackPlugin.php:34-52 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 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) src/Plugin/Alipay/V2/AddRadarPlugin.php:32— src/Plugin/Alipay/V2/AddRadarPlugin.php:32-53 | src/Plugin/Allinpay/AddRadarPlugin.php:35-55 — 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 copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) src/Traits/AllinpayTrait.php:90— src/Traits/AllinpayTrait.php:90-114 | src/Traits/JsbTrait.php:36-54 — 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 copies of one member (4 members, 24+ corresponding lines) · ×1
Edited copies of one member (4 members, 24+ corresponding lines) src/Plugin/Allinpay/AddPayloadSignPlugin.php:36— src/Plugin/Allinpay/AddPayloadSignPlugin.php:36-60 | src/Plugin/Allinpay/Pay/ScanPlugin.php:35-59 | src/Plugin/Allinpay/Tranx/CancelPlugin.php:24-47 | src/Plugin/Allinpay/Tranx/RefundPlugin.php:35-62 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 18+ corresponding lines) · ×1
Edited copies of one member (7 members, 18+ corresponding lines) src/Plugin/Airwallex/V1/AddRadarPlugin.php:36— src/Plugin/Airwallex/V1/AddRadarPlugin.php:36-53 | src/Plugin/Douyin/V1/AddRadarPlugin.php:33-50 | src/Plugin/Jsb/AddRadarPlugin.php:29-46 | src/Plugin/Paypal/V2/AddRadarPlugin.php:33-50 | src/Plugin/Stripe/V1/AddRadarPlugin.php:35-52 | src/Plugin/Unipay/AddRadarPlugin.php:32-49 | src/Plugin/Wechat/AddRadarPlugin.php:31-48 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) src/Plugin/Unipay/Open/Pay/H5/PayPlugin.php:31— src/Plugin/Unipay/Open/Pay/H5/PayPlugin.php:31-59 | src/Plugin/Unipay/Open/Pay/Web/PayPlugin.php:32-61 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×1
Edited copy of a member (14 corresponding lines) src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:108— src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:108-121 | src/Plugin/Wechat/V3/Extend/ProfitSharing/CreatePlugin.php:108-121 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×1
Edited copy of a member (25 corresponding lines) src/Plugin/Airwallex/V1/Pay/ConfirmPlugin.php:27— src/Plugin/Airwallex/V1/Pay/ConfirmPlugin.php:27-51 | src/Plugin/Airwallex/V1/Pay/PayPlugin.php:30-57 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×1
Edited copy of a member (11 corresponding lines) src/Shortcut/Unipay/CancelShortcut.php:35— src/Shortcut/Unipay/CancelShortcut.php:35-45 | src/Shortcut/Unipay/RefundShortcut.php:35-45 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×1
Edited copy of a member (13 corresponding lines) src/Plugin/Alipay/V3/VerifySignaturePlugin.php:37— src/Plugin/Alipay/V3/VerifySignaturePlugin.php:37-49 | src/Plugin/Wechat/V3/VerifySignaturePlugin.php:39-51 — 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 copies of one member (4 members, 10+ corresponding lines) · ×1
Edited copies of one member (4 members, 10+ corresponding lines) src/Shortcut/Airwallex/QueryShortcut.php:31— src/Shortcut/Airwallex/QueryShortcut.php:31-40 | src/Shortcut/Douyin/QueryShortcut.php:35-45 | src/Shortcut/Paypal/QueryShortcut.php:31-40 | src/Shortcut/Stripe/QueryShortcut.php:29-38 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 11+ corresponding lines) · ×1
Edited copies of one member (7 members, 11+ corresponding lines) src/Traits/AirwallexTrait.php:35— src/Traits/AirwallexTrait.php:35-45 | src/Traits/AllinpayTrait.php:25-35 | src/Traits/AppleTrait.php:42-52 | src/Traits/DouyinTrait.php:37-47 | src/Traits/PaypalTrait.php:35-45 | src/Traits/StripeTrait.php:28-38 | src/Traits/UnipayTrait.php:27-37 — These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×1
Edited copy of a member (8 corresponding lines) src/Plugin/Alipay/V2/ResponseHtmlPlugin.php:61— src/Plugin/Alipay/V2/ResponseHtmlPlugin.php:61-69 | src/Plugin/Unipay/Open/ResponseHtmlPlugin.php:39-46 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×1
Edited copy of a member (3 corresponding lines) src/Plugin/Alipay/V3/VerifySignaturePlugin.php:116— src/Plugin/Alipay/V3/VerifySignaturePlugin.php:116-118 | src/Traits/WechatTrait.php:481-483 — 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.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×1
Edited copy of a member (9 corresponding lines) src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:84— src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:84-92 | src/Plugin/Wechat/V3/Extend/ProfitSharing/CreatePlugin.php:84-92 — 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 (40 lines × 5) src/Plugin/Wechat/V3/PayScore/CancelPlugin.php:35— src/Plugin/Wechat/V3/PayScore/CancelPlugin.php:35-74 | src/Plugin/Wechat/V3/PayScore/CompletePlugin.php:35-74 | src/Plugin/Wechat/V3/PayScore/ModifyPlugin.php:34-73 | src/Plugin/Wechat/V3/PayScore/PayPlugin.php:34-73 | src/Plugin/Wechat/V3/PayScore/SyncPlugin.php:35-74 — 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 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/PayScore/CancelPlugin.php:35` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (25–29 lines × 12) src/Plugin/Unipay/Open/Pay/QrCode/CancelPlugin.php:31— src/Plugin/Unipay/Open/Pay/QrCode/CancelPlugin.php:31-57 | src/Plugin/Unipay/Open/Pay/QrCode/PosPlugin.php:31-58 | src/Plugin/Unipay/Open/Pay/QrCode/PosPreAuthPlugin.php:31-58 | src/Plugin/Unipay/Open/Pay/QrCode/QueryPlugin.php:31-56 | src/Plugin/Unipay/Open/Pay/QrCode/RefundPlugin.php:31-57 | src/Plugin/Unipay/Open/Pay/QrCode/ScanFeePlugin.php:31-58 | src/Plugin/Unipay/Open/Pay/QrCode/ScanPlugin.php:31-58 | src/Plugin/Unipay/Open/Pay/QrCode/ScanPreAuthPlugin.php:31-58 | src/Plugin/Unipay/Open/Pay/QrCode/ScanPreOrderPlugin.php:31-59 | src/Plugin/Unipay/Open/Pay/Web/CancelPlugin.php:31-57 | src/Plugin/Unipay/Open/Pay/Web/QueryPlugin.php:31-55 | src/Plugin/Unipay/Open/Pay/Web/RefundPlugin.php:31-57 — before extracting anything, compare `src/Plugin/Unipay/Open/Pay/QrCode/CancelPlugin.php` and `src/Plugin/Unipay/Open/Pay/QrCode/RefundPlugin.php` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Unipay/Open/Pay/QrCode/CancelPlugin.php:31` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (25–26 lines × 4) src/Plugin/Wechat/V3/Marketing/ECommerceRefund/QueryByWxPlugin.php:33— src/Plugin/Wechat/V3/Marketing/ECommerceRefund/QueryByWxPlugin.php:33-57 | src/Plugin/Wechat/V3/Marketing/ECommerceRefund/QueryPlugin.php:33-57 | src/Plugin/Wechat/V3/Marketing/ECommerceRefund/QueryReturnAdvancePlugin.php:33-57 | src/Plugin/Wechat/V3/Marketing/ECommerceRefund/ReturnAdvancePlugin.php:33-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Marketing/ECommerceRefund/QueryByWxPlugin.php:33` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (22–25 lines × 2) src/Plugin/Wechat/V2/Papay/Direct/ApplyPlugin.php:36— src/Plugin/Wechat/V2/Papay/Direct/ApplyPlugin.php:36-57 | src/Plugin/Wechat/V2/Papay/Direct/ContractOrderPlugin.php:36-60 — before extracting anything, compare `src/Plugin/Wechat/V2/Papay/Direct/ApplyPlugin.php` and `src/Plugin/Wechat/V2/Papay/Direct/ContractOrderPlugin.php` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V2/Papay/Direct/ApplyPlugin.php:36` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (23 lines × 5) src/Plugin/Wechat/V3/Pay/App/ClosePlugin.php:43— src/Plugin/Wechat/V3/Pay/App/ClosePlugin.php:43-65 | src/Plugin/Wechat/V3/Pay/H5/ClosePlugin.php:43-65 | src/Plugin/Wechat/V3/Pay/Jsapi/ClosePlugin.php:43-65 | src/Plugin/Wechat/V3/Pay/Mini/ClosePlugin.php:43-65 | src/Plugin/Wechat/V3/Pay/Native/ClosePlugin.php:43-65 — `src/Plugin/Wechat/V3/Pay/H5/ClosePlugin.php` and `src/Plugin/Wechat/V3/Pay/Jsapi/ClosePlugin.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 2 separate duplicated blocks between them, totalling at least 36 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 `src/Plugin/Wechat/V3/Pay/App/ClosePlugin.php:43` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (22–23 lines × 4) src/Plugin/Wechat/V3/Pay/H5/PayPlugin.php:42— src/Plugin/Wechat/V3/Pay/H5/PayPlugin.php:42-64 | src/Plugin/Wechat/V3/Pay/Jsapi/PayPlugin.php:42-64 | src/Plugin/Wechat/V3/Pay/Native/PayPlugin.php:42-64 | src/Plugin/Wechat/V3/Pay/Pos/PayPlugin.php:43-64 — `src/Plugin/Wechat/V3/Pay/H5/PayPlugin.php` and `src/Plugin/Wechat/V3/Pay/Jsapi/PayPlugin.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 3 separate duplicated blocks between them, totalling at least 52 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 `src/Plugin/Wechat/V3/Pay/H5/PayPlugin.php:42` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (23 lines × 3) src/Plugin/Wechat/V3/Marketing/Transfer/CancelPlugin.php:33— src/Plugin/Wechat/V3/Marketing/Transfer/CancelPlugin.php:33-55 | src/Plugin/Wechat/V3/Marketing/Transfer/QueryByWxPlugin.php:33-55 | src/Plugin/Wechat/V3/Marketing/Transfer/QueryPlugin.php:33-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Marketing/Transfer/CancelPlugin.php:33` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (22 lines × 5) src/Plugin/Wechat/V3/Pay/Combine/AppPayPlugin.php:36— src/Plugin/Wechat/V3/Pay/Combine/AppPayPlugin.php:36-57 | src/Plugin/Wechat/V3/Pay/Combine/H5PayPlugin.php:36-57 | src/Plugin/Wechat/V3/Pay/Combine/JsapiPayPlugin.php:36-57 | src/Plugin/Wechat/V3/Pay/Combine/MiniPayPlugin.php:36-57 | src/Plugin/Wechat/V3/Pay/Combine/NativePayPlugin.php:36-57 — 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 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Pay/Combine/AppPayPlugin.php:36` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (21–22 lines × 3) src/Plugin/Wechat/V3/Marketing/Coupon/Stock/PausePlugin.php:36— src/Plugin/Wechat/V3/Marketing/Coupon/Stock/PausePlugin.php:36-57 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryDetailPlugin.php:36-56 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/RestartPlugin.php:36-57 — 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 `src/Plugin/Wechat/V3/Marketing/Coupon/Stock/PausePlugin.php:36` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (22 lines × 2) src/Plugin/Wechat/V3/Extend/ProfitSharing/QueryPlugin.php:34— src/Plugin/Wechat/V3/Extend/ProfitSharing/QueryPlugin.php:34-55 | src/Plugin/Wechat/V3/Extend/ProfitSharing/QueryReturnPlugin.php:34-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Extend/ProfitSharing/QueryPlugin.php:34` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (21 lines × 2) src/Plugin/Allinpay/Pay/NativePlugin.php:35— src/Plugin/Allinpay/Pay/NativePlugin.php:35-55 | src/Plugin/Allinpay/Pay/PayPlugin.php:35-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Allinpay/Pay/NativePlugin.php:35` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20–21 lines × 2) src/Plugin/Allinpay/Tranx/CancelPlugin.php:28— src/Plugin/Allinpay/Tranx/CancelPlugin.php:28-47 | src/Plugin/Allinpay/Tranx/RefundPlugin.php:42-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Allinpay/Tranx/CancelPlugin.php:28` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Plugin/Allinpay/Tranx/RefundPlugin.php:40` calls `getProviderConfig` and `src/Plugin/Allinpay/Tranx/CancelPlugin.php:26` 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 × 10) src/Plugin/Unipay/Qra/Pos/CancelPlugin.php:26— src/Plugin/Unipay/Qra/Pos/CancelPlugin.php:26-45 | src/Plugin/Unipay/Qra/Pos/PayPlugin.php:26-45 | src/Plugin/Unipay/Qra/Pos/QueryOpenIdPlugin.php:26-45 | src/Plugin/Unipay/Qra/Pos/QueryPlugin.php:26-45 | src/Plugin/Unipay/Qra/Pos/QueryRefundPlugin.php:26-45 | src/Plugin/Unipay/Qra/Pos/RefundPlugin.php:26-45 | src/Plugin/Unipay/Qra/Scan/ClosePlugin.php:26-45 | src/Plugin/Unipay/Qra/Scan/QueryPlugin.php:26-45 | src/Plugin/Unipay/Qra/Scan/QueryRefundPlugin.php:26-45 | src/Plugin/Unipay/Qra/Scan/RefundPlugin.php:26-45 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 10 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 10 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Unipay/Qra/Pos/CancelPlugin.php:26` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (20 lines × 7) src/Plugin/Wechat/V3/Pay/App/RefundPlugin.php:44— src/Plugin/Wechat/V3/Pay/App/RefundPlugin.php:44-63 | src/Plugin/Wechat/V3/Pay/Combine/RefundPlugin.php:44-63 | src/Plugin/Wechat/V3/Pay/H5/RefundPlugin.php:44-63 | src/Plugin/Wechat/V3/Pay/Jsapi/RefundPlugin.php:44-63 | src/Plugin/Wechat/V3/Pay/Mini/RefundPlugin.php:44-63 | src/Plugin/Wechat/V3/Pay/Native/RefundPlugin.php:44-63 | src/Plugin/Wechat/V3/Pay/Refund/RefundPlugin.php:44-63 — `src/Plugin/Wechat/V3/Pay/App/RefundPlugin.php` and `src/Plugin/Wechat/V3/Pay/Combine/RefundPlugin.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 3 separate duplicated blocks between them, totalling at least 52 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 `src/Plugin/Wechat/V3/Pay/App/RefundPlugin.php:44` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (20 lines × 2) src/Plugin/Alipay/V3/Pay/PosPlugin.php:35— src/Plugin/Alipay/V3/Pay/PosPlugin.php:35-54 | src/Plugin/Alipay/V3/Pay/PrecreatePlugin.php:35-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Alipay/V3/Pay/PosPlugin.php:35` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (19 lines × 16) src/Plugin/Wechat/V3/Extend/Complaints/QueryPlugin.php:27— src/Plugin/Wechat/V3/Extend/Complaints/QueryPlugin.php:27-45 | src/Plugin/Wechat/V3/Extend/ProfitSharing/GetBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/App/GetFundBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/App/GetTradeBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Bill/GetFundPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Bill/GetTradePlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Combine/GetFundBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Combine/GetTradeBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/H5/GetFundBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/H5/GetTradeBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Jsapi/GetFundBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Jsapi/GetTradeBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Mini/GetFundBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Mini/GetTradeBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Native/GetFundBillPlugin.php:27-45 | src/Plugin/Wechat/V3/Pay/Native/GetTradeBillPlugin.php:27-45 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 16 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 16 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Extend/Complaints/QueryPlugin.php:27` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (19 lines × 7) src/Plugin/Wechat/V3/Pay/App/QueryRefundPlugin.php:39— src/Plugin/Wechat/V3/Pay/App/QueryRefundPlugin.php:39-57 | src/Plugin/Wechat/V3/Pay/Combine/QueryRefundPlugin.php:39-57 | src/Plugin/Wechat/V3/Pay/H5/QueryRefundPlugin.php:39-57 | src/Plugin/Wechat/V3/Pay/Jsapi/QueryRefundPlugin.php:39-57 | src/Plugin/Wechat/V3/Pay/Mini/QueryRefundPlugin.php:39-57 | src/Plugin/Wechat/V3/Pay/Native/QueryRefundPlugin.php:39-57 | src/Plugin/Wechat/V3/Pay/Refund/QueryPlugin.php:39-57 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Pay/App/QueryRefundPlugin.php:39` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15–19 lines × 3) src/Plugin/Bestpay/V1/Pay/H5/PayPlugin.php:30— src/Plugin/Bestpay/V1/Pay/H5/PayPlugin.php:30-48 | src/Plugin/Bestpay/V1/Pay/Scan/PayPlugin.php:30-44 | src/Plugin/Bestpay/V1/Pay/Web/PayPlugin.php:30-48 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Bestpay/V1/Pay/H5/PayPlugin.php:30` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (19 lines × 3) src/Plugin/Wechat/V3/PayScore/CreatePlugin.php:36— src/Plugin/Wechat/V3/PayScore/CreatePlugin.php:36-54 | src/Plugin/Wechat/V3/PayScore/Permissions/CreatePlugin.php:36-54 | src/Plugin/Wechat/V3/PayScore/Permissions/TerminatePlugin.php:41-59 — before extracting anything, compare `src/Plugin/Wechat/V3/PayScore/CreatePlugin.php` and `src/Plugin/Wechat/V3/PayScore/Permissions/CreatePlugin.php` as WHOLE FILES: this scan already matched 3 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. 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 (18 lines × 4) src/Plugin/Allinpay/Tranx/ClosePlugin.php:24— src/Plugin/Allinpay/Tranx/ClosePlugin.php:24-41 | src/Plugin/Allinpay/Tranx/QueryConfirmPlugin.php:24-41 | src/Plugin/Allinpay/Tranx/QueryPlugin.php:24-41 | src/Plugin/Allinpay/UnitOrder/NativeClosePlugin.php:24-41 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Allinpay/Tranx/ClosePlugin.php:24` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (18 lines × 2) src/Plugin/Wechat/V3/Marketing/Fapiao/Blockchain/GetDownloadInfoPlugin.php:24— src/Plugin/Wechat/V3/Marketing/Fapiao/Blockchain/GetDownloadInfoPlugin.php:24-41 | src/Plugin/Wechat/V3/Marketing/Fapiao/QueryPlugin.php:24-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Marketing/Fapiao/Blockchain/GetDownloadInfoPlugin.php:24` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16–17 lines × 15) src/Plugin/Wechat/V3/Extend/Complaints/CompletePlugin.php:38— src/Plugin/Wechat/V3/Extend/Complaints/CompletePlugin.php:38-54 | src/Plugin/Wechat/V3/Marketing/Coupon/Coupons/QueryUserPlugin.php:44-59 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryItemsPlugin.php:43-58 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryMerchantsPlugin.php:43-58 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/StartPlugin.php:40-56 | src/Plugin/Wechat/V3/Pay/App/QueryByWxPlugin.php:41-56 | src/Plugin/Wechat/V3/Pay/App/QueryPlugin.php:41-56 | src/Plugin/Wechat/V3/Pay/H5/QueryByWxPlugin.php:41-56 | src/Plugin/Wechat/V3/Pay/H5/QueryPlugin.php:41-56 | src/Plugin/Wechat/V3/Pay/Jsapi/QueryByWxPlugin.php:41-56 | src/Plugin/Wechat/V3/Pay/Jsapi/QueryPlugin.php:41-56 | src/Plugin/Wechat/V3/Pay/Mini/QueryByWxPlugin.php:41-56 | src/Plugin/Wechat/V3/Pay/Mini/QueryPlugin.php:41-56 | src/Plugin/Wechat/V3/Pay/Native/QueryByWxPlugin.php:41-56 | src/Plugin/Wechat/V3/Pay/Native/QueryPlugin.php:41-56 — before extracting anything, compare `src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryItemsPlugin.php` and `src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryMerchantsPlugin.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Extend/Complaints/CompletePlugin.php:38` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16–17 lines × 9) src/Plugin/Wechat/V3/Extend/ProfitSharing/ReturnPlugin.php:41— src/Plugin/Wechat/V3/Extend/ProfitSharing/ReturnPlugin.php:41-56 | src/Plugin/Wechat/V3/Extend/ProfitSharing/UnfreezePlugin.php:41-56 | src/Plugin/Wechat/V3/Pay/App/RefundPlugin.php:41-57 | src/Plugin/Wechat/V3/Pay/Combine/RefundPlugin.php:41-57 | src/Plugin/Wechat/V3/Pay/H5/RefundPlugin.php:41-57 | src/Plugin/Wechat/V3/Pay/Jsapi/RefundPlugin.php:41-57 | src/Plugin/Wechat/V3/Pay/Mini/RefundPlugin.php:41-57 | src/Plugin/Wechat/V3/Pay/Native/RefundPlugin.php:41-57 | src/Plugin/Wechat/V3/Pay/Refund/RefundPlugin.php:41-57 — `src/Plugin/Wechat/V3/Pay/App/RefundPlugin.php` and `src/Plugin/Wechat/V3/Pay/Combine/RefundPlugin.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 3 separate duplicated blocks between them, totalling at least 52 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 `src/Plugin/Wechat/V3/Extend/ProfitSharing/ReturnPlugin.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.
Duplicated block (17 lines × 3) src/Plugin/Paypal/V2/Pay/CapturePlugin.php:24— src/Plugin/Paypal/V2/Pay/CapturePlugin.php:24-40 | src/Plugin/Paypal/V2/Pay/QueryPlugin.php:24-40 | src/Plugin/Paypal/V2/Pay/QueryRefundPlugin.php:24-40 — 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 `src/Plugin/Paypal/V2/Pay/CapturePlugin.php:24` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16 lines × 8) src/Plugin/Wechat/V3/Extend/ProfitSharing/DownloadBillPlugin.php:26— src/Plugin/Wechat/V3/Extend/ProfitSharing/DownloadBillPlugin.php:26-41 | src/Plugin/Wechat/V3/Pay/App/DownloadBillPlugin.php:26-41 | src/Plugin/Wechat/V3/Pay/Bill/DownloadPlugin.php:26-41 | src/Plugin/Wechat/V3/Pay/Combine/DownloadBillPlugin.php:26-41 | src/Plugin/Wechat/V3/Pay/H5/DownloadBillPlugin.php:26-41 | src/Plugin/Wechat/V3/Pay/Jsapi/DownloadBillPlugin.php:26-41 | src/Plugin/Wechat/V3/Pay/Mini/DownloadBillPlugin.php:26-41 | src/Plugin/Wechat/V3/Pay/Native/DownloadBillPlugin.php:26-41 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Extend/ProfitSharing/DownloadBillPlugin.php:26` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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 (15–16 lines × 7) src/Plugin/Wechat/V3/PayScore/CancelPlugin.php:54— src/Plugin/Wechat/V3/PayScore/CancelPlugin.php:54-68 | src/Plugin/Wechat/V3/PayScore/CompletePlugin.php:54-68 | src/Plugin/Wechat/V3/PayScore/CreatePlugin.php:53-68 | src/Plugin/Wechat/V3/PayScore/ModifyPlugin.php:53-67 | src/Plugin/Wechat/V3/PayScore/PayPlugin.php:53-67 | src/Plugin/Wechat/V3/PayScore/Permissions/CreatePlugin.php:53-68 | src/Plugin/Wechat/V3/PayScore/SyncPlugin.php:54-68 — before extracting anything, compare `src/Plugin/Wechat/V3/PayScore/CreatePlugin.php` and `src/Plugin/Wechat/V3/PayScore/Permissions/CreatePlugin.php` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/PayScore/CancelPlugin.php:54` 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, `src/Plugin/Wechat/V3/PayScore/CancelPlugin.php:70` calls `getPayload`, `forget` and `src/Plugin/Wechat/V3/PayScore/CreatePlugin.php:70` 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 (16 lines × 3) src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:47— src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:47-62 | src/Plugin/Wechat/V3/Extend/ProfitSharing/CreatePlugin.php:47-62 | src/Plugin/Wechat/V3/Extend/ProfitSharing/DeleteReceiverPlugin.php:43-58 — before extracting anything, compare `src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php` and `src/Plugin/Wechat/V3/Extend/ProfitSharing/CreatePlugin.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:47` 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–16 lines × 2) src/Plugin/Douyin/V1/GetClientTokenPlugin.php:70— src/Plugin/Douyin/V1/GetClientTokenPlugin.php:70-84 | src/Plugin/Douyin/V1/ResponsePlugin.php:42-57 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Douyin/V1/GetClientTokenPlugin.php:70` 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 × 5) src/Plugin/Wechat/V3/Extend/Complaints/QueryDetailPlugin.php:37— src/Plugin/Wechat/V3/Extend/Complaints/QueryDetailPlugin.php:37-51 | src/Plugin/Wechat/V3/Extend/Complaints/QueryImagePlugin.php:25-39 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryRefundFlowPlugin.php:25-39 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryUseFlowPlugin.php:25-39 | src/Plugin/Wechat/V3/Pay/Combine/QueryPlugin.php:25-39 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Extend/Complaints/QueryDetailPlugin.php:37` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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 (15 lines × 3) src/Plugin/Allinpay/Pay/NativePlugin.php:43— src/Plugin/Allinpay/Pay/NativePlugin.php:43-57 | src/Plugin/Allinpay/Pay/PayPlugin.php:43-57 | src/Plugin/Allinpay/Pay/ScanPlugin.php:43-59 — 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 `src/Plugin/Allinpay/Pay/NativePlugin.php:43` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) src/Plugin/Airwallex/V1/Pay/QueryPlugin.php:26— src/Plugin/Airwallex/V1/Pay/QueryPlugin.php:26-40 | src/Plugin/Airwallex/V1/Pay/QueryRefundPlugin.php:26-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Airwallex/V1/Pay/QueryPlugin.php:26` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 11) src/Plugin/Wechat/V3/Extend/ProfitSharing/ReturnPlugin.php:43— src/Plugin/Wechat/V3/Extend/ProfitSharing/ReturnPlugin.php:43-56 | src/Plugin/Wechat/V3/Extend/ProfitSharing/UnfreezePlugin.php:43-56 | src/Plugin/Wechat/V3/Pay/App/PayPlugin.php:43-57 | src/Plugin/Wechat/V3/Pay/App/RefundPlugin.php:43-57 | src/Plugin/Wechat/V3/Pay/Combine/RefundPlugin.php:43-57 | src/Plugin/Wechat/V3/Pay/H5/RefundPlugin.php:43-57 | src/Plugin/Wechat/V3/Pay/Jsapi/RefundPlugin.php:43-57 | src/Plugin/Wechat/V3/Pay/Mini/PayPlugin.php:43-57 | src/Plugin/Wechat/V3/Pay/Mini/RefundPlugin.php:43-57 | src/Plugin/Wechat/V3/Pay/Native/RefundPlugin.php:43-57 | src/Plugin/Wechat/V3/Pay/Refund/RefundPlugin.php:43-57 — `src/Plugin/Wechat/V3/Pay/App/RefundPlugin.php` and `src/Plugin/Wechat/V3/Pay/Combine/RefundPlugin.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 3 separate duplicated blocks between them, totalling at least 52 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 `src/Plugin/Wechat/V3/Extend/ProfitSharing/ReturnPlugin.php:43` 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, `src/Plugin/Wechat/V3/Extend/ProfitSharing/ReturnPlugin.php:41` calls `getPayload` and `src/Plugin/Wechat/V3/Pay/App/PayPlugin.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 (14 lines × 7) src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:49— src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:49-62 | src/Plugin/Wechat/V3/Extend/ProfitSharing/CreatePlugin.php:49-62 | src/Plugin/Wechat/V3/Extend/ProfitSharing/DeleteReceiverPlugin.php:45-58 | src/Plugin/Wechat/V3/Pay/H5/PayPlugin.php:44-58 | src/Plugin/Wechat/V3/Pay/Jsapi/PayPlugin.php:44-58 | src/Plugin/Wechat/V3/Pay/Native/PayPlugin.php:44-58 | src/Plugin/Wechat/V3/Pay/Pos/PayPlugin.php:45-58 — before extracting anything, compare `src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php` and `src/Plugin/Wechat/V3/Extend/ProfitSharing/CreatePlugin.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:49` 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, `src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:47` calls `getPayload` and `src/Plugin/Wechat/V3/Pay/H5/PayPlugin.php: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 (14 lines × 6) src/Plugin/Wechat/V3/Pay/App/InvokePlugin.php:42— src/Plugin/Wechat/V3/Pay/App/InvokePlugin.php:42-55 | src/Plugin/Wechat/V3/Pay/Combine/AppInvokePlugin.php:42-55 | src/Plugin/Wechat/V3/Pay/Combine/JsapiInvokePlugin.php:43-56 | src/Plugin/Wechat/V3/Pay/Combine/MiniInvokePlugin.php:42-55 | src/Plugin/Wechat/V3/Pay/Jsapi/InvokePlugin.php:43-56 | src/Plugin/Wechat/V3/Pay/Mini/InvokePlugin.php:42-55 — before extracting anything, compare `src/Plugin/Wechat/V3/Pay/App/InvokePlugin.php` and `src/Plugin/Wechat/V3/Pay/Combine/AppInvokePlugin.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Pay/App/InvokePlugin.php:42` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 3) src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php:41— src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php:41-54 | src/Plugin/Wechat/V2/Pay/Mini/InvokePlugin.php:41-54 | src/Plugin/Wechat/V2/Pay/Mp/InvokePlugin.php:41-54 — `src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php` and `src/Plugin/Wechat/V2/Pay/Mini/InvokePlugin.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 4 separate duplicated blocks between them, totalling at least 44 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 `src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php:41` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13–14 lines × 3) src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:50— src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:50-62 | src/Plugin/Wechat/V3/Extend/ProfitSharing/CreatePlugin.php:50-62 | src/Plugin/Wechat/V3/Pay/Refund/RefundAbnormalPlugin.php:49-62 — before extracting anything, compare `src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php` and `src/Plugin/Wechat/V3/Extend/ProfitSharing/CreatePlugin.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.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. 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–13 lines × 29) src/Plugin/Wechat/V3/Marketing/Coupon/Coupons/QueryUserPlugin.php:38— src/Plugin/Wechat/V3/Marketing/Coupon/Coupons/QueryUserPlugin.php:38-49 | src/Plugin/Wechat/V3/Marketing/Coupon/Coupons/SendPlugin.php:36-47 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryItemsPlugin.php:37-48 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryMerchantsPlugin.php:37-48 | src/Plugin/Wechat/V3/Marketing/Coupon/Stock/StartPlugin.php:34-45 | src/Plugin/Wechat/V3/Pay/App/ClosePlugin.php:36-47 | src/Plugin/Wechat/V3/Pay/App/QueryByWxPlugin.php:35-46 | src/Plugin/Wechat/V3/Pay/App/QueryPlugin.php:35-46 | src/Plugin/Wechat/V3/Pay/App/QueryRefundPlugin.php:34-45 | src/Plugin/Wechat/V3/Pay/Combine/ClosePlugin.php:35-46 | src/Plugin/Wechat/V3/Pay/Combine/QueryRefundPlugin.php:34-45 | src/Plugin/Wechat/V3/Pay/H5/ClosePlugin.php:36-47 | src/Plugin/Wechat/V3/Pay/H5/QueryByWxPlugin.php:35-46 | src/Plugin/Wechat/V3/Pay/H5/QueryPlugin.php:35-46 | src/Plugin/Wechat/V3/Pay/H5/QueryRefundPlugin.php:34-45 | src/Plugin/Wechat/V3/Pay/Jsapi/ClosePlugin.php:36-47 | src/Plugin/Wechat/V3/Pay/Jsapi/QueryByWxPlugin.php:35-46 | src/Plugin/Wechat/V3/Pay/Jsapi/QueryPlugin.php:35-46 | src/Plugin/Wechat/V3/Pay/Jsapi/QueryRefundPlugin.php:34-45 | src/Plugin/Wechat/V3/Pay/Mini/ClosePlugin.php:36-47 | src/Plugin/Wechat/V3/Pay/Mini/QueryByWxPlugin.php:35-46 | src/Plugin/Wechat/V3/Pay/Mini/QueryPlugin.php:35-46 | src/Plugin/Wechat/V3/Pay/Mini/QueryRefundPlugin.php:34-45 | src/Plugin/Wechat/V3/Pay/Native/ClosePlugin.php:36-47 | src/Plugin/Wechat/V3/Pay/Native/QueryByWxPlugin.php:35-46 | src/Plugin/Wechat/V3/Pay/Native/QueryPlugin.php:35-46 | src/Plugin/Wechat/V3/Pay/Native/QueryRefundPlugin.php:34-45 | src/Plugin/Wechat/V3/Pay/Pos/CancelPlugin.php:37-49 | src/Plugin/Wechat/V3/Pay/Refund/QueryPlugin.php:34-45 — before extracting anything, compare `src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryItemsPlugin.php` and `src/Plugin/Wechat/V3/Marketing/Coupon/Stock/QueryMerchantsPlugin.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Marketing/Coupon/Coupons/QueryUserPlugin.php:38` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Plugin/Wechat/V3/Pay/App/QueryRefundPlugin.php:47` calls `get`, `getSubMchId` and `src/Plugin/Wechat/V3/Marketing/Coupon/Coupons/QueryUserPlugin.php:51` 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 × 9) src/Plugin/Wechat/V3/Extend/ProfitSharing/DownloadBillPlugin.php:30— src/Plugin/Wechat/V3/Extend/ProfitSharing/DownloadBillPlugin.php:30-43 | src/Plugin/Wechat/V3/Marketing/Fapiao/Blockchain/DownloadPlugin.php:32-44 | src/Plugin/Wechat/V3/Pay/App/DownloadBillPlugin.php:30-43 | src/Plugin/Wechat/V3/Pay/Bill/DownloadPlugin.php:30-43 | src/Plugin/Wechat/V3/Pay/Combine/DownloadBillPlugin.php:30-43 | src/Plugin/Wechat/V3/Pay/H5/DownloadBillPlugin.php:30-43 | src/Plugin/Wechat/V3/Pay/Jsapi/DownloadBillPlugin.php:30-43 | src/Plugin/Wechat/V3/Pay/Mini/DownloadBillPlugin.php:30-43 | src/Plugin/Wechat/V3/Pay/Native/DownloadBillPlugin.php:30-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 9 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 9 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Extend/ProfitSharing/DownloadBillPlugin.php:30` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 8) src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:50— src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php:50-62 | src/Plugin/Wechat/V3/Extend/ProfitSharing/CreatePlugin.php:50-62 | src/Plugin/Wechat/V3/Extend/ProfitSharing/DeleteReceiverPlugin.php:46-58 | src/Plugin/Wechat/V3/Pay/H5/PayPlugin.php:45-58 | src/Plugin/Wechat/V3/Pay/Jsapi/PayPlugin.php:45-58 | src/Plugin/Wechat/V3/Pay/Native/PayPlugin.php:45-58 | src/Plugin/Wechat/V3/Pay/Pos/PayPlugin.php:46-58 | src/Plugin/Wechat/V3/Pay/Refund/RefundAbnormalPlugin.php:49-61 — before extracting anything, compare `src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.php` and `src/Plugin/Wechat/V3/Extend/ProfitSharing/CreatePlugin.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Extend/ProfitSharing/AddReceiverPlugin.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 (13 lines × 5) src/Provider/Airwallex.php:132— src/Provider/Airwallex.php:132-144 | src/Provider/Apple.php:132-144 | src/Provider/Paypal.php:128-140 | src/Provider/Stripe.php:133-145 | src/Provider/Wechat.php:195-207 — before extracting anything, compare `src/Provider/Airwallex.php` and `src/Provider/Paypal.php` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Provider/Airwallex.php:132` 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 (11–13 lines × 2) src/Plugin/Unipay/Open/AddPayloadSignaturePlugin.php:34— src/Plugin/Unipay/Open/AddPayloadSignaturePlugin.php:34-46 | src/Plugin/Unipay/Qra/AddPayloadSignaturePlugin.php:34-44 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Unipay/Open/AddPayloadSignaturePlugin.php:34` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) src/Plugin/Wechat/V3/Extend/Complaints/ResponsePlugin.php:41— src/Plugin/Wechat/V3/Extend/Complaints/ResponsePlugin.php:41-54 | src/Plugin/Wechat/V3/Extend/Complaints/UpdateRefundPlugin.php:29-41 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Extend/Complaints/ResponsePlugin.php:41` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 9) src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php:48— src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php:48-58 | src/Plugin/Wechat/V2/Pay/Mini/InvokePlugin.php:48-58 | src/Plugin/Wechat/V2/Pay/Mp/InvokePlugin.php:48-58 | src/Plugin/Wechat/V3/Pay/App/InvokePlugin.php:49-59 | src/Plugin/Wechat/V3/Pay/Combine/AppInvokePlugin.php:49-59 | src/Plugin/Wechat/V3/Pay/Combine/JsapiInvokePlugin.php:50-60 | src/Plugin/Wechat/V3/Pay/Combine/MiniInvokePlugin.php:49-59 | src/Plugin/Wechat/V3/Pay/Jsapi/InvokePlugin.php:50-60 | src/Plugin/Wechat/V3/Pay/Mini/InvokePlugin.php:49-59 — `src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php` and `src/Plugin/Wechat/V2/Pay/Mini/InvokePlugin.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 4 separate duplicated blocks between them, totalling at least 44 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 (10 lines × 6) src/Plugin/Airwallex/V1/Pay/CallbackPlugin.php:66— src/Plugin/Airwallex/V1/Pay/CallbackPlugin.php:66-75 | src/Plugin/Apple/Pay/CallbackPlugin.php:72-81 | src/Plugin/Paypal/V2/Pay/CallbackPlugin.php:62-71 | src/Plugin/Stripe/V1/Pay/CallbackPlugin.php:63-72 | src/Plugin/Wechat/V3/CallbackPlugin.php:71-80 | src/Plugin/Wechat/Virtual/CallbackPlugin.php:82-91 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times.
Duplicated block (10 lines × 2) src/Plugin/Wechat/V3/Extend/Complaints/CompletePlugin.php:34— src/Plugin/Wechat/V3/Extend/Complaints/CompletePlugin.php:34-43 | src/Plugin/Wechat/V3/Extend/Complaints/ResponsePlugin.php:34-43 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Extend/Complaints/CompletePlugin.php:34` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 2) src/Plugin/Wechat/V3/Pay/Pos/CancelPlugin.php:45— src/Plugin/Wechat/V3/Pay/Pos/CancelPlugin.php:45-53 | src/Plugin/Wechat/V3/Pay/Refund/RefundAbnormalPlugin.php:46-54 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 3) src/Plugin/Douyin/V1/GetClientTokenPlugin.php:68— src/Plugin/Douyin/V1/GetClientTokenPlugin.php:68-79 | src/Plugin/Douyin/V1/ResponsePlugin.php:40-52 | src/Plugin/Wechat/Openapi/ResponsePlugin.php:43-50 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Plugin/Douyin/V1/GetClientTokenPlugin.php:66` calls `validateResponse` and `src/Plugin/Wechat/Openapi/ResponsePlugin.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 (7 lines × 12) src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php:48— src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php:48-54 | src/Plugin/Wechat/V2/Pay/Mini/InvokePlugin.php:48-54 | src/Plugin/Wechat/V2/Pay/Mp/InvokePlugin.php:48-54 | src/Plugin/Wechat/V3/Marketing/Transfer/InvokeAndroidPlugin.php:52-58 | src/Plugin/Wechat/V3/Marketing/Transfer/InvokeIosPlugin.php:52-58 | src/Plugin/Wechat/V3/Marketing/Transfer/InvokeJsapiPlugin.php:52-58 | src/Plugin/Wechat/V3/Pay/App/InvokePlugin.php:49-55 | src/Plugin/Wechat/V3/Pay/Combine/AppInvokePlugin.php:49-55 | src/Plugin/Wechat/V3/Pay/Combine/JsapiInvokePlugin.php:50-56 | src/Plugin/Wechat/V3/Pay/Combine/MiniInvokePlugin.php:49-55 | src/Plugin/Wechat/V3/Pay/Jsapi/InvokePlugin.php:50-56 | src/Plugin/Wechat/V3/Pay/Mini/InvokePlugin.php:49-55 — `src/Plugin/Wechat/V2/Pay/App/InvokePlugin.php` and `src/Plugin/Wechat/V2/Pay/Mini/InvokePlugin.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 4 separate duplicated blocks between them, totalling at least 44 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Plugin/Wechat/V3/Marketing/Transfer/InvokeAndroidPlugin.php:48` calls `getMode`, `isService`, `InvalidParamsException` and `src/Plugin/Wechat/V3/Pay/App/InvokePlugin.php:47` 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 × 2) src/Traits/AirwallexTrait.php:66— src/Traits/AirwallexTrait.php:66-70 | src/Traits/PaypalTrait.php:61-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 121) src/Plugin/Airwallex/V1/GetAccessTokenPlugin.php:19— src/Plugin/Airwallex/V1/GetAccessTokenPlugin.php:19-29 | src/Plugin/Airwallex/V1/ObtainAccessTokenPlugin.php:32-40 | src/Plugin/Alipay/V2/Fund/Royalty/Query/OnsettlePlugin.php:19-28 | src/Plugin/Alipay/V2/Fund/Royalty/Query/RatePlugin.php:19-28 | src/Plugin/Alipay/V2/Fund/Royalty/Query/SettlePlugin.php:19-28 | src/Plugin/Alipay/V2/Fund/Royalty/Relation/BindPlugin.php:19-28 | src/Plugin/Alipay/V2/Fund/Royalty/Relation/QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Fund/Royalty/Relation/UnbindPlugin.php:19-28 | src/Plugin/Alipay/V2/Fund/Royalty/Request/SettleOrderPlugin.php:19-28 | src/Plugin/Alipay/V2/Fund/Transfer/ApplyReceiptPlugin.php:19-28 | src/Plugin/Alipay/V2/Fund/Transfer/Bill/QueryUrlPlugin.php:19-28 | src/Plugin/Alipay/V2/Fund/Transfer/Fund/QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Fund/Transfer/Fund/TransferPlugin.php:21-36 | src/Plugin/Alipay/V2/Fund/Transfer/QueryAccountPlugin.php:19-28 | src/Plugin/Alipay/V2/Fund/Transfer/QueryReceiptPlugin.php:19-28 | src/Plugin/Alipay/V2/Fund/Transfer/RefundPlugin.php:19-28 | src/Plugin/Alipay/V2/Member/Authorization/AuthPlugin.php:19-28 | src/Plugin/Alipay/V2/Member/Authorization/QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Member/Certification/CertifyPlugin.php:19-28 | src/Plugin/Alipay/V2/Member/Certification/InitPlugin.php:20-34 | src/Plugin/Alipay/V2/Member/Certification/QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Member/FaceCheck/AppInitPlugin.php:20-34 | src/Plugin/Alipay/V2/Member/FaceCheck/AppQueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Member/FaceVerification/AppInitPlugin.php:20-35 | src/Plugin/Alipay/V2/Member/FaceVerification/AppQueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Member/FaceVerification/H5InitPlugin.php:20-34 | src/Plugin/Alipay/V2/Member/FaceVerification/H5QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Member/FaceVerification/H5VerifyPlugin.php:19-28 | src/Plugin/Alipay/V2/Member/FaceVerification/ServerVerifyPlugin.php:19-33 | src/Plugin/Alipay/V2/Member/Ocr/AppInitPlugin.php:20-34 | src/Plugin/Alipay/V2/Member/Ocr/DetectPlugin.php:19-28 | src/Plugin/Alipay/V2/Member/Ocr/ServerDetectPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Agreement/Bill/QueryUrlPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Agreement/Pay/CancelPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Agreement/Pay/ClosePlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Agreement/Pay/QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Agreement/Pay/RefundPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Agreement/Sign/ModifyPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Agreement/Sign/QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Agreement/Sign/UnsignPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/App/ClosePlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/App/QueryBillUrlPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/App/QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/App/QueryRefundPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/App/RefundPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Authorization/Auth/CancelPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Authorization/Auth/PosFreezePlugin.php:20-35 | src/Plugin/Alipay/V2/Pay/Authorization/Auth/QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Authorization/Auth/ScanFreezePlugin.php:20-34 | src/Plugin/Alipay/V2/Pay/Authorization/Auth/UnfreezePlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Authorization/Bill/QueryUrlPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Authorization/Pay/ClosePlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Authorization/Pay/QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Authorization/Pay/QueryRefundPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Authorization/Pay/RefundPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Authorization/Pay/SyncPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Face/InitPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Face/QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/H5/ClosePlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/H5/QueryBillUrlPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/H5/QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/H5/QueryRefundPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/H5/RefundPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Mini/CancelPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Mini/ClosePlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Mini/QueryBillUrlPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Mini/QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Mini/QueryRefundPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Mini/RefundPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Pos/CancelPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Pos/ClosePlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Pos/QueryBillUrlPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Pos/QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Pos/QueryRefundPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Pos/RefundPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Scan/CancelPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Scan/ClosePlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Scan/QueryBillUrlPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Scan/QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Scan/QueryRefundPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Scan/RefundPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Web/ClosePlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Web/QueryBillUrlPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Web/QueryPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Web/QueryRefundPlugin.php:19-28 | src/Plugin/Alipay/V2/Pay/Web/RefundPlugin.php:19-28 | src/Plugin/Alipay/V3/Pay/CancelPlugin.php:23-32 | src/Plugin/Alipay/V3/Pay/QueryPlugin.php:23-32 | src/Plugin/Alipay/V3/Pay/RefundPlugin.php:24-33 | src/Plugin/Bestpay/V1/Pay/AggregateQueryPlugin.php:25-33 | src/Plugin/Bestpay/V1/Pay/ClosePlugin.php:25-33 | src/Plugin/Bestpay/V1/Pay/QueryPlugin.php:25-33 | src/Plugin/Bestpay/V1/Pay/RefundPlugin.php:25-33 | src/Plugin/Douyin/V1/Pay/QueryCpsPlugin.php:29-38 | src/Plugin/Douyin/V1/Pay/QueryPlugin.php:29-38 | src/Plugin/Jsb/Pay/Scan/QueryPlugin.php:19-28 | src/Plugin/Jsb/Pay/Scan/RefundPlugin.php:19-28 | src/Plugin/Paypal/V2/GetAccessTokenPlugin.php:22-32 | src/Plugin/Wechat/Openapi/GetStableTokenPlugin.php:22-31 | src/Plugin/Wechat/V3/Marketing/Fapiao/UpdateConfigPlugin.php:19-28 | src/Plugin/Wechat/Virtual/Currency/CancelCurrencyPayPlugin.php:27-36 | src/Plugin/Wechat/Virtual/Currency/CurrencyPayPlugin.php:27-36 | src/Plugin/Wechat/Virtual/Currency/PresentCurrencyPlugin.php:27-36 | src/Plugin/Wechat/Virtual/Currency/QueryBalancePlugin.php:27-36 | src/Plugin/Wechat/Virtual/Goods/QueryPublishGoodsPlugin.php:27-36 | src/Plugin/Wechat/Virtual/Goods/QueryUploadGoodsPlugin.php:27-36 | src/Plugin/Wechat/Virtual/Goods/StartPublishGoodsPlugin.php:27-36 | src/Plugin/Wechat/Virtual/Goods/StartUploadGoodsPlugin.php:27-36 | src/Plugin/Wechat/Virtual/Order/DownloadBillPlugin.php:27-36 | src/Plugin/Wechat/Virtual/Order/NotifyProvideGoodsPlugin.php:19-28 | src/Plugin/Wechat/Virtual/Order/QueryDownloadOrderPlugin.php:27-36 | src/Plugin/Wechat/Virtual/Order/QueryOrderPlugin.php:19-28 | src/Plugin/Wechat/Virtual/Order/RefundOrderPlugin.php:19-28 | src/Plugin/Wechat/Virtual/Order/StartDownloadOrderPlugin.php:27-36 | src/Plugin/Wechat/Virtual/Subscribe/CancelSubscribeContractPlugin.php:27-36 | src/Plugin/Wechat/Virtual/Subscribe/QuerySubscribeContractPlugin.php:27-36 | src/Plugin/Wechat/Virtual/Subscribe/SendSubscribePrePaymentPlugin.php:27-36 | src/Plugin/Wechat/Virtual/Subscribe/SubmitSubscribePayOrderPlugin.php:27-36 | src/Plugin/Wechat/Virtual/Withdraw/CreateWithdrawOrderPlugin.php:19-28 | src/Plugin/Wechat/Virtual/Withdraw/QueryBizBalancePlugin.php:27-36 | src/Plugin/Wechat/Virtual/Withdraw/QueryWithdrawOrderPlugin.php:19-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 121 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 121 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Airwallex/V1/GetAccessTokenPlugin.php:19` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 6) src/Plugin/Alipay/V2/Fund/PCreditPayInstallment/AppPayPlugin.php:20— src/Plugin/Alipay/V2/Fund/PCreditPayInstallment/AppPayPlugin.php:20-30 | src/Plugin/Alipay/V2/Marketing/Redpack/AppPayPlugin.php:21-37 | src/Plugin/Alipay/V2/Marketing/Redpack/WebPayPlugin.php:21-36 | src/Plugin/Alipay/V2/Pay/Agreement/Pay/AppPayPlugin.php:20-30 | src/Plugin/Alipay/V2/Pay/Agreement/Sign/SignPlugin.php:20-30 | src/Plugin/Alipay/V2/Pay/Authorization/Auth/AppFreezePlugin.php:21-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Alipay/V2/Fund/PCreditPayInstallment/AppPayPlugin.php:20` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 4) src/Plugin/Alipay/V2/Fund/PCreditPayInstallment/H5PayPlugin.php:30— src/Plugin/Alipay/V2/Fund/PCreditPayInstallment/H5PayPlugin.php:30-47 | src/Plugin/Alipay/V2/Pay/App/PayPlugin.php:29-41 | src/Plugin/Alipay/V2/Pay/H5/PayPlugin.php:29-41 | src/Plugin/Alipay/V2/Pay/Web/PayPlugin.php:30-47 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Alipay/V2/Fund/PCreditPayInstallment/H5PayPlugin.php:30` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 8) src/Plugin/Alipay/V2/Fund/PCreditPayInstallment/PosPayPlugin.php:29— src/Plugin/Alipay/V2/Fund/PCreditPayInstallment/PosPayPlugin.php:29-46 | src/Plugin/Alipay/V2/Fund/PCreditPayInstallment/ScanPayPlugin.php:28-39 | src/Plugin/Alipay/V2/Pay/Agreement/Pay/PayPlugin.php:29-45 | src/Plugin/Alipay/V2/Pay/Authorization/Pay/PayPlugin.php:29-45 | src/Plugin/Alipay/V2/Pay/Mini/PayPlugin.php:29-45 | src/Plugin/Alipay/V2/Pay/Pos/PayPlugin.php:28-44 | src/Plugin/Alipay/V2/Pay/Scan/CreatePlugin.php:28-39 | src/Plugin/Alipay/V2/Pay/Scan/PayPlugin.php:28-39 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Alipay/V2/Fund/PCreditPayInstallment/PosPayPlugin.php:29` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 3) src/Plugin/Allinpay/CallbackPlugin.php:63— src/Plugin/Allinpay/CallbackPlugin.php:63-69 | src/Plugin/Bestpay/V1/CallbackPlugin.php:67-73 | src/Plugin/Jsb/CallbackPlugin.php:66-72 — 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 (10 lines × 5) src/Plugin/Wechat/V3/Extend/Complaints/DeleteCallbackPlugin.php:20— src/Plugin/Wechat/V3/Extend/Complaints/DeleteCallbackPlugin.php:20-30 | src/Plugin/Wechat/V3/Extend/Complaints/QueryCallbackPlugin.php:20-30 | src/Plugin/Wechat/V3/Marketing/Fapiao/Blockchain/GetBaseInformationPlugin.php:19-28 | src/Plugin/Wechat/V3/Marketing/Fapiao/QueryConfigPlugin.php:19-28 | src/Plugin/Wechat/V3/WechatPublicCertsPlugin.php:16-25 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Extend/Complaints/DeleteCallbackPlugin.php:20` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) src/Plugin/Wechat/V3/Extend/Complaints/SetCallbackPlugin.php:20— src/Plugin/Wechat/V3/Extend/Complaints/SetCallbackPlugin.php:20-33 | src/Plugin/Wechat/V3/Extend/Complaints/UpdateCallbackPlugin.php:20-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Plugin/Wechat/V3/Extend/Complaints/SetCallbackPlugin.php:20` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 6) src/Plugin/Wechat/V3/Pay/App/InvokePlugin.php:93— src/Plugin/Wechat/V3/Pay/App/InvokePlugin.php:93-98 | src/Plugin/Wechat/V3/Pay/Combine/AppInvokePlugin.php:93-98 | src/Plugin/Wechat/V3/Pay/Combine/JsapiInvokePlugin.php:95-100 | src/Plugin/Wechat/V3/Pay/Combine/MiniInvokePlugin.php:92-97 | src/Plugin/Wechat/V3/Pay/Jsapi/InvokePlugin.php:95-100 | src/Plugin/Wechat/V3/Pay/Mini/InvokePlugin.php:92-97 — before extracting anything, compare `src/Plugin/Wechat/V3/Pay/App/InvokePlugin.php` and `src/Plugin/Wechat/V3/Pay/Combine/AppInvokePlugin.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) src/Provider/Allinpay.php:121— src/Provider/Allinpay.php:121-128 | src/Provider/Jsb.php:95-102 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: `CallbackPlugin` names `Yansongda\Pay\Plugin\Allinpay\CallbackPlugin` in one and `Yansongda\Pay\Plugin\Jsb\CallbackPlugin` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
P12 · CI test-gate honesty· Coverage collected but not gated · ×1
Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
Duplicated predicate src/Traits/AirwallexTrait.php:66— `!empty($config->getAccessToken()) && !empty($config->getAccessTokenExpiry()) && time() < $config` appears character-identically in 2 files — src/Traits/AirwallexTrait.php, src/Traits/PaypalTrait.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/Plugin/Alipay/V3/VerifySignaturePlugin.php:41— `!should_do_http_request($rocket->getDirection()) || is_null($rocket->getDestinationOrigin())` appears character-identically in 3 files — src/Plugin/Alipay/V3/VerifySignaturePlugin.php, src/Plugin/Wechat/Openapi/ResponsePlugin.php, src/Plugin/Wechat/V3/VerifySignaturePlugin.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/Plugin/Douyin/V1/GetClientTokenPlugin.php:81— `$destination instanceof Collection && 0 !== $destination` appears character-identically in 2 files — src/Plugin/Douyin/V1/GetClientTokenPlugin.php, src/Plugin/Douyin/V1/ResponsePlugin.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/Plugin/Allinpay/ResponsePlugin.php:46— `$destinationOrigin instanceof ResponseInterface && ($destinationOrigin->getStatusCode() < 200 || $destinationOrigin->getStatusCode() >= 300)` appears character-identically in 3 files — src/Plugin/Allinpay/ResponsePlugin.php, src/Plugin/Bestpay/V1/ResponsePlugin.php, src/Plugin/Jsb/ResponsePlugin.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/Plugin/Airwallex/V1/ResponsePlugin.php:43— `$response instanceof ResponseInterface && ($response->getStatusCode() < 200 || $response->getStatusCode() >= 300)` appears character-identically in 8 files — src/Plugin/Airwallex/V1/ResponsePlugin.php, src/Plugin/Apple/ResponsePlugin.php, src/Plugin/Douyin/V1/GetClientTokenPlugin.php, src/Plugin/Douyin/V1/ResponsePlugin.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/Traits/UnipayTrait.php:98— `'sign' != $k && '' != $v && !is_array($v)` appears character-identically in 2 files — src/Traits/UnipayTrait.php, src/Traits/WechatTrait.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/Plugin/Allinpay/Tranx/CancelPlugin.php:32— `empty($params['oldreqsn']) && empty($params['oldtrxid'])` appears character-identically in 4 files — src/Plugin/Allinpay/Tranx/CancelPlugin.php, src/Plugin/Allinpay/Tranx/ClosePlugin.php, src/Plugin/Allinpay/Tranx/RefundPlugin.php, src/Plugin/Allinpay/UnitOrder/NativeClosePlugin.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/Plugin/Allinpay/Tranx/QueryConfirmPlugin.php:28— `empty($params['reqsn']) && empty($params['trxid'])` appears character-identically in 2 files — src/Plugin/Allinpay/Tranx/QueryConfirmPlugin.php, src/Plugin/Allinpay/Tranx/QueryPlugin.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/Plugin/Allinpay/Tranx/CancelPlugin.php:28— `empty($params['reqsn']) || empty($params['trxamt'])` appears character-identically in 2 files — src/Plugin/Allinpay/Tranx/CancelPlugin.php, src/Plugin/Allinpay/Tranx/RefundPlugin.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/Provider/Airwallex.php:132— `is_array($contents) && isset($contents['body'], $contents['headers'])` appears character-identically in 6 files — src/Provider/Airwallex.php, src/Provider/Alipay.php, src/Provider/Apple.php, src/Provider/Paypal.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/Plugin/Wechat/V3/PayScore/CancelPlugin.php:40— `is_null($payload) || empty($outOrderNo = $payload->get('out_order_no'))` appears character-identically in 5 files — src/Plugin/Wechat/V3/PayScore/CancelPlugin.php, src/Plugin/Wechat/V3/PayScore/CompletePlugin.php, src/Plugin/Wechat/V3/PayScore/ModifyPlugin.php, src/Plugin/Wechat/V3/PayScore/PayPlugin.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/Plugin/Douyin/V1/Refund/AuditPlugin.php:32— `is_null($payload) || filter_params($payload)` appears character-identically in 3 files — src/Plugin/Douyin/V1/Refund/AuditPlugin.php, src/Plugin/Douyin/V1/Refund/QueryPlugin.php, src/Plugin/Douyin/V1/Refund/RefundPlugin.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/Plugin/Wechat/V3/PayScore/CreatePlugin.php:52— `is_null($serviceId) || '' === $serviceId` appears character-identically in 5 files — src/Plugin/Wechat/V3/PayScore/CreatePlugin.php, src/Plugin/Wechat/V3/PayScore/Permissions/CreatePlugin.php, src/Plugin/Wechat/V3/PayScore/Permissions/QueryPlugin.php, src/Plugin/Wechat/V3/PayScore/Permissions/TerminatePlugin.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.
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.
P1 · CI/CD gates· CI build step not evidenced · ×1
CI build step not evidenced — A CI pipeline exists but no build step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.
P3 · Security & performance tooling· Dependabot does not watch github-actions/npm · ×1
Dependabot does not watch github-actions/npm REDACTED:7— `REDACTED` schedules updates, but no `package-ecosystem` entry covers `github-actions`, `npm`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
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.
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.
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 01a1e96b-3524-759f-920e-23d70a0a50a2 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 15 · Warnings: 145 · Recommendations: 19 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 12:11 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.