Public report of likeadmin-likeshop/likeshop, 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, 18:05 UTC · Survey ID cd_cb9fc5e0c4084bab8dc74bb7dad5482a
likeadmin-likeshop/likeshop
Measured 17 November 2026, 18:03 UTC, at code version 7536930
Code coverage is not measured: Suite not runnable in-image.
Boundary Type-Coupling is not measured: Bounded contexts not declared.
Knowledge freshness is not measured: History too condensed to judge knowledge freshness.
CAI scoreAt risk
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 223,586 lines of product code in 5 projects, tests not counted · Estimated rebuild effort: about 1.1 person-years · Weakest lens: Production Readiness, 24.3
Findings by how serious they are
83 critical1352 serious73 minor
8 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, 18:03 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
65of 65 dimensions measured by tools.
1473of 1508 findings point to an exact file and line, so you can open each one in the code. The other 35 concern the repository as a whole, such as missing documentation.
65dimensions across 6 lenses, read from 223,586 lines of product code in 5 projects.
likeadmin-likeshop/likeshop is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back because two passwords or keys sit in the current code and we found no automated security scanning of the code, its secrets or its dependencies. It scores 30.8 out of 100, which the At risk rating leaves unchanged.
Production Readiness, at 24.3, is the weakest lens, level with Code Health, and counts most in the score. The best first step is replacing the two exposed passwords or keys and switching the old ones off, worth about 6.5 points. Replacing the weak hashes comes next, worth about 4.1 points. Raising Production Readiness to 70 would lift the score to about 37.2.
Seventy-three known security holes in the packages the code depends on can be used by attackers. Five passwords or keys in the code's history and two in the code are open to anyone who can read the repository. Updating the vulnerable packages and replacing each exposed password or key would close both risks. The three uses of packages that aren't listed need adding to the project's list of dependencies.
The product code is 223,586 lines, about €160,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 Production Readiness rose from 24.3 to 70, the lowest score rated Strong, the score would rise from 30.8 to about 37.2.
Code composition: what the lines of code are
Product code 100%Tests 0%
Rebuild cost: about €160,000 · Estimate
Cost to rebuild
€54,000 to €270,000, for 896 to 2,843 hours of work, about 1.1 person-years for 1 to 3 engineers
Difficulty of the problem
Low, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 31. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 223,586 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
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED.
Raises the score by about 6.5 points · Low effort · REDACTED Scanning
2
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (`System.IO.Hashing.XxHash64`/`Crc32`) where it only derives an identifier such as a cache key or a mutex name.
Run what this repository's stack ships: phpstan or psalm — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
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 €160,000 to build again, about 1.1 person-years of work. Its weakest lens is Production Readiness, at 24.3 (Critical). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 6.5 points for low effort, because it clears the 2 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.5 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 14% on every change. The history of the code shows how much it changes: about 213,435 lines over the last 90 days, which is about 865,598 lines a year. At that pace, the extra work comes to an estimated 136.6 to 819.5 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
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.
266 modules, with 115 dependencies between them. One loop runs through 4 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 226 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.
app.admin.cache uses app.common.cache, so a change to app.common.cache can break app.admin.cache, while a change to app.admin.cache can't break app.common.cache.
Position
Below the diagonal: app.admin.cache uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.kernel uses com.alipay.easysdk.kernel.util, so a change to com.alipay.easysdk.kernel.util can break com.alipay.easysdk.kernel, while a change to com.alipay.easysdk.kernel can't break com.alipay.easysdk.kernel.util.
Position
Below the diagonal: com.alipay.easysdk.kernel uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.kms.aliyun.credentials.provider uses com.alipay.easysdk.kms.aliyun.credentials, so a change to com.alipay.easysdk.kms.aliyun.credentials can break com.alipay.easysdk.kms.aliyun.credentials.provider, while a change to com.alipay.easysdk.kms.aliyun.credentials.provider can't break com.alipay.easysdk.kms.aliyun.credentials.
Position
Below the diagonal: com.alipay.easysdk.kms.aliyun.credentials.provider uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.kms.aliyun.credentials.provider uses com.alipay.easysdk.kms.aliyun.credentials.http, so a change to com.alipay.easysdk.kms.aliyun.credentials.http can break com.alipay.easysdk.kms.aliyun.credentials.provider, while a change to com.alipay.easysdk.kms.aliyun.credentials.provider can't break com.alipay.easysdk.kms.aliyun.credentials.http.
Position
Below the diagonal: com.alipay.easysdk.kms.aliyun.credentials.provider uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.kms.aliyun.credentials.utils uses com.alipay.easysdk.kms.aliyun.credentials, so a change to com.alipay.easysdk.kms.aliyun.credentials can break com.alipay.easysdk.kms.aliyun.credentials.utils, while a change to com.alipay.easysdk.kms.aliyun.credentials.utils can't break com.alipay.easysdk.kms.aliyun.credentials.
Position
Below the diagonal: com.alipay.easysdk.kms.aliyun.credentials.utils uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.kms.aliyun.credentials.utils uses com.alipay.easysdk.kms.aliyun.credentials.http, so a change to com.alipay.easysdk.kms.aliyun.credentials.http can break com.alipay.easysdk.kms.aliyun.credentials.utils, while a change to com.alipay.easysdk.kms.aliyun.credentials.utils can't break com.alipay.easysdk.kms.aliyun.credentials.http.
Position
Below the diagonal: com.alipay.easysdk.kms.aliyun.credentials.utils uses a module listed above it, which is the healthy direction.
think.console.output uses think.console.input, so a change to think.console.input can break think.console.output, while a change to think.console.output can't break think.console.input.
Position
Below the diagonal: think.console.output uses a module listed above it, which is the healthy direction.
11→31 think.console.output uses think.consolepart of a loop✕
Connections
4 pairs of types, where a type in think.console.output uses a type in think.console.
think.console.output uses think.console, so a change to think.console can break think.console.output, while a change to think.console.output can't break think.console.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→33 think.console.output uses thinkpart of a loop✕
Connections
1 pair of types, where a type in think.console.output uses a type in think.
The types involved
think.console.output.Descriptor → think.Console
Direction
think.console.output uses think, so a change to think can break think.console.output, while a change to think.console.output can't break think.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
com.alipay.easysdk.base.image uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.base.image, while a change to com.alipay.easysdk.base.image can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.base.image uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.base.oauth uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.base.oauth, while a change to com.alipay.easysdk.base.oauth can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.base.oauth uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.base.qrcode uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.base.qrcode, while a change to com.alipay.easysdk.base.qrcode can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.base.qrcode uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.base.video uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.base.video, while a change to com.alipay.easysdk.base.video can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.base.video uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.kms.aliyun uses com.alipay.easysdk.kernel.util, so a change to com.alipay.easysdk.kernel.util can break com.alipay.easysdk.kms.aliyun, while a change to com.alipay.easysdk.kms.aliyun can't break com.alipay.easysdk.kernel.util.
Position
Below the diagonal: com.alipay.easysdk.kms.aliyun uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.kms.aliyun uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.kms.aliyun, while a change to com.alipay.easysdk.kms.aliyun can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.kms.aliyun uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.kms.aliyun uses com.alipay.easysdk.kms.aliyun.credentials.provider, so a change to com.alipay.easysdk.kms.aliyun.credentials.provider can break com.alipay.easysdk.kms.aliyun, while a change to com.alipay.easysdk.kms.aliyun can't break com.alipay.easysdk.kms.aliyun.credentials.provider.
Position
Below the diagonal: com.alipay.easysdk.kms.aliyun uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.marketing.openlife uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.marketing.openlife, while a change to com.alipay.easysdk.marketing.openlife can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.marketing.openlife uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.marketing.pass uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.marketing.pass, while a change to com.alipay.easysdk.marketing.pass can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.marketing.pass uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.marketing.templatemessage uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.marketing.templatemessage, while a change to com.alipay.easysdk.marketing.templatemessage can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.marketing.templatemessage uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.member.identification uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.member.identification, while a change to com.alipay.easysdk.member.identification can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.member.identification uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.payment.app uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.payment.app, while a change to com.alipay.easysdk.payment.app can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.payment.app uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.payment.common uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.payment.common, while a change to com.alipay.easysdk.payment.common can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.payment.common uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.payment.facetoface uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.payment.facetoface, while a change to com.alipay.easysdk.payment.facetoface can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.payment.facetoface uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.payment.huabei uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.payment.huabei, while a change to com.alipay.easysdk.payment.huabei can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.payment.huabei uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.payment.page uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.payment.page, while a change to com.alipay.easysdk.payment.page can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.payment.page uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.payment.wap uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.payment.wap, while a change to com.alipay.easysdk.payment.wap can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.payment.wap uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.security.textrisk uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.security.textrisk, while a change to com.alipay.easysdk.security.textrisk can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.security.textrisk uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.util.aes uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.util.aes, while a change to com.alipay.easysdk.util.aes can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.util.aes uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.util.generic uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.util.generic, while a change to com.alipay.easysdk.util.generic can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.util.generic uses a module listed above it, which is the healthy direction.
think.console uses think.console.input, so a change to think.console.input can break think.console, while a change to think.console can't break think.console.input.
Position
Below the diagonal: think.console uses a module listed above it, which is the healthy direction.
think.console uses think.console.output, so a change to think.console.output can break think.console, while a change to think.console can't break think.console.output.
Position
Below the diagonal: think.console uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.kernel, so a change to com.alipay.easysdk.kernel can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.kernel.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.base.image, so a change to com.alipay.easysdk.base.image can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.base.image.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.base.oauth, so a change to com.alipay.easysdk.base.oauth can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.base.oauth.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.base.qrcode, so a change to com.alipay.easysdk.base.qrcode can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.base.qrcode.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.base.video, so a change to com.alipay.easysdk.base.video can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.base.video.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.marketing.openlife, so a change to com.alipay.easysdk.marketing.openlife can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.marketing.openlife.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.marketing.pass, so a change to com.alipay.easysdk.marketing.pass can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.marketing.pass.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.marketing.templatemessage, so a change to com.alipay.easysdk.marketing.templatemessage can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.marketing.templatemessage.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.member.identification, so a change to com.alipay.easysdk.member.identification can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.member.identification.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.payment.app, so a change to com.alipay.easysdk.payment.app can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.payment.app.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.payment.common, so a change to com.alipay.easysdk.payment.common can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.payment.common.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.payment.facetoface, so a change to com.alipay.easysdk.payment.facetoface can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.payment.facetoface.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.payment.huabei, so a change to com.alipay.easysdk.payment.huabei can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.payment.huabei.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.payment.page, so a change to com.alipay.easysdk.payment.page can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.payment.page.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.payment.wap, so a change to com.alipay.easysdk.payment.wap can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.payment.wap.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.security.textrisk, so a change to com.alipay.easysdk.security.textrisk can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.security.textrisk.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.util.aes, so a change to com.alipay.easysdk.util.aes can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.util.aes.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
com.alipay.easysdk.factory uses com.alipay.easysdk.util.generic, so a change to com.alipay.easysdk.util.generic can break com.alipay.easysdk.factory, while a change to com.alipay.easysdk.factory can't break com.alipay.easysdk.util.generic.
Position
Below the diagonal: com.alipay.easysdk.factory uses a module listed above it, which is the healthy direction.
think.console.command uses think.console, so a change to think.console can break think.console.command, while a change to think.console.command can't break think.console.
Position
Below the diagonal: think.console.command uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in think.exception uses a type in think.console.
The types involved
think.exception.Handle → think.console.Output
Direction
think.exception uses think.console, so a change to think.console can break think.exception, while a change to think.exception can't break think.console.
Position
Below the diagonal: think.exception uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in think.model.relation uses a type in think.db.
The types involved
think.model.relation.OneToOne → think.db.Query
Direction
think.model.relation uses think.db, so a change to think.db can break think.model.relation, while a change to think.model.relation can't break think.db.
Position
Below the diagonal: think.model.relation uses a module listed above it, which is the healthy direction.
think.model.relation uses think.model, so a change to think.model can break think.model.relation, while a change to think.model.relation can't break think.model.
Position
Below the diagonal: think.model.relation uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 24.3 · Critical · gated by D1, D2, R1, R7, X5 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2025 — Software Supply Chain Failures
98
High / Critical
A05:2025 — Injection
74
Medium
A07:2025 — Authentication Failures
8
High / Critical
A02:2025 — Security Misconfiguration
5
Medium
Roadmap
Top priorities: Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED; Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (`System.IO.Hashing.XxHash64`/`Crc32`) where it only derives an identifier such as a cache key or a mutex name; Run what this repository's stack ships: phpstan or psalm — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED.
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (`System.IO.Hashing.XxHash64`/`Crc32`) where it only derives an identifier such as a cache key or a mutex name.
Run what this repository's stack ships: phpstan or psalm — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Add a test runner (vitest / jest / playwright) and eslint and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as REDACTED scripts and run them in CI.
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
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 — 83
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 — 1352
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 — 73
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 8
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 65 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, 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 — 65 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, 1473 of 1508 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: the test suite could not be built/run in-image (commonly external-service dependencies — a database, a broker — we won't provision). To have it measured, make the suite runnable without them. For context only, test code is ≈ 0% of production LoC (151 test / 223,586 production) — a rough proxy, NOT a coverage measurement, so it is excluded from the score. You can widen what we reach: optional: make the suite runnable without a database, broker or other service we do not provision, and real coverage is measured on the next scan.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 44 test(s) behind this row are the ones the C# collector could read, and this repository also carries at least 3 test source file(s) (.php) that it cannot: it parses C# syntax and matches C# test attributes, so a vitest/jest/JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
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 reliability not scored — the test tier(s) ran but surfaced none of this repository's 44 test method(s) to the runner, so flakiness couldn't be exercised. This is an analysis-environment limitation, not a finding about the tests.
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 Maven/Gradle manifest(s) were read, stating a version for 16 dependency(ies) and leaving 0 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares REDACTED, but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares composer.json, but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its Composer dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D17 Explicit Debt — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 0 deducted marker(s) and the 0.0/KLoC density on this row were taken over this repository's .NET projects ALONE: .php (106,200 lines, 49% of production source), .vue (60,881 lines, 28% of production source) went unread, because every marker collector on this path is reached through a C# workspace. A read-only sweep of that source finds at least 16 task marker(s) (TODO/FIXME/HACK/XXX) across 9 file(s) that this score does not count — a floor, since only line comments are read there and D17's other eight marker kinds (suppressions, NoWarn, editorconfig severities, empty catches, commented-out code, Obsolete, dead code, preprocessor branches) need a compiler we do not have for that language. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
D23 Boundary Type-Coupling — 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. Large codebase (223,586 production LoC in the .NET projects) with no declared bounded contexts — cross-boundary type coupling is unassessed Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can 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 — 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. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
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.
D31 IaC & Container Security — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Checkov ran but its report could not be read (checkov produced no output — not a clean result). Every misconfiguration only checkov reports — most of its Terraform, CloudFormation, Bicep and Ansible policies — is absent from this card, so its absence here is not evidence those resources are configured correctly.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `server/public/mobile/static/js/chunk-vendors.0caca807.js`, `server/public/pc/_nuxt/6ee2ef1.js`, `server/public/pc/_nuxt/dd1e37e.js`, `server/public/static/plug/Kz-layedit/Content/Layui-KnifeZ/lay/modules/jquery.js`, `server/public/static/plug/Kz-layedit/Content/Layui-KnifeZ/layui.all.js`, … (+5 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
D34 Knowledge Freshness — git history too condensed for a reliable signal — The history looks squashed or freshly imported, so per-file ownership reflects those commits rather than real maintenance. This dimension is reported as a low-confidence advisory and is not scored.
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'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.
M3 Folder & project structure — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Whether the tests sit apart from production code is not visible here, because the suite is not in a form this pass reads. The test-separation credit is granted rather than withheld: this is a gap in the analyzer's language coverage, not a finding about the repository's tests. You can widen what we reach: keep the test surface somewhere a reader can find it without opening a binary — an exported/checked-in test source tree beside the production code makes the suite reviewable, diffable and discoverable by tooling.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P1 CI/CD gates — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
PF3 Async & latency hygiene — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 25 further occurrence(s) are not listed individually; the score already reflects all 65.
R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 158 further occurrence(s) are not listed individually; the score already reflects all 198.
R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 55 further occurrence(s) are not listed individually; the score already reflects all 95.
R7 Dead Code — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 272 further occurrence(s) are not listed individually; the score already reflects all 312.
X1 Async correctness — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 15 further occurrence(s) are not listed individually; the score already reflects all 55.
X12 Unreachable branch — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Document value interpolated into markup unescaped could not be assessed in this run — the check did not complete, so it is not scored. This is a gap in the analyzer, not a finding about this repository. Engine failure: ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index').
X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check'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.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala, Rust, Go, Swift, Erlang, F# and Visual Basic source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality 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.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
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.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
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.
168 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was dtree.layui.define() at 1124. A further 4 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 iconPicker.layui.define() at 31 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: server/public/static/plug/iconpicker/module/iconPicker/iconPicker.js (iconPicker.layui.define() at 31). 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.
+ 134 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 240 down to 240 or less in Cyclomatic Complexity — start with dtree.layui.define() (cyclomatic 1124), (anonymous) (cyclomatic 389). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 2.8 to about 4.6/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 234 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 22 bodies over 60 down to 60 or less in Cognitive Complexity — start with dtree.layui.define() (cognitive 308), popNode (cognitive 210), setNode (cognitive 198). — 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 22 together lifts Cognitive Complexity from 2.0 to about 5.0/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes9.2 / 10Stronggated by 58 serious findings✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 16 TooManyMethods finding(s) in God Classes — start with Query.php, Request.php, Connection.php. — One of this dimension's main actionable groups (16 warning-level).
Resolve the 15 FileTooLong finding(s) in God Classes — start with REDACTED, REDACTED, Query.php. — One of this dimension's main actionable groups (15 warning-level).
Resolve the 12 FunctionTooLong finding(s) in God Classes — start with REDACTED (3), REDACTED (3), MpHtmlParser.js (2). — One of this dimension's main actionable groups (12 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
272 duplicated block group(s) detected. 4.6 % of the production lines (10,246 of 223,586) are in a reported copy. A further 200 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 3 of the 472 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population. Measured on part of this repository only: .vue (28% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.
+ 176 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 19 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with GoodsBrandLogic.php (2), Lite.php (2), Memcache.php (2). — One of this dimension's main actionable groups (19 warning-level).
Resolve the 15 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with CouponLogic.php (3), DistributionLevel.php, MnpLogic.php. — One of this dimension's main actionable groups (15 warning-level).
Resolve the 15 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with FileNew.php, REDACTED, ActivityAreaLogic.php. — One of this dimension's main actionable groups (15 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
5 production modules (npm+Composer), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence, with abstractness counted on 1 of the 5 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 10 Low cohesion finding(s) in Cohesion (LCOM4) — start with Validate.php, Request.php, Rule.php. — One of this dimension's main actionable groups (10 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 44 tests. Measured on the C# suite only — at least 3 test source file(s) (.php) went unread, so its test quality is unmeasured and is not in these counts.
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.
2 secret(s) detected. 5 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.
REDACTED
What to do
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 110 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 7 direct `PackageReference`(s), and 102 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution. ★ COVERAGE OF THIS VERDICT: it grades this repository's NuGet package dependencies and nothing else. The repository also declares REDACTED and composer.json, and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
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.
Resolve the 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with axios.js, request.js, AfterSaleLogic.php. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with shop_cart.vue. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.2 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
41 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is server/application/api/logic/OrderLogic.php. Counted over 479 of the 910 production source files in this repository: 308 are under the ~2,400-byte size floor this dimension measures over, and the remaining 123 have no attributable history left to measure.
Off-boarding risk: anonymized user #1 · ×2
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
0 deducted debt markers + 0 dead symbols across 12008 LoC in the .NET projects (0.0/KLoC) → score 10.0. Measured on the .NET source only: .php, .vue (78% of production source) was not read, and carries at least 16 uncounted task marker(s) in 9 file(s).
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: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
3 naming inconsistencies among 163 declarations measured against a convention their peers follow.
`addUserID` spells `ID` where 106 names in the project spell it `Id`server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/kms/aliyun/AliyunKMSClient.java:128
`userID` spells `ID` where 106 names in the project spell it `Id`server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/kms/aliyun/AliyunKMSClient.java:128
`AcsURLEncoder` spells `URL` where 56 names in the project spell it `Url`server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/kms/aliyun/credentials/utils/AcsURLEncoder.java:6
What to do
Resolve the 1 `addUserID` spells `ID` where 106 names in the project spell it `Id` finding(s) in Naming Consistency — start with AliyunKMSClient.java. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `userID` spells `ID` where 106 names in the project spell it `Id` finding(s) in Naming Consistency — start with AliyunKMSClient.java. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `AcsURLEncoder` spells `URL` where 56 names in the project spell it… finding(s) in Naming Consistency — start with AcsURLEncoder.java. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D26 · Project Cohesion3.3 / 10Weak✓ Tool-verified
What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.
1 of 3 projects flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionserver/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/AlipayEasySDK.csproj:1
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with AlipayEasySDK.csproj. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D27 · Navigability6.0 / 10Adequate✓ Tool-verified
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
40 % of calls cross a namespace and 0 % go through an interface, but 0 % of collaborators are co-located — so following a call takes several hops. Baseline: medium — clean/modular boundaries expected.
Scattered collaborators
What to do
Resolve the 1 Scattered collaborators finding(s) in Navigability. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d27_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
5 finding(s): 0 critical, 5 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 3 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 2 High secret finding(s) in Secrets (history) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
95 finding(s): 0 critical, 0 high, 92 medium, 3 low. semgrep hit a parse error in 69 file(s) — `server/application/admin/view/account/login.html` (line 76), `REDACTED` (line 1), `server/application/admin/view/basic/app.html` (line 1, line 48, line 57), `server/application/admin/view/basic/copyright.html` (line 1), `server/application/admin/view/basic/upload.html` (line 1, line 90, line 91, …), … (+64 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 5 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 40 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (32), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (40 warning-level).
Resolve the 15 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (14), REDACTED. — One of this dimension's main actionable groups (15 warning-level).
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 55 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (52), REDACTED (3). — One of this dimension's main actionable groups (55 issue-level).
Resolve the 14 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (10), REDACTED (3), REDACTED. — One of this dimension's main actionable groups (14 issue-level).
Resolve the 3 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 5 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (5). — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d31_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.
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.
1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 5 platform declaration(s) and 16 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.
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with UnitTest.csproj. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d44_recommendation.md · top locations in Appendix A, every location in findings.md.
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 singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
`Factory` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (context; e.g. `context` at line 27). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Factory/Factory.cs:12
What to do
A `static` field is one slot for the whole process, however its type is created: back it with a thread-safe type (ConcurrentDictionary, Interlocked), take a lock around every write, or move it into a registered singleton that does.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. 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.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
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.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Do you agree with this assessment?
P1 · CI/CD gates6.5 / 10Adequate✓ 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
Run the test suite in CI via an explicit runner step (`vendor/bin/phpunit` for the toolchain this pipeline already uses) and gate merges on it.
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 & versioning6.0 / 10Adequate✓ Tool-verified
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.
`Alipay.EasySDK.Marketing.OpenLife.Models.Text` (server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Models/Text.cs:11) is public, and the library's own code uses it, but no other project in this repository uses it (read: `UnitTest`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Models/Text.cs:11
No explicit version was found by any of the six routes this check reads: a `<Version>` or `<VersionPrefix>` property; a `GitVersion` or `MinVer` reference; the split Arcade spelling (`<MajorVersion>` AND `<MinorVersion>` together); a hand-written `[assembly: AssemblyVersion]` in source, with `bin/` and `obj/` excluded so the SDK's generated AssemblyInfo cannot satisfy it; or a version handed to MSBuild by the pipeline, as `-p:Version=` / `-p:PackageVersion=` on a `dotnet build` or `dotnet pack` line. Only project files, first-party source and CI files are read, so a version computed somewhere none of those can see is invisible here. A published library needs explicit semantic versioning so consumers can reason about breaking changes.
What to do
Make `Alipay.EasySDK.Marketing.OpenLife.Models.Text` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Stamp a semantic version (csproj <Version> or GitVersion/MinVer) and follow semver for breaking changes.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add phpstan or psalm (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
`REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — REDACTED:11
What to do
Run what this repository's stack ships: phpstan or psalm — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
What to do
Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.
Add an approval/environment gate (required reviewers / protection rules) before production promotion.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Only 0/64 awaits in library code use ConfigureAwait(false). A library that captures the caller's context can stall or deadlock its host — the classic way a dependency drags an app down.
`await TeaCore.DoActionAsync(request_, runtime_)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×20) — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/Image/Client.cs:209, server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/OAuth/Client.cs:201, server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/OAuth/Client.cs:413, …
`await this._kernel.ReadAsJsonAsync(response_, "alipay.offline.material.image.upload")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/Image/Client.cs:211, server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/Video/Client.cs:211
`await this._kernel.ReadAsJsonAsync(response_, "alipay.system.oauth.token")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/OAuth/Client.cs:203, server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/OAuth/Client.cs:415
`await this._kernel.ReadAsJsonAsync(response_, "alipay.open.app.qrcode.create")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/Qrcode/Client.cs:205
`await this._kernel.ReadAsJsonAsync(response_, "alipay.open.public.message.content.c...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:215
`await this._kernel.ReadAsJsonAsync(response_, "alipay.open.public.message.content.m...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:441
`await this._kernel.ReadAsJsonAsync(response_, "alipay.open.public.message.total.send")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:663, server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:875
`await this._kernel.ReadAsJsonAsync(response_, "alipay.open.public.message.single.se...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:1089
`await this._kernel.ReadAsJsonAsync(response_, "alipay.open.public.life.msg.recall")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:1299
`await this._kernel.ReadAsJsonAsync(response_, "alipay.open.public.template.message....` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:1515
`await this._kernel.ReadAsJsonAsync(response_, "alipay.open.public.setting.category....` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:1719
`await this._kernel.ReadAsJsonAsync(response_, "alipay.pass.template.add")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/Pass/Client.cs:203
`await this._kernel.ReadAsJsonAsync(response_, "alipay.pass.template.update")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/Pass/Client.cs:415
`await this._kernel.ReadAsJsonAsync(response_, "alipay.pass.instance.add")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/Pass/Client.cs:631
`await this._kernel.ReadAsJsonAsync(response_, "alipay.pass.instance.update")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/Pass/Client.cs:851
`await this._kernel.ReadAsJsonAsync(response_, "alipay.open.app.mini.templatemessage...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/TemplateMessage/Client.cs:209
`await this._kernel.ReadAsJsonAsync(response_, "alipay.user.certify.open.initialize")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Member/Identification/Client.cs:211
What to do
In library code, append .ConfigureAwait(false) to every await (or set <ConfigureAwait>false</ConfigureAwait> / use the analyzer CA2007) so the library never captures the host's context.
Do you agree with this assessment?
R1 · Type Safety0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
0 typed · 371 plain JS — the untyped files are pc/components/activityArea.vue, pc/components/adItem.vue, pc/components/addressAdd.vue, pc/components/addressList.vue, pc/components/afterSalesList.vue, pc/components/commentList.vue (+365 more).
What to do
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
15 duplicated blocks under uniapp/ have copies in at least two of the sibling directories bundle, components, pages, utils — 11 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 15 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 15 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 15 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — uniapp/components/order-list/order-list.vue:242
14 duplicated blocks under uniapp/components/uview-ui/components/ have copies in at least two of the sibling directories u-calendar, u-car-keyboard, u-checkbox, u-col, u-collapse-item, u-column-notice (+19 more sibling(s) not listed) — 8 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 14 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 14 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 14 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — uniapp/components/uview-ui/components/u-checkbox/u-checkbox.vue:51
12 duplicated blocks under uniapp/bundle/pages/ have copies in at least two of the sibling directories forget_pay_pwd, goods_reviews, message_center, prize_record, sign_rule, transfer_record (+9 more sibling(s) not listed) — 6 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 12 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 12 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 12 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — uniapp/bundle/pages/user_profile/user_profile.vue:270
8 duplicated blocks under the repository root have copies in at least two of the sibling directories pc, server, uniapp — 7 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 8 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — pc/components/public/numberBox.vue:57
6 duplicated blocks under pc/pages/ have copies in at least two of the sibling directories account, help_center, news_list, user — 5 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — pc/pages/account/forget_pwd.vue:104
uniapp/bundle/pages/user_profile/user_profile.vue:270 · uniapp/bundle/pages/user_set/user_set.vue:197 — these 2 files are line-for-line copies of one another — 234 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — uniapp/bundle/pages/user_profile/user_profile.vue:270
pc/components/public/numberBox.vue:57 · uniapp/components/uview-ui/components/u-number-box/u-number-box.vue:70 — the two spans are one implementation copied and then locally edited — 934 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — pc/components/public/numberBox.vue:57
uniapp/components/order-list/order-list.vue:242 · uniapp/pages/order_details/order_details.vue:431 — the two spans are one implementation copied and then locally edited — 451 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — uniapp/components/order-list/order-list.vue:242
uniapp/components/uview-ui/components/u-checkbox/u-checkbox.vue:51 · uniapp/components/uview-ui/components/u-radio/u-radio.vue:45 — the two spans are one implementation copied and then locally edited — 582 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — uniapp/components/uview-ui/components/u-checkbox/u-checkbox.vue:51
uniapp/components/uview-ui/components/u-column-notice/u-column-notice.vue:35 · uniapp/components/uview-ui/components/u-row-notice/u-row-notice.vue:38 — the two spans are one implementation copied and then locally edited — 291 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — uniapp/components/uview-ui/components/u-column-notice/u-column-notice.vue:35
uniapp/components/cate-list/cate-list.vue:115 · uniapp/pages/goods_search/goods_search.vue:134 — the two spans are one implementation copied and then locally edited — 317 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — uniapp/components/cate-list/cate-list.vue:115
uniapp/pages/forget_pwd/forget_pwd.vue:173 · uniapp/pages/register/register.vue:266 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — uniapp/pages/forget_pwd/forget_pwd.vue:173
pc/pages/category.vue:229 · pc/pages/goods_list/_type.vue:109 — the two spans are one implementation copied and then locally edited — 212 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — pc/pages/category.vue:229
pc/pages/account/forget_pwd.vue:68 · pc/pages/account/register.vue:137 — the two spans are one implementation copied and then locally edited — 214 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — pc/pages/account/forget_pwd.vue:68
pc/pages/account/login.vue:141 · pc/pages/account/register.vue:136 — the two spans are one implementation copied and then locally edited — 192 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — pc/pages/account/login.vue:141
REDACTED:3242 · REDACTED:3551 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:3242
REDACTED:3729 · REDACTED:3801 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:3729
pc/pages/user/evaluation/index.vue:85 · pc/pages/user/order/index.vue:105 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — pc/pages/user/evaluation/index.vue:85
pc/utils/consumeToken.js:4 · uniapp/utils/consumeToken.js:5 — the two spans are one implementation copied and then locally edited — 227 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — pc/utils/consumeToken.js:4
pc/plugins/axios.js:23 · uniapp/utils/request.js:46 — the two spans are one implementation copied and then locally edited — 284 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — pc/plugins/axios.js:23
REDACTED:1093 · REDACTED:1894 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:1093
uniapp/bundle/pages/bind_phone/bind_phone.vue:114 · uniapp/pages/login/login.vue:687 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — uniapp/bundle/pages/bind_phone/bind_phone.vue:114
REDACTED:901 · REDACTED:940 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:901
uniapp/components/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue:130 · uniapp/components/uview-ui/components/u-tabs/u-tabs.vue:113 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — uniapp/components/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue:130
uniapp/bundle/pages/apply_refund/apply_refund.vue:214 · uniapp/bundle/pages/apply_refund/apply_refund.vue:255 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — uniapp/bundle/pages/apply_refund/apply_refund.vue:214
uniapp/components/goods-like/goods-like.vue:65 · uniapp/components/home-coupon/home-coupon.vue:61 — the two spans are one implementation copied and then locally edited — 141 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — uniapp/components/goods-like/goods-like.vue:65
REDACTED:2355 · REDACTED:2411 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:2355
uniapp/components/cate-one/cate-one.vue:13 · uniapp/components/cate-two/cate-two.vue:13 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — uniapp/components/cate-one/cate-one.vue:13
REDACTED:1134 · REDACTED:1935 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:1134
REDACTED:2520 · REDACTED:2553 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:2520
pc/components/orderList.vue:127 · pc/pages/user/order/detail.vue:325 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — pc/components/orderList.vue:127
REDACTED:1516 · REDACTED:1575 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:1516
uniapp/bundle/pages/forget_pay_pwd/forget_pay_pwd.vue:101 · uniapp/bundle/pages/user_profile/user_profile.vue:548 · uniapp/bundle/pages/user_set/user_set.vue:453 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — uniapp/bundle/pages/forget_pay_pwd/forget_pay_pwd.vue:101
uniapp/bundle/pages/set_pay_pwd/set_pay_pwd.vue:75 · uniapp/components/set-pay-pwd/set-pay-pwd.vue:94 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — uniapp/bundle/pages/set_pay_pwd/set_pay_pwd.vue:75
uniapp/bundle/pages/bargain/bargain.vue:66 · uniapp/components/goods-bargain/goods-bargain.vue:15 — the two spans are one implementation copied and then locally edited — 111 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — uniapp/bundle/pages/bargain/bargain.vue:66
uniapp/bundle/pages/user_withdraw/user_withdraw.vue:237 · uniapp/bundle/pages/widthdraw_result/widthdraw_result.vue:125 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — uniapp/bundle/pages/user_withdraw/user_withdraw.vue:237
uniapp/bundle/pages/widthdraw_result/widthdraw_result.vue:125 · uniapp/pages/confirm_order/confirm_order.vue:440 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — uniapp/bundle/pages/widthdraw_result/widthdraw_result.vue:125
REDACTED:772 · REDACTED:980 · REDACTED:1169 · REDACTED:1797 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:772
pc/components/orderList.vue:180 · pc/pages/payment.vue:197 · pc/pages/user/order/detail.vue:379 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — pc/components/orderList.vue:180
REDACTED:912 · REDACTED:1253 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:912
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).
Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.
pc/plugins/element-ui.js:3 imports element-ui/lib/locale/lang/en, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — pc/plugins/element-ui.js:3
What to do
Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
setting has cyclomatic complexity 179 and cognitive complexity 146; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:420
reloadSetting has cyclomatic complexity 111 and cognitive complexity 139; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:562
setNode has cyclomatic complexity 102 and cognitive complexity 198; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:120
js_beautify has cyclomatic complexity 90 and cognitive complexity 167; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:3367
popNode has cyclomatic complexity 57 and cognitive complexity 152; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:355
get_next_token has cyclomatic complexity 55 and cognitive complexity 88; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:3451
getLostPoint has cyclomatic complexity 54 and cognitive complexity 106; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — uniapp/components/tki-qrcode/qrcode.js:508
useDefaultOrUserDefineToolbarStyle has cyclomatic complexity 53 and cognitive complexity 157; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1103
setContent has cyclomatic complexity 48 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — uniapp/components/uview-ui/components/u-parse/u-parse.vue:210
loadToolBar has cyclomatic complexity 43 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:3720
(anonymous) has cyclomatic complexity 31 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/public/static/plug/formSelects/formSelects-v4.js:873
handlerLabel has cyclomatic complexity 29 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/public/static/plug/formSelects/formSelects-v4.js:1161
get_tag has cyclomatic complexity 28 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:3129
renderBodyTd has cyclomatic complexity 28 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/public/static/plug/treetable-lay/treeTable.js:613
useDefaultOrUserDefineMenubarStyle has cyclomatic complexity 26 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1018
getResult has cyclomatic complexity 23 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — uniapp/components/uview-ui/components/u-picker/u-picker.vue:563
fnode has cyclomatic complexity 20 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:2020
node has cyclomatic complexity 20 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:2059
_message has cyclomatic complexity 20 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — uniapp/components/uview-ui/components/u-parse/u-parse.vue:550
judgePermission has cyclomatic complexity 19 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — uniapp/utils/permission.js:221
fnode has cyclomatic complexity 19 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1887
node has cyclomatic complexity 19 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1929
extMethod has cyclomatic complexity 19 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:3327
setupPositionProbePattern has cyclomatic complexity 19 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — uniapp/components/tki-qrcode/qrcode.js:104
search has cyclomatic complexity 18 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/public/static/plug/formSelects/formSelects-v4.js:330
getText has cyclomatic complexity 18 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — uniapp/components/uview-ui/components/u-parse/u-parse.vue:461
config has cyclomatic complexity 18 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/public/static/plug/formSelects/formSelects-v4.js:1602
(anonymous) has cyclomatic complexity 17 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:297
(anonymous) has cyclomatic complexity 17 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — uniapp/utils/request.js:87
(anonymous) has cyclomatic complexity 17 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/public/static/plug/formSelects/formSelects-v4.js:241
issue has cyclomatic complexity 16 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — pc/utils/consumeToken.js:40
(anonymous) has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — uniapp/utils/request.js:40
getMenubarDom has cyclomatic complexity 16 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:3156
getMenubarToolDom has cyclomatic complexity 16 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:3196
remove has cyclomatic complexity 15 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:305
init has cyclomatic complexity 15 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/public/static/plug/treetable-lay/treeTable.js:97
applyWithdrawFun has cyclomatic complexity 15 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — uniapp/bundle/pages/user_withdraw/user_withdraw.vue:309
style has cyclomatic complexity 15 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — uniapp/components/uview-ui/components/u-popup/u-popup.vue:208
(anonymous) has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — REDACTED:1057, REDACTED:1860
Do you agree with this assessment?
R3 · Large Files5.8 / 10Adequate✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
REDACTED has 4522 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
REDACTED has 3725 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
server/public/static/plug/formSelects/formSelects-v4.js has 1655 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/public/static/plug/formSelects/formSelects-v4.js:1
server/public/static/plug/treetable-lay/treeTable.js has 1425 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/public/static/plug/treetable-lay/treeTable.js:1
uniapp/pages/goods_details/goods_details.vue has 1179 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/pages/goods_details/goods_details.vue:1
uniapp/components/tki-qrcode/qrcode.js has 1151 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/tki-qrcode/qrcode.js:1
uniapp/pages/login/login.vue has 876 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/pages/login/login.vue:1
uniapp/pages/index/index.vue has 855 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/pages/index/index.vue:1
uniapp/bundle/pages/bargain_process/bargain_process.vue has 795 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/bundle/pages/bargain_process/bargain_process.vue:1
uniapp/pages/order_details/order_details.vue has 780 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/pages/order_details/order_details.vue:1
uniapp/bundle/pages/user_profile/user_profile.vue has 777 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/bundle/pages/user_profile/user_profile.vue:1
pc/pages/confirm_order.vue has 763 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — pc/pages/confirm_order.vue:1
uniapp/bundle/pages/user_spread/user_spread.vue has 705 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/bundle/pages/user_spread/user_spread.vue:1
uniapp/pages/confirm_order/confirm_order.vue has 668 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/pages/confirm_order/confirm_order.vue:1
uniapp/components/uview-ui/components/u-picker/u-picker.vue has 664 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/uview-ui/components/u-picker/u-picker.vue:1
pc/pages/goods_details/_id.vue has 662 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — pc/pages/goods_details/_id.vue:1
uniapp/bundle/pages/user_set/user_set.vue has 648 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/bundle/pages/user_set/user_set.vue:1
uniapp/components/uview-ui/components/u-parse/u-parse.vue has 640 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/uview-ui/components/u-parse/u-parse.vue:1
uniapp/components/uview-ui/components/u-upload/u-upload.vue has 640 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/uview-ui/components/u-upload/u-upload.vue:1
uniapp/components/uview-ui/components/u-calendar/u-calendar.vue has 616 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/uview-ui/components/u-calendar/u-calendar.vue:1
uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js has 579 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:1
uniapp/components/uview-ui/components/u-button/u-button.vue has 557 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/uview-ui/components/u-button/u-button.vue:1
uniapp/js_sdk/xtshadow-axios/axios.js has 549 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/js_sdk/xtshadow-axios/axios.js:1
uniapp/components/lime-painter/components/l-painter/l-painter.vue has 518 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/lime-painter/components/l-painter/l-painter.vue:1
pc/pages/user/order/detail.vue has 496 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — pc/pages/user/order/detail.vue:1
pc/pages/user/profile.vue has 476 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — pc/pages/user/profile.vue:1
uniapp/components/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue has 469 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue:1
uniapp/components/uview-ui/components/u-parse/libs/trees.vue has 468 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/uview-ui/components/u-parse/libs/trees.vue:1
uniapp/components/spec-popup/spec-popup.vue has 462 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/spec-popup/spec-popup.vue:1
uniapp/components/order-list/order-list.vue has 457 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/order-list/order-list.vue:1
uniapp/pages/payment/payment.vue has 448 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/pages/payment/payment.vue:1
uniapp/bundle/pages/user_withdraw/user_withdraw.vue has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/bundle/pages/user_withdraw/user_withdraw.vue:1
uniapp/components/uview-ui/components/u-popup/u-popup.vue has 436 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/uview-ui/components/u-popup/u-popup.vue:1
uniapp/utils/tools.js has 428 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/utils/tools.js:1
uniapp/pages/user/user.vue has 406 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/pages/user/user.vue:1
uniapp/components/uview-ui/components/u-form-item/u-form-item.vue has 405 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/uview-ui/components/u-form-item/u-form-item.vue:1
uniapp/components/uview-ui/components/u-select/u-select.vue has 403 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/uview-ui/components/u-select/u-select.vue:1
uniapp/components/after-sales-list/after-sales-list.vue has 402 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — uniapp/components/after-sales-list/after-sales-list.vue:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling0.0 / 10Critical✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each REDACTED script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.
test ✗ · lint ✗ · typecheck ✗ — read from this repository's REDACTED scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
What to do
Add a test runner (vitest / jest / playwright) and eslint and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as REDACTED scripts and run them in CI.
Do you agree with this assessment?
R7 · Dead Code0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 50 application, 3 tooling and 1 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×34) — uniapp/utils/area.js, uniapp/pages/goods_details/goods_details.vue, uniapp/pages/login/login.vue, …
no import path from any entry point (50 application, 3 tooling, 1 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (uniapp/components/tki-qrcode/tki-qrcode.vue) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — uniapp/components/tki-qrcode/qrcode.js
no import path from any entry point (50 application, 3 tooling, 1 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (uniapp/utils/request.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — uniapp/js_sdk/xtshadow-axios/axios.js
no import path from any entry point (50 application, 3 tooling, 1 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (uniapp/components/uview-ui/components/u-parse/u-parse.vue) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js
no import path from any entry point (50 application, 3 tooling, 1 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (uniapp/components/lime-painter/components/common/relation.js, uniapp/components/lime-painter/components/l-painter/l-painter.vue) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — uniapp/components/lime-painter/components/l-painter/utils.js
no import path from any entry point (50 application, 3 tooling, 1 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (uniapp/components/coupon-list/coupon-list.vue, uniapp/components/my-coupons/my-coupons.vue, uniapp/pages/user_getcoupon/user_getcoupon.vue) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — uniapp/api/user.js
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable REDACTED — installs work only by hoisting accident. (×3) — pc/pages/account/login.vue:89, uniapp/main.js:1, uniapp/App.vue:2
Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2) — REDACTED:17, REDACTED:25
Declared in server/public/pctest/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×7) — server/public/pctest/package.json:14, server/public/pctest/package.json:16, server/public/pctest/package.json:17, …
Declared in server/public/static/plug/layui-admin/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3) — server/public/static/plug/layui-admin/package.json:11, server/public/static/plug/layui-admin/package.json:23, server/public/static/plug/layui-admin/package.json:24
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Security — Cryptographic hygiene (weak hash/cipher, password key-derivation). This codebase has no web surface, so transport/header/cookie/CSRF controls are N/A and only crypto is scored. Markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself — a page handed to a consumer runs in that consumer's origin.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
MD5/SHA1 is constructed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ for content integrity, or a KDF (PBKDF2/Argon2/BCrypt) for password storage. If it only derives a non-security identifier (a cache key, a file or mutex name), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as `System.IO.Hashing.XxHash64`/`Crc32` says it in code — since the algorithm alone cannot distinguish the two uses. — server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Util/AntCertificationUtil.cs:303
This type encrypts through `SymmetricAlgorithm`, whose every cipher mode (CBC/ECB/OFB/CFB/CTS) is unauthenticated, and no keyed MAC or AEAD cipher appears anywhere in it — so nothing establishes that the ciphertext it produced is the ciphertext it later reads back. Encryption alone provides confidentiality, not integrity: unauthenticated CBC is MALLEABLE, and an attacker who can modify stored or transmitted ciphertext can flip chosen plaintext bits in the following block by flipping ciphertext bits in the preceding one, without ever knowing the key. Where the decrypt path reports failure differently for a padding error than for a downstream one — a broad `catch` that returns null is the usual spelling — the same construction also answers the attacker's questions, which is the padding-oracle shape that recovers plaintext outright. Prefer an AEAD cipher: `AesGcm` or `ChaCha20Poly1305` authenticate the ciphertext as part of encrypting it, and give you an associated-data slot for the surrounding context. Where the format cannot change, MAC it with encrypt-then-MAC — HMAC-SHA256 over the IV and the ciphertext together, with a key derived separately from the encryption key — and verify that tag with `CryptographicOperations.FixedTimeEquals` BEFORE decrypting anything. — server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Util/AES.cs:35
DES / 3DES / RijndaelManaged-bare is deprecated or broken. Use AES-GCM via `Aes.Create()` with explicit key/iv sizes. (×2) — server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Util/AES.cs:27, server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Util/AES.cs:59
`https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 5 such include(s) across the repository's markup. — pc/assets/fonts/demo_index.html:13
What to do
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (`System.IO.Hashing.XxHash64`/`Crc32`) where it only derives an identifier such as a cache key or a mutex name.
Authenticate ciphertext, do not just encrypt it: move to an AEAD cipher (`AesGcm`, `ChaCha20Poly1305`), or where the wire format is fixed, add encrypt-then-MAC with HMAC-SHA256 over IV+ciphertext under a separately derived key and verify the tag with `CryptographicOperations.FixedTimeEquals` before decrypting. Unauthenticated CBC is malleable, and a decrypt path that distinguishes padding failures from other failures is a padding oracle.
Replace DES/3DES (and bare RijndaelManaged) with AES-GCM via `Aes.Create()`. This repository constructs a broken or deprecated cipher at 2 sites, not one: `server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Util/AES.cs:27` (RijndaelManaged), `server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Util/AES.cs:59` (RijndaelManaged). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it. — uniapp/components/lime-painter/components/l-painter/utils.js:367
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
`fopen()` is called here and hands back a handle the caller must close — and it is held in `$handle`, and every use of `$handle` in the function reads through it or tests it — it is never closed, returned, passed, captured or stored. PHP frees an unclosed handle when its last reference goes, which is the end of the function at the earliest, not a point this code states: the descriptor stays open for the rest of the call (a long loop, a long-running worker holds many), buffered writes are flushed only then, and a failed flush is reported nowhere. Close it where it is done with: `fclose($handle);`, in a `finally` if the code between can throw. — server/thinkphp/library/think/Template.php:307
`opendir()` is called here and hands back a handle the caller must close — and it is held in `$handle`, and every use of `$handle` in the function reads through it or tests it — it is never closed, returned, passed, captured or stored. PHP frees an unclosed handle when its last reference goes, which is the end of the function at the earliest, not a point this code states: the descriptor stays open for the rest of the call (a long loop, a long-running worker holds many), buffered writes are flushed only then, and a failed flush is reported nowhere. Close it where it is done with: `closedir($handle);`, in a `finally` if the code between can throw. — REDACTED:591
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. 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 question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 0/1 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`issue` awaits `axios.post(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.post(url, { signal })`. — pc/utils/consumeToken.js:40
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
`children` accepts `options.indexKey` from the caller and keeps it in `indexKey` on line 44, where only it can read the value — but nothing ever reads `indexKey`. Setting `options.indexKey` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `indexKey` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `options.indexKey` from the accepted options so callers stop setting a knob that does nothing. — uniapp/components/lime-painter/components/common/relation.js:44
What to do
Each finding names the spans that disagree — the knob the caller supplies and the site that ignores it, whether by re-spelling its default, by falling back under the wrong key, by parsing with no format provider at all, or by printing under whatever culture the host supplies. Confirm from those spans, then decide which of the two the type meant: read the knob at the named site, or drop the knob so the signature stops advertising something the type cannot feel. Leaving both is the one option that cannot be right.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×2) — uniapp/store/modules/app.js:30, pc/store/index.js:15
`.catch((err) => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — uniapp/pages/payment/payment.vue:254
`.catch(err => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — uniapp/components/uview-ui/components/u-tabbar/u-tabbar.vue:185
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×12) — uniapp/components/uview-ui/components/u-search/u-search.vue:259, uniapp/components/uview-ui/components/u-search/u-search.vue:267, server/thinkphp/library/think/log/driver/File.php:145, …
`catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×14) — server/thinkphp/library/think/File.php:290, server/thinkphp/library/think/Validate.php:812, server/thinkphp/library/think/model/concern/Attribute.php:619, …
`catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×4) — server/thinkphp/library/think/exception/Handle.php:270, server/public/install/YxEnv.php:34, server/application/admin/validate/Crontab.php:72, …
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether PHP's static analysis checks null and is not undermined by a nullness baseline — PHPStan from level 8 (`checkNullables`) or Psalm at `errorLevel` 3 or stricter is what makes `?User` a type whose method call is an error, and the null entries of a baseline, `@psalm-suppress PossiblyNull…` and `@phpstan-ignore *.nonObject` are what silence it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
This repository commits no PHPStan or Psalm configuration (`phpstan.neon[.dist]`, `phpstan.dist.neon`, `psalm.xml[.dist]`, or one a composer.json script names with `--configuration`), so nothing checks null: a `?Customer` reaches `->name()` silently and throws `Error: Call to a member function name() on null` the first time it is null. If the build passes a level on a command line instead, put it in a committed configuration — this check reads configuration, and configuration is all it can read.
What to do
Raise PHPStan to level 8 (`level: 8` in `phpstan.neon.dist`, or `max`) or Psalm to `errorLevel="3"` or stricter, so `?Type` is a type the checker holds you to; generate a baseline for what that surfaces only to pay it down, not to keep it. Then resolve the baselined nullness errors rather than adding to them: each is a call on a value the checker showed could be null — narrow it (`if ($x === null) { … }`, `?->`, an early return), make the property non-nullable and initialise it in the constructor, or change the return type so the null cannot arrive.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 6 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.
AXH1 Runtime security headers — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXI1 Runtime container hardening — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility (rendered) — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
SC1 Supply-chain hygiene — 6 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 62 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC2 Forms & labels — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC3 Page structure — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC4 Keyboard semantics — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC5 ARIA correctness — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC6 Visual & motion safety — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AX1 Captive dependencies — no DI registrations detected
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXA1 Runtime unauthenticated reachability — This run crawled public routes only — it had no logged-in session, so there is no authenticated surface to compare anonymous access against and nothing was measured. This is a statement about this run, not about your application: nothing here says access control is missing, and nothing here says it is present.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXP1 Runtime third-party data flows — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXS1 Runtime exposed surface — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, 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 the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D11 Test Reliability — Test runner surfaced no tests
D12 Dependency Hygiene — Not scored — 2 Maven/Gradle manifest(s) were read, stating a version for 16 dependency(ies) and leaving 0 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
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.
D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
D23 Boundary Type-Coupling — Cross-context type coupling could not be assessed — this codebase's bounded contexts are neither declared nor inferable.
D24 Comment Value — 1926 of 1950 comment blocks were not judged (1783 in a non-Latin script, 143 in a language other than English): redundancy is judged by word overlap with the code's identifiers, which cannot be measured across languages.
D25 ADR Conformance — no ADRs to check
D32 Data Compliance (PII/GDPR) — 10 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D34 Knowledge Freshness — history too condensed to judge knowledge freshness
D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
D8 Code Coverage — Coverage not measured
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (87 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
IC1 Incompleteness & stubs — IC1 reached only 0% of this repository's production lines — javascript (113,353 lines), php (106,281 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P2 Observability — This repo is a library, not a deployed service — it has no process to operate, so production observability (structured logging, tracing/metrics, health checks) is N/A. A library may log via an injected ILogger, but the absence of operational telemetry is not a defect here. If it grows a host (web API, worker), the dimension reactivates.
P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
P8 Schema migrations — no EF Core usage detected
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 by the two searches this check runs — a BenchmarkDotNet package reference in any project file (loaded, or on disk), and a script whose name contains `benchmark` that this repository's CI runs. Neither can see a suite in another ecosystem's idiom, so this is not a verdict that the repository has none. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted, and nothing is asked of a repository that has none.
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.
R4 Test Coverage — 1 test file(s) reach none of 355 production file(s) via imports — exercised outside the JS import graph (integration/bundled), not import-reachable
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
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
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — Document value interpolated into markup unescaped could not be assessed in this run — the check did not complete, so it is not scored. This is a gap in the analyzer, not a finding about this repository.
X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. PHP gives a request one thread of its own; the event-loop libraries (ReactPHP, Amp) run callbacks one at a time, and ext-parallel copies every value across its channels, so no array or collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
X27 Collection changed while being enumerated — X27 reached only 48% of this repository's production lines — javascript (113,353 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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.
Awaits without ConfigureAwait(false) — Only 0/64 awaits in library code use ConfigureAwait(false). A library that captures the caller's context can stall or deadlock its host — the classic way a dependency drags an app down.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/Image/Client.cs:209— `await TeaCore.DoActionAsync(request_, runtime_)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/Image/Client.cs:211— `await this._kernel.ReadAsJsonAsync(response_, "alipay.offline.material.image.upload")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/OAuth/Client.cs:201— `await TeaCore.DoActionAsync(request_, runtime_)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/OAuth/Client.cs:203— `await this._kernel.ReadAsJsonAsync(response_, "alipay.system.oauth.token")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/OAuth/Client.cs:413— `await TeaCore.DoActionAsync(request_, runtime_)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/OAuth/Client.cs:415— `await this._kernel.ReadAsJsonAsync(response_, "alipay.system.oauth.token")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/Qrcode/Client.cs:203— `await TeaCore.DoActionAsync(request_, runtime_)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/Qrcode/Client.cs:205— `await this._kernel.ReadAsJsonAsync(response_, "alipay.open.app.qrcode.create")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/Video/Client.cs:209— `await TeaCore.DoActionAsync(request_, runtime_)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Base/Video/Client.cs:211— `await this._kernel.ReadAsJsonAsync(response_, "alipay.offline.material.image.upload")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:213— `await TeaCore.DoActionAsync(request_, runtime_)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:215— `await this._kernel.ReadAsJsonAsync(response_, "alipay.open.public.message.content.c...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:439— `await TeaCore.DoActionAsync(request_, runtime_)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:441— `await this._kernel.ReadAsJsonAsync(response_, "alipay.open.public.message.content.m...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:661— `await TeaCore.DoActionAsync(request_, runtime_)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:663— `await this._kernel.ReadAsJsonAsync(response_, "alipay.open.public.message.total.send")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:873— `await TeaCore.DoActionAsync(request_, runtime_)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:875— `await this._kernel.ReadAsJsonAsync(response_, "alipay.open.public.message.total.send")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:1087— `await TeaCore.DoActionAsync(request_, runtime_)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:1089— `await this._kernel.ReadAsJsonAsync(response_, "alipay.open.public.message.single.se...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:1297— `await TeaCore.DoActionAsync(request_, runtime_)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:1299— `await this._kernel.ReadAsJsonAsync(response_, "alipay.open.public.life.msg.recall")` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:1513— `await TeaCore.DoActionAsync(request_, runtime_)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Client.cs:1515— `await this._kernel.ReadAsJsonAsync(response_, "alipay.open.public.template.message....` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
(anonymous)::useDefaultOrUserDefineToolbarStyle (cognitive 157) REDACTED:1103— (anonymous)::useDefaultOrUserDefineToolbarStyle has cognitive complexity 157 (threshold 15). Drivers by points: ternaries 36 (102 pts), if/else 32 (55 pts) (nesting depth added 89). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
(anonymous)::setting (cognitive 146) REDACTED:420— (anonymous)::setting has cognitive complexity 146 (threshold 15). Drivers by points: boolean chains 80, ternaries 28 (48 pts), if/else 14 (18 pts) (nesting depth added 24). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
(anonymous)::reloadSetting (cognitive 139) REDACTED:562— (anonymous)::reloadSetting has cognitive complexity 139 (threshold 15). Drivers by points: boolean chains 72, ternaries 29 (50 pts), if/else 13 (17 pts) (nesting depth added 25). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
(anonymous)::loadToolBar (cognitive 71) REDACTED:3720— (anonymous)::loadToolBar has cognitive complexity 71 (threshold 15). Drivers by points: if/else 16 (38 pts), loops 6 (16 pts), match/switch 5 (13 pts), boolean chains 4 (nesting depth added 40). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
(anonymous)::useDefaultOrUserDefineMenubarStyle (cognitive 66) REDACTED:1018— (anonymous)::useDefaultOrUserDefineMenubarStyle has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 16 (40 pts), if/else 18 (26 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::useDefaultOrUserDefineFnodeStyle (cognitive 39) REDACTED:907— (anonymous)::useDefaultOrUserDefineFnodeStyle has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 8 (23 pts), if/else 10 (16 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
(anonymous)::useDefaultOrUserDefineSnodeStyle (cognitive 39) REDACTED:946— (anonymous)::useDefaultOrUserDefineSnodeStyle has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 8 (23 pts), if/else 10 (16 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
(anonymous)::renderBodyTd (cognitive 35) server/public/static/plug/treetable-lay/treeTable.js:613— (anonymous)::renderBodyTd has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 10, ternaries 3 (6 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
(anonymous)::getLiItemDom (cognitive 30) REDACTED:2160— (anonymous)::getLiItemDom has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (25 pts), ternaries 4, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::openTreePlus (cognitive 30) REDACTED:3113— (anonymous)::openTreePlus has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::replaceDom::fnode (cognitive 29) REDACTED:2020— (anonymous)::replaceDom::fnode has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 8 (9 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::replaceDom::node (cognitive 29) REDACTED:2059— (anonymous)::replaceDom::node has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 8 (9 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::getDom::fnode (cognitive 28) REDACTED:1887— (anonymous)::getDom::fnode has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 7 (8 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::getDom::node (cognitive 28) REDACTED:1929— (anonymous)::getDom::node has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 7 (8 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::useDefaultOrUserDefineCheckboxStyle (cognitive 26) REDACTED:985— (anonymous)::useDefaultOrUserDefineCheckboxStyle has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 8 (11 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::getDom::checkbox (cognitive 26) REDACTED:1970— (anonymous)::getDom::checkbox has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::replaceDom::checkbox (cognitive 26) REDACTED:2097— (anonymous)::replaceDom::checkbox has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::queryListTreeByPid (cognitive 25) REDACTED:1703— (anonymous)::queryListTreeByPid has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
(anonymous)::init (cognitive 24) server/public/static/plug/treetable-lay/treeTable.js:97— (anonymous)::init has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
(anonymous)::menubarMethod::openAllNode (cognitive 22) REDACTED:3241— (anonymous)::menubarMethod::openAllNode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
(anonymous)::toolbarMethod::pulldown (cognitive 22) REDACTED:3549— (anonymous)::toolbarMethod::pulldown has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
(anonymous)::changeTreeNodeAdd (cognitive 22) REDACTED:3963— (anonymous)::changeTreeNodeAdd has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 3 (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.
(anonymous)::menubarMethod::extMethod (cognitive 21) REDACTED:3327— (anonymous)::menubarMethod::extMethod has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::getToolbarDom (cognitive 21) REDACTED:3443— (anonymous)::getToolbarDom has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::init::success (cognitive 20) REDACTED:1474— (anonymous)::init::success has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (7 lines × 2) server/application/admin/controller/MarketingConfig.php:28— server/application/admin/controller/MarketingConfig.php:28-34 | server/application/admin/controller/MarketingConfig.php:43-49 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) server/application/admin/logic/ActivityAreaLogic.php:72— server/application/admin/logic/ActivityAreaLogic.php:72-78 | server/application/admin/logic/CommentHelperLogic.php:61-67 — 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 `server/application/admin/logic/ActivityAreaLogic.php:72` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) server/application/admin/logic/AfterSaleLogic.php:166— server/application/admin/logic/AfterSaleLogic.php:166-172 | server/application/admin/logic/AfterSaleLogic.php:174-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/AfterSaleLogic.php:166` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) server/application/admin/logic/FaceSheetLogic.php:39— server/application/admin/logic/FaceSheetLogic.php:39-45 | server/application/admin/logic/FaceSheetSenderLogic.php:39-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/FaceSheetLogic.php:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) server/application/admin/logic/LiveGoodsLogic.php:209— server/application/admin/logic/LiveGoodsLogic.php:209-215 | server/application/admin/logic/LiveRoomLogic.php:201-207 — 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 `server/application/admin/logic/LiveRoomLogic.php:201` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) server/application/api/logic/DistributionLogic.php:429— server/application/api/logic/DistributionLogic.php:429-435 | server/application/api/logic/DistributionLogic.php:438-444 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) server/application/api/logic/GoodsCommentLogic.php:104— server/application/api/logic/GoodsCommentLogic.php:104-110 | server/application/api/logic/GoodsCommentLogic.php:180-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) server/application/admin/logic/GoodsBrandLogic.php:99— server/application/admin/logic/GoodsBrandLogic.php:99-105 | server/application/admin/logic/GoodsCategoryLogic.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.
Duplicated block (7 lines × 2) server/application/admin/logic/GoodsBrandLogic.php:110— server/application/admin/logic/GoodsBrandLogic.php:110-116 | server/application/admin/logic/GoodsCategoryLogic.php:308-315 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) server/thinkphp/library/think/Route.php:823— server/thinkphp/library/think/Route.php:823-829 | server/thinkphp/library/think/route/Resource.php:118-124 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) server/thinkphp/library/think/cache/driver/Lite.php:146— server/thinkphp/library/think/cache/driver/Lite.php:146-152 | server/thinkphp/library/think/cache/driver/Sqlite.php:165-171 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) server/thinkphp/library/think/cache/driver/Lite.php:164— server/thinkphp/library/think/cache/driver/Lite.php:164-170 | server/thinkphp/library/think/cache/driver/Sqlite.php:183-189 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) server/thinkphp/library/think/cache/driver/Memcache.php:153— server/thinkphp/library/think/cache/driver/Memcache.php:153-159 | server/thinkphp/library/think/cache/driver/Memcached.php:167-173 — before extracting anything, compare `server/thinkphp/library/think/cache/driver/Memcache.php` and `server/thinkphp/library/think/cache/driver/Memcached.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) server/thinkphp/library/think/cache/driver/Memcache.php:171— server/thinkphp/library/think/cache/driver/Memcache.php:171-177 | server/thinkphp/library/think/cache/driver/Memcached.php:185-191 — before extracting anything, compare `server/thinkphp/library/think/cache/driver/Memcache.php` and `server/thinkphp/library/think/cache/driver/Memcached.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) server/thinkphp/library/think/db/connector/Pgsql.php:40— server/thinkphp/library/think/db/connector/Pgsql.php:40-46 | server/thinkphp/library/think/db/connector/Sqlsrv.php:41-47 — before extracting anything, compare `server/thinkphp/library/think/db/connector/Pgsql.php` and `server/thinkphp/library/think/db/connector/Sqlsrv.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) server/thinkphp/library/think/Validate.php:1548— server/thinkphp/library/think/Validate.php:1548-1554 | server/thinkphp/library/think/validate/ValidateRule.php:150-156 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) server/application/admin/logic/VerificationLogic.php:160— server/application/admin/logic/VerificationLogic.php:160-166 | server/application/admin/logic/VerificationLogic.php:225-231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) server/application/admin/logic/WithdrawLogic.php:273— server/application/admin/logic/WithdrawLogic.php:273-279 | server/application/common/command/WechatMerchantTransfer.php:57-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 `server/application/admin/logic/WithdrawLogic.php:273` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) server/thinkphp/library/think/model/relation/BelongsTo.php:149— server/thinkphp/library/think/model/relation/BelongsTo.php:149-155 | server/thinkphp/library/think/model/relation/HasOne.php:148-154 — before extracting anything, compare `server/thinkphp/library/think/model/relation/BelongsTo.php` and `server/thinkphp/library/think/model/relation/HasOne.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `server/thinkphp/library/think/model/relation/BelongsTo.php:149` 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.
Swallowed exception (caught, then discarded) server/thinkphp/library/think/File.php:290— `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/thinkphp/library/think/Validate.php:812— `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/thinkphp/library/think/model/concern/Attribute.php:619— `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/thinkphp/library/think/exception/Handle.php:270— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/public/install/YxEnv.php:34— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:1292— `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/application/common/server/FileServer.php:305— `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/application/common/server/FileServer.php:322— `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/application/api/logic/TeamLogic.php:123— `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/application/admin/validate/Crontab.php:72— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:50— `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/application/admin/logic/CrontabLogic.php:83— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/application/admin/logic/FileNewLogic.php:256— `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/application/admin/logic/FootprintLogic.php:50— `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/application/admin/logic/FootprintLogic.php:61— `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/application/admin/logic/GoodsLogic.php:843— `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/application/admin/logic/MnpMessageLogic.php:92— `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/application/admin/logic/OaMessageLogic.php:89— `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D30 · Dependency Vulnerabilities· Medium CVE · ×17
TooManyMethods: Query server/thinkphp/library/think/db/Query.php:31— TooManyMethods — 173 methods. The bar is 30 methods; this is 143 over it, 5.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Request server/thinkphp/library/think/Request.php:17— TooManyMethods — 108 methods. The bar is 30 methods; this is 78 over it, 3.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Connection server/thinkphp/library/think/db/Connection.php:25— TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Process REDACTED:21— TooManyMethods — 69 methods. The bar is 30 methods; this is 39 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Rule server/thinkphp/library/think/route/Rule.php:24— TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Validate server/thinkphp/library/think/Validate.php:17— TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Route server/thinkphp/library/think/Route.php:24— TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: installModel REDACTED:4— TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Model server/thinkphp/library/think/Model.php:59— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: App server/thinkphp/library/think/App.php:21— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: common REDACTED:1— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Builder server/thinkphp/library/think/db/Builder.php:17— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Console server/thinkphp/library/think/Console.php:21— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Collection server/thinkphp/library/think/Collection.php:20— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Container server/thinkphp/library/think/Container.php:48— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Command server/thinkphp/library/think/console/Command.php:19— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Swallowed exception (empty catch) uniapp/store/modules/app.js:30— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) uniapp/pages/payment/payment.vue:254— `.catch((err) => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) uniapp/components/uview-ui/components/u-tabbar/u-tabbar.vue:185— `.catch(err => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) uniapp/components/uview-ui/components/u-search/u-search.vue:259— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) uniapp/components/uview-ui/components/u-search/u-search.vue:267— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) server/thinkphp/library/think/log/driver/File.php:145— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) server/thinkphp/library/think/log/driver/File.php:201— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) server/thinkphp/library/think/cache/driver/File.php:66— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) server/thinkphp/library/think/cache/driver/File.php:98— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) server/thinkphp/library/think/cache/driver/File.php:251— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:395— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) server/application/common/logic/OrderGoodsLogic.php:144— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) server/application/common/logic/QrCodeLogic.php:291— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) server/application/common/behavior/Footprint.php:44— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) server/application/api/behavior/AppEnd.php:52— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) pc/store/index.js:15— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
FileTooLong: REDACTED REDACTED— FileTooLong — 3368 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 1500 significant lines; this is 1868 over it, 2.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 2794 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 1500 significant lines; this is 1294 over it, 1.86× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: db/Query.php server/thinkphp/library/think/db/Query.php— FileTooLong — 1311 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Query (31-3766). The bar is 500 significant lines; this is 811 over it, 2.62× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: formSelects/formSelects-v4.js server/public/static/plug/formSelects/formSelects-v4.js— FileTooLong — 1274 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: _defineProperty (5-1791). The bar is 500 significant lines; this is 774 over it, 2.55× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: treetable-lay/treeTable.js server/public/static/plug/treetable-lay/treeTable.js— FileTooLong — 990 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 490 over it, 1.98× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: db/Connection.php server/thinkphp/library/think/db/Connection.php— FileTooLong — 848 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Connection (25-2152). The bar is 500 significant lines; this is 348 over it, 1.70× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: logic/OrderLogic.php server/application/api/logic/OrderLogic.php— FileTooLong — 842 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 342 over it, 1.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: think/Request.php server/thinkphp/library/think/Request.php— FileTooLong — 809 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: Request (17-2267). The bar is 500 significant lines; this is 309 over it, 1.62× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: tki-qrcode/qrcode.js uniapp/components/tki-qrcode/qrcode.js— FileTooLong — 745 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: QRCode (1-1199). The bar is 500 significant lines; this is 245 over it, 1.49× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: goods/add.html server/application/admin/view/goods/add.html— FileTooLong — 652 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: spec_value_temp_id_number (471-1472). The bar is 500 significant lines; this is 152 over it, 1.30× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: think/Template.php server/thinkphp/library/think/Template.php— FileTooLong — 635 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: Template (21-1318). The bar is 500 significant lines; this is 135 over it, 1.27× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: logic/GoodsLogic.php server/application/admin/logic/GoodsLogic.php— FileTooLong — 606 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: GoodsLogic (28-905). The bar is 500 significant lines; this is 106 over it, 1.21× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 585 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 85 over it, 1.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: think/Validate.php server/thinkphp/library/think/Validate.php— FileTooLong — 541 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Validate (17-1556). The bar is 500 significant lines; this is 41 over it, 1.08× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED server/application/admin/logic/UserLogic.php— FileTooLong — 515 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: UserLogic (34-802). The bar is 500 significant lines; this is 15 over it, 1.03× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
Duplicated block (6 lines × 2) server/application/admin/controller/DistributionLevel.php:31— server/application/admin/controller/DistributionLevel.php:31-36 | server/application/admin/controller/DistributionLevel.php:55-60 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/controller/DistributionLevel.php:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) server/application/admin/logic/MnpLogic.php:57— server/application/admin/logic/MnpLogic.php:57-62 | server/application/admin/logic/OaLogic.php:50-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.
Duplicated block (6 lines × 2) server/application/admin/logic/VerificationLogic.php:323— server/application/admin/logic/VerificationLogic.php:323-329 | server/application/api/logic/OrderLogic.php:1410-1415 — 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 `server/application/admin/logic/VerificationLogic.php:323` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) server/application/api/logic/CouponLogic.php:84— server/application/api/logic/CouponLogic.php:84-90 | server/application/api/logic/CouponLogic.php:242-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) server/application/api/logic/CouponLogic.php:161— server/application/api/logic/CouponLogic.php:161-166 | server/application/api/logic/CouponLogic.php:365-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/api/logic/CouponLogic.php:161` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) server/thinkphp/library/think/process/pipes/Unix.php:118— server/thinkphp/library/think/process/pipes/Unix.php:118-124 | server/thinkphp/library/think/process/pipes/Windows.php:185-190 — 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 `server/thinkphp/library/think/process/pipes/Unix.php:118` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) server/application/admin/logic/GoodsCommentLogic.php:59— server/application/admin/logic/GoodsCommentLogic.php:59-64 | server/application/admin/logic/SmsLogic.php:49-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.
Duplicated block (6 lines × 2) server/application/admin/logic/OrderLogic.php:680— server/application/admin/logic/OrderLogic.php:680-685 | server/application/common/behavior/Printer.php:80-85 — 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 (6 lines × 2) server/application/api/logic/CouponLogic.php:241— server/application/api/logic/CouponLogic.php:241-246 | server/application/api/logic/CouponLogic.php:364-369 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/api/logic/CouponLogic.php:241` 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 (6 lines × 2) server/application/common/model/User.php:123— server/application/common/model/User.php:123-128 | server/application/common/model/User.php:130-135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) server/thinkphp/library/think/model/relation/MorphMany.php:40— server/thinkphp/library/think/model/relation/MorphMany.php:40-45 | server/thinkphp/library/think/model/relation/MorphOne.php:40-45 — before extracting anything, compare `server/thinkphp/library/think/model/relation/MorphMany.php` and `server/thinkphp/library/think/model/relation/MorphOne.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 (6 lines × 2) server/application/admin/controller/Ad.php:120— server/application/admin/controller/Ad.php:120-125 | server/application/admin/controller/AdPosition.php:126-131 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) server/application/admin/controller/MnpMessage.php:70— server/application/admin/controller/MnpMessage.php:70-75 | server/application/admin/controller/OaMessage.php:71-76 — before extracting anything, compare `server/application/admin/controller/MnpMessage.php` and `server/application/admin/controller/OaMessage.php` as WHOLE FILES: 87% 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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) server/application/admin/logic/ArticleCategoryLogic.php:101— server/application/admin/logic/ArticleCategoryLogic.php:101-106 | server/application/admin/logic/HelpCategoryLogic.php:98-103 — before extracting anything, compare `server/application/admin/logic/ArticleCategoryLogic.php` and `server/application/admin/logic/HelpCategoryLogic.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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 (6 lines × 2) server/thinkphp/library/think/model/relation/HasManyThrough.php:99— server/thinkphp/library/think/model/relation/HasManyThrough.php:99-104 | server/thinkphp/library/think/model/relation/HasManyThrough.php:132-137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/thinkphp/library/think/model/relation/HasManyThrough.php:98` calls `field` and `server/thinkphp/library/think/model/relation/HasManyThrough.php:131` 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) server/application/admin/controller/FileNew.php:32— server/application/admin/controller/FileNew.php:32-36 | server/application/admin/controller/FileNew.php:60-64 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) server/application/admin/logic/UserLogic.php:588— server/application/admin/logic/UserLogic.php:588-593 | server/application/admin/logic/VerificationLogic.php:101-105 — 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 `server/application/admin/logic/UserLogic.php:588` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) server/application/admin/logic/ActivityAreaLogic.php:188— server/application/admin/logic/ActivityAreaLogic.php:188-192 | server/application/admin/logic/SeckillLogic.php:161-165 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) server/application/admin/model/User.php:110— server/application/admin/model/User.php:110-114 | server/application/common/model/User.php:113-117 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) server/application/admin/validate/Goods.php:107— server/application/admin/validate/Goods.php:107-111 | server/application/admin/validate/SeckillGoods.php:36-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.
Duplicated block (5 lines × 2) server/thinkphp/library/think/cache/driver/Memcache.php:85— server/thinkphp/library/think/cache/driver/Memcache.php:85-89 | server/thinkphp/library/think/cache/driver/Memcached.php:99-103 — before extracting anything, compare `server/thinkphp/library/think/cache/driver/Memcache.php` and `server/thinkphp/library/think/cache/driver/Memcached.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) server/application/admin/controller/Coupon.php:130— server/application/admin/controller/Coupon.php:130-134 | server/application/admin/controller/User.php:154-158 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) server/application/admin/validate/SelffetchShop.php:108— server/application/admin/validate/SelffetchShop.php:108-112 | server/application/admin/validate/SelffetchVerifier.php:95-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) server/application/admin/controller/AdminBase.php:61— server/application/admin/controller/AdminBase.php:61-65 | server/application/api/controller/ApiBase.php:65-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) server/application/admin/logic/CommentHelperLogic.php:69— server/application/admin/logic/CommentHelperLogic.php:69-73 | server/application/admin/logic/GoodsLogic.php:139-143 — 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 `server/application/admin/logic/GoodsLogic.php:139` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) server/application/admin/logic/FileNewLogic.php:37— server/application/admin/logic/FileNewLogic.php:37-41 | server/application/admin/logic/FileNewLogic.php:59-63 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) server/application/admin/logic/LogLogic.php:42— server/application/admin/logic/LogLogic.php:42-46 | server/application/admin/logic/WithdrawLogic.php:72-76 — 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 `server/application/admin/logic/WithdrawLogic.php:72` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) server/application/admin/logic/OrderDeliveryBatchLogic.php:41— server/application/admin/logic/OrderDeliveryBatchLogic.php:41-45 | server/application/admin/logic/OrderDeliveryBatchLogic.php:48-52 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) server/thinkphp/library/think/console/command/optimize/Autoload.php:79— server/thinkphp/library/think/console/command/optimize/Autoload.php:79-83 | server/thinkphp/library/think/console/command/optimize/Autoload.php:193-197 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/thinkphp/library/think/console/command/optimize/Autoload.php:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) server/thinkphp/library/think/template/taglib/Cx.php:87— server/thinkphp/library/think/template/taglib/Cx.php:87-91 | server/thinkphp/library/think/template/taglib/Cx.php:152-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) server/application/admin/logic/StatisticsLogic.php:125— server/application/admin/logic/StatisticsLogic.php:125-135 | server/application/admin/logic/StatisticsLogic.php:241-251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/StatisticsLogic.php:125` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) server/application/admin/validate/Login.php:104— server/application/admin/validate/Login.php:104-114 | server/application/api/validate/Login.php:159-169 — before extracting anything, compare `server/application/admin/validate/Login.php` and `server/application/api/validate/Login.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 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 (11 lines × 2) server/thinkphp/library/think/cache/driver/Memcached.php:59— server/thinkphp/library/think/cache/driver/Memcached.php:59-69 | server/thinkphp/library/think/session/driver/Memcached.php:59-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `server/thinkphp/library/think/cache/driver/Memcached.php:70` calls `setOption` and `server/thinkphp/library/think/session/driver/Memcached.php:71` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) server/thinkphp/library/think/console/output/driver/Console.php:198— server/thinkphp/library/think/console/output/driver/Console.php:198-208 | server/thinkphp/library/think/console/output/driver/Console.php:221-231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/thinkphp/library/think/console/output/driver/Console.php:198` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) server/thinkphp/library/think/db/Builder.php:1053— server/thinkphp/library/think/db/Builder.php:1053-1063 | server/thinkphp/library/think/db/builder/Mysql.php:52-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) server/thinkphp/library/think/model/relation/BelongsTo.php:224— server/thinkphp/library/think/model/relation/BelongsTo.php:224-234 | server/thinkphp/library/think/model/relation/BelongsTo.php:264-274 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/thinkphp/library/think/model/relation/BelongsTo.php:224` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) server/thinkphp/library/think/model/relation/HasOne.php:223— server/thinkphp/library/think/model/relation/HasOne.php:223-233 | server/thinkphp/library/think/model/relation/HasOne.php:263-273 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/thinkphp/library/think/model/relation/HasOne.php:223` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) server/thinkphp/library/think/model/relation/MorphOne.php:133— server/thinkphp/library/think/model/relation/MorphOne.php:133-143 | server/thinkphp/library/think/model/relation/MorphTo.php:209-219 — 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 `server/thinkphp/library/think/model/relation/MorphOne.php:133` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) server/thinkphp/library/think/template/taglib/Cx.php:576— server/thinkphp/library/think/template/taglib/Cx.php:576-586 | server/thinkphp/library/think/template/taglib/Cx.php:601-611 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 2) server/application/admin/logic/ArticleLogic.php:50— server/application/admin/logic/ArticleLogic.php:50-60 | server/application/admin/logic/HelpLogic.php:48-58 — before extracting anything, compare `server/application/admin/logic/ArticleLogic.php` and `server/application/admin/logic/HelpLogic.php` as WHOLE FILES: this scan already matched 6 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. 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 `server/application/admin/logic/ArticleLogic.php:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) server/application/api/logic/DistributionLogic.php:342— server/application/api/logic/DistributionLogic.php:342-352 | server/application/api/logic/DistributionLogic.php:457-467 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/api/logic/DistributionLogic.php:342` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) server/thinkphp/library/think/db/Query.php:1595— server/thinkphp/library/think/db/Query.php:1595-1605 | server/thinkphp/library/think/db/Where.php:94-104 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) server/thinkphp/library/think/Collection.php:293— server/thinkphp/library/think/Collection.php:293-303 | server/thinkphp/library/think/Paginator.php:325-335 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) server/thinkphp/library/think/model/relation/MorphMany.php:293— server/thinkphp/library/think/model/relation/MorphMany.php:293-303 | server/thinkphp/library/think/model/relation/MorphOne.php:226-236 — before extracting anything, compare `server/thinkphp/library/think/model/relation/MorphMany.php` and `server/thinkphp/library/think/model/relation/MorphOne.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) server/application/admin/logic/ArticleLogic.php:35— server/application/admin/logic/ArticleLogic.php:35-43 | server/application/admin/logic/HelpLogic.php:33-41 — before extracting anything, compare `server/application/admin/logic/ArticleLogic.php` and `server/application/admin/logic/HelpLogic.php` as WHOLE FILES: this scan already matched 6 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. 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 `server/application/admin/logic/ArticleLogic.php:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/admin/logic/ArticleLogic.php:31` calls `name` and `server/application/admin/logic/HelpLogic.php:30` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) server/application/admin/logic/DistributionOrderGoodsLogic.php:78— server/application/admin/logic/DistributionOrderGoodsLogic.php:78-86 | server/application/admin/logic/DistributionOrderGoodsLogic.php:92-100 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) server/application/admin/logic/MnpMessageLogic.php:86— server/application/admin/logic/MnpMessageLogic.php:86-94 | server/application/admin/logic/OaMessageLogic.php:83-91 — before extracting anything, compare `server/application/admin/logic/MnpMessageLogic.php` and `server/application/admin/logic/OaMessageLogic.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 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 `server/application/admin/logic/MnpMessageLogic.php:86` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) REDACTED:614— REDACTED:614-622 | REDACTED:662-670 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:614` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) server/application/api/logic/SignLogic.php:199— server/application/api/logic/SignLogic.php:199-207 | server/application/api/logic/SignLogic.php:233-241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/api/logic/SignLogic.php:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) server/thinkphp/library/think/Collection.php:120— server/thinkphp/library/think/Collection.php:120-128 | server/thinkphp/library/think/Collection.php:148-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/thinkphp/library/think/Collection.php:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) server/thinkphp/library/think/db/Connection.php:1498— server/thinkphp/library/think/db/Connection.php:1498-1506 | server/thinkphp/library/think/db/connector/Mysql.php:143-151 — 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 `server/thinkphp/library/think/db/Connection.php:1498` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) server/thinkphp/library/think/db/builder/Mysql.php:120— server/thinkphp/library/think/db/builder/Mysql.php:120-128 | server/thinkphp/library/think/db/builder/Pgsql.php:59-67 — 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 `server/thinkphp/library/think/db/builder/Mysql.php:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) server/thinkphp/library/think/model/concern/RelationShip.php:132— server/thinkphp/library/think/model/concern/RelationShip.php:132-140 | server/thinkphp/library/think/model/relation/OneToOne.php:293-301 — 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 `server/thinkphp/library/think/model/concern/RelationShip.php:132` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) server/thinkphp/library/think/model/relation/BelongsTo.php:139— server/thinkphp/library/think/model/relation/BelongsTo.php:139-147 | server/thinkphp/library/think/model/relation/HasOne.php:138-146 — before extracting anything, compare `server/thinkphp/library/think/model/relation/BelongsTo.php` and `server/thinkphp/library/think/model/relation/HasOne.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) server/thinkphp/library/think/model/relation/HasMany.php:137— server/thinkphp/library/think/model/relation/HasMany.php:137-145 | server/thinkphp/library/think/model/relation/HasManyThrough.php:213-221 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) server/thinkphp/library/think/cache/driver/Memcache.php:133— server/thinkphp/library/think/cache/driver/Memcache.php:133-141 | server/thinkphp/library/think/cache/driver/Memcached.php:147-155 — before extracting anything, compare `server/thinkphp/library/think/cache/driver/Memcache.php` and `server/thinkphp/library/think/cache/driver/Memcached.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) server/thinkphp/library/think/model/relation/MorphMany.php:330— server/thinkphp/library/think/model/relation/MorphMany.php:330-339 | server/thinkphp/library/think/model/relation/MorphOne.php:246-254 — before extracting anything, compare `server/thinkphp/library/think/model/relation/MorphMany.php` and `server/thinkphp/library/think/model/relation/MorphOne.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Client.cs:350— server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Client.cs:350-358 | server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Client.cs:361-369 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) server/application/admin/controller/Common.php:25— server/application/admin/controller/Common.php:25-32 | server/application/admin/controller/Common.php:35-42 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) server/application/admin/controller/SelffetchShop.php:60— server/application/admin/controller/SelffetchShop.php:60-67 | server/application/admin/controller/SelffetchShop.php:88-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/controller/SelffetchShop.php:60` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `server/application/admin/controller/SelffetchShop.php:96` calls `assign`, `detail` and `server/application/admin/controller/SelffetchShop.php:68` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) server/application/admin/logic/ActivityAreaLogic.php:203— server/application/admin/logic/ActivityAreaLogic.php:203-210 | server/application/admin/logic/SeckillLogic.php:196-203 — 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 `server/application/admin/logic/ActivityAreaLogic.php:203` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) server/application/admin/logic/DistributionMemberLogic.php:91— server/application/admin/logic/DistributionMemberLogic.php:91-98 | server/application/admin/logic/UserLogic.php:633-640 — 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 `server/application/admin/logic/DistributionMemberLogic.php:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `User` names `app\admin\model\User` in one and `app\common\model\User` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `server/application/admin/logic/DistributionMemberLogic.php:99` calls `withSearch` and `server/application/admin/logic/UserLogic.php:641` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) server/application/admin/logic/LiveGoodsLogic.php:142— server/application/admin/logic/LiveGoodsLogic.php:142-149 | server/application/admin/logic/LiveRoomLogic.php:174-181 — 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 `server/application/admin/logic/LiveGoodsLogic.php:142` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) server/application/admin/validate/Order.php:138— server/application/admin/validate/Order.php:138-146 | server/application/admin/validate/Verification.php:77-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. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/validate/Order.php:138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) REDACTED:477— REDACTED:477-484 | REDACTED:489-496 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:476` calls `whereOr` and `REDACTED:488` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) server/application/common/server/WechatMiniExpressSendSyncServer.php:44— server/application/common/server/WechatMiniExpressSendSyncServer.php:44-51 | server/application/common/server/WechatMiniExpressSendSyncServer.php:153-160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/common/server/WechatMiniExpressSendSyncServer.php:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) server/thinkphp/library/think/db/Query.php:2593— server/thinkphp/library/think/db/Query.php:2593-2600 | server/thinkphp/library/think/db/Query.php:2649-2656 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/thinkphp/library/think/db/Query.php:2593` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) server/thinkphp/library/think/debug/Console.php:44— server/thinkphp/library/think/debug/Console.php:44-51 | server/thinkphp/library/think/debug/Html.php:43-50 — 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 (8 lines × 2) server/application/api/logic/GoodsLogic.php:56— server/application/api/logic/GoodsLogic.php:56-63 | server/application/api/logic/PcLogic.php:235-242 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) server/application/api/controller/Ad.php:50— server/application/api/controller/Ad.php:50-57 | server/application/api/controller/AdContent.php:50-57 — before extracting anything, compare `server/application/api/controller/Ad.php` and `server/application/api/controller/AdContent.php` as WHOLE FILES: 97% 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.
Duplicated block (8 lines × 2) server/thinkphp/library/think/model/relation/HasMany.php:350— server/thinkphp/library/think/model/relation/HasMany.php:350-357 | server/thinkphp/library/think/model/relation/HasOne.php:285-292 — before extracting anything, compare `server/thinkphp/library/think/model/relation/HasMany.php` and `server/thinkphp/library/think/model/relation/HasOne.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 (8 lines × 2) server/application/admin/controller/FaceSheet.php:129— server/application/admin/controller/FaceSheet.php:129-136 | server/application/admin/controller/FaceSheetSender.php:90-97 — 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.
(anonymous)::setting (cyclomatic 179) REDACTED:420— (anonymous)::setting has cyclomatic complexity 179 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
(anonymous)::reloadSetting (cyclomatic 111) REDACTED:562— (anonymous)::reloadSetting has cyclomatic complexity 111 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
(anonymous)::useDefaultOrUserDefineToolbarStyle (cyclomatic 53) REDACTED:1103— (anonymous)::useDefaultOrUserDefineToolbarStyle has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous)::loadToolBar (cyclomatic 43) REDACTED:3720— (anonymous)::loadToolBar has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous)::renderBodyTd (cyclomatic 28) server/public/static/plug/treetable-lay/treeTable.js:613— (anonymous)::renderBodyTd has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
(anonymous)::useDefaultOrUserDefineMenubarStyle (cyclomatic 26) REDACTED:1018— (anonymous)::useDefaultOrUserDefineMenubarStyle has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous)::replaceDom::fnode (cyclomatic 20) REDACTED:2020— (anonymous)::replaceDom::fnode has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous)::replaceDom::node (cyclomatic 20) REDACTED:2059— (anonymous)::replaceDom::node has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous)::getDom::fnode (cyclomatic 19) REDACTED:1887— (anonymous)::getDom::fnode has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous)::getDom::node (cyclomatic 19) REDACTED:1929— (anonymous)::getDom::node has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous)::menubarMethod::extMethod (cyclomatic 19) REDACTED:3327— (anonymous)::menubarMethod::extMethod has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
(anonymous)::getMenubarDom (cyclomatic 16) REDACTED:3156— (anonymous)::getMenubarDom has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
(anonymous)::getMenubarToolDom (cyclomatic 16) REDACTED:3196— (anonymous)::getMenubarToolDom has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
FunctionTooLong: dtree.layui.define() REDACTED:9— FunctionTooLong — layui.define() runs 3368 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3268 over it, 33.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: layedit.layui.define() REDACTED:9— FunctionTooLong — layui.define() runs 2141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2041 over it, 21.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: treeTable.layui.define() server/public/static/plug/treetable-lay/treeTable.js:5— FunctionTooLong — layui.define() runs 990 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 890 over it, 9.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: layedit.js_beautify REDACTED:3367— FunctionTooLong — js_beautify runs 349 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 249 over it, 3.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: layedit.style_html REDACTED:3011— FunctionTooLong — style_html runs 275 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 175 over it, 2.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: iconPicker.layui.define() server/public/static/plug/iconpicker/module/iconPicker/iconPicker.js:7— FunctionTooLong — layui.define() runs 235 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 135 over it, 2.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: REDACTED.layui.define() server/application/admin/view/user/lists.html:355— FunctionTooLong — layui.define() runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: REDACTED.layui.use() server/application/admin/view/file_new/lists.html:118— FunctionTooLong — layui.use() runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: REDACTED.layui.define() server/application/admin/view/recharge_log/lists.html:172— FunctionTooLong — layui.define() runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: MpHtmlParser.MpHtmlParser.setNode uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:120— FunctionTooLong — MpHtmlParser.setNode runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: formSelects-v4.Common.one server/public/static/plug/formSelects/formSelects-v4.js:812— FunctionTooLong — Common.one runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: MpHtmlParser.MpHtmlParser.popNode uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:355— FunctionTooLong — MpHtmlParser.popNode runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
AXH1 · Runtime security headers· Runtime security header not set · ×11
Runtime security header not set: content-security-policy — The live app's responses did not include content-security-policy (restricts the sources a page may load — mitigates XSS/injection). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: cross-origin-embedder-policy — The live app's responses did not include cross-origin-embedder-policy (recommended by the OWASP Secure Headers Project (value: require-corp)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: cross-origin-opener-policy — The live app's responses did not include cross-origin-opener-policy (recommended by the OWASP Secure Headers Project (value: same-origin)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: cross-origin-resource-policy — The live app's responses did not include cross-origin-resource-policy (recommended by the OWASP Secure Headers Project (value: same-origin)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: permissions-policy — The live app's responses did not include permissions-policy (restricts powerful browser features (camera, geolocation, …)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: referrer-policy — The live app's responses did not include referrer-policy (limits referrer leakage to third parties). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: strict-transport-security — The live app's responses did not include strict-transport-security (forces HTTPS on subsequent requests — mitigates downgrade/MITM). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: x-content-type-options — The live app's responses did not include x-content-type-options (stops MIME-sniffing (expects 'nosniff')). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: x-dns-prefetch-control — The live app's responses did not include x-dns-prefetch-control (recommended by the OWASP Secure Headers Project (value: off)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: x-frame-options — The live app's responses did not include x-frame-options (blocks clickjacking via framing (or use CSP frame-ancestors)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: x-permitted-cross-domain-policies — The live app's responses did not include x-permitted-cross-domain-policies (recommended by the OWASP Secure Headers Project (value: none)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×11
Edited copy of a member (9 corresponding lines) server/application/admin/controller/AdminBase.php:57— server/application/admin/controller/AdminBase.php:57-65 | server/application/api/controller/ApiBase.php:60-69 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) server/application/admin/logic/PrinterLogic.php:202— server/application/admin/logic/PrinterLogic.php:202-212 | server/application/admin/logic/SmsLogic.php:80-88 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) REDACTED:636— REDACTED:636-644 | REDACTED:1073-1081 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) server/application/admin/logic/SelffetchVerifierLogic.php:127— server/application/admin/logic/SelffetchVerifierLogic.php:127-136 | server/application/admin/logic/SelffetchVerifierLogic.php:165-173 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) server/application/admin/validate/Coupon.php:73— server/application/admin/validate/Coupon.php:73-81 | server/application/common/validate/Coupon.php:88-96 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) server/application/admin/controller/Order.php:190— server/application/admin/controller/Order.php:190-198 | server/application/admin/controller/Printer.php:130-140 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) server/application/admin/controller/Bargain.php:102— server/application/admin/controller/Bargain.php:102-110 | server/application/admin/controller/Bargain.php:119-127 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) server/application/admin/controller/LuckDraw.php:121— server/application/admin/controller/LuckDraw.php:121-129 | server/application/admin/controller/LuckDraw.php:138-146 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) server/application/admin/controller/TeamActivity.php:106— server/application/admin/controller/TeamActivity.php:106-114 | server/application/admin/controller/TeamActivity.php:123-131 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) server/thinkphp/library/think/Env.php:48— server/thinkphp/library/think/Env.php:48-58 | server/public/install/YxEnv.php:49-57 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) server/application/api/validate/LoginPassword.php:48— server/application/api/validate/LoginPassword.php:48-56 | server/application/api/validate/Register.php:46-54 — 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 (10 lines × 2) server/application/admin/http/middleware/Login.php:80— server/application/admin/http/middleware/Login.php:80-89 | server/application/api/http/middleware/Login.php:119-128 — 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 (10 lines × 2) server/application/admin/logic/WechatCorporatePaymentLogic.php:89— server/application/admin/logic/WechatCorporatePaymentLogic.php:89-100 | server/application/admin/logic/WechatCorporatePaymentLogic.php:185-194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/admin/logic/WechatCorporatePaymentLogic.php:183` calls `search` and `server/application/admin/logic/WechatCorporatePaymentLogic.php:86` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) server/application/admin/validate/DistributionLevelValidate.php:94— server/application/admin/validate/DistributionLevelValidate.php:94-103 | server/application/admin/validate/DistributionLevelValidate.php:116-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) server/application/api/logic/WeChatLogic.php:108— server/application/api/logic/WeChatLogic.php:108-117 | server/application/api/logic/WeChatLogic.php:149-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) server/application/api/validate/AfterSale.php:97— server/application/api/validate/AfterSale.php:97-106 | server/application/api/validate/AfterSale.php:174-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) server/thinkphp/library/think/Debug.php:129— server/thinkphp/library/think/Debug.php:129-138 | server/thinkphp/library/think/Debug.php:175-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) server/application/admin/logic/SelffetchVerifierLogic.php:44— server/application/admin/logic/SelffetchVerifierLogic.php:44-53 | server/application/admin/logic/SelffetchVerifierLogic.php:220-229 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/SelffetchVerifierLogic.php:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) server/thinkphp/library/think/File.php:283— server/thinkphp/library/think/File.php:283-292 | server/thinkphp/library/think/Validate.php:805-814 — 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 (10 lines × 2) server/thinkphp/library/think/db/connector/Pgsql.php:89— server/thinkphp/library/think/db/connector/Pgsql.php:89-98 | server/thinkphp/library/think/db/connector/Sqlsrv.php:115-128 — before extracting anything, compare `server/thinkphp/library/think/db/connector/Pgsql.php` and `server/thinkphp/library/think/db/connector/Sqlsrv.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) server/application/admin/controller/LiveGoods.php:113— server/application/admin/controller/LiveGoods.php:113-122 | server/application/admin/controller/LiveRoom.php:78-87 — 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.
Low cohesion: Validate (LCOM4 16) server/thinkphp/library/think/Validate.php:17— Validate's methods fall into 16 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 16 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Request (LCOM4 13) server/thinkphp/library/think/Request.php:17— Request's methods fall into 13 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 13 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Rule (LCOM4 8) server/thinkphp/library/think/route/Rule.php:24— Rule's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: installModel (LCOM4 7) REDACTED:4— installModel's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Client (LCOM4 6) server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Client.cs:18— Client's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Model (LCOM4 6) server/thinkphp/library/think/Model.php:59— Model's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Debug (LCOM4 5) server/thinkphp/library/think/Debug.php:17— Debug's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Console (LCOM4 4) server/thinkphp/library/think/Console.php:21— Console's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Controller (LCOM4 4) server/thinkphp/library/think/Controller.php:17— Controller's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: OneToOne (LCOM4 4) server/thinkphp/library/think/model/relation/OneToOne.php:26— OneToOne's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
ClassTooLong: Query server/thinkphp/library/think/db/Query.php:31— ClassTooLong — 1293 significant lines (blank, comment-only and punctuation-only lines excluded), 173 methods. The bar is 400 significant lines; this is 893 over it, 3.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Connection server/thinkphp/library/think/db/Connection.php:25— ClassTooLong — 836 significant lines (blank, comment-only and punctuation-only lines excluded), 73 methods. The bar is 400 significant lines; this is 436 over it, 2.09× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Request server/thinkphp/library/think/Request.php:17— ClassTooLong — 805 significant lines (blank, comment-only and punctuation-only lines excluded), 108 methods. The bar is 400 significant lines; this is 405 over it, 2.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Template server/thinkphp/library/think/Template.php:21— ClassTooLong — 632 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 232 over it, 1.58× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GoodsLogic server/application/admin/logic/GoodsLogic.php:28— ClassTooLong — 598 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 198 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Validate server/thinkphp/library/think/Validate.php:17— ClassTooLong — 537 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. The bar is 400 significant lines; this is 137 over it, 1.34× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: UserLogic server/application/admin/logic/UserLogic.php:34— ClassTooLong — 501 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 101 over it, 1.25× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Builder server/thinkphp/library/think/db/Builder.php:17— ClassTooLong — 467 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 67 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Process REDACTED:21— ClassTooLong — 466 significant lines (blank, comment-only and punctuation-only lines excluded), 69 methods. The bar is 400 significant lines; this is 66 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×9
Edited copy of a member (13 corresponding lines) server/application/admin/controller/ArticleCategory.php:58— server/application/admin/controller/ArticleCategory.php:58-70 | server/application/admin/controller/HelpCategory.php:62-75 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) server/application/admin/controller/SelffetchShop.php:107— server/application/admin/controller/SelffetchShop.php:107-119 | server/application/admin/controller/SelffetchShop.php:129-141 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) server/application/admin/controller/SelffetchVerifier.php:124— server/application/admin/controller/SelffetchVerifier.php:124-136 | server/application/admin/controller/SelffetchVerifier.php:146-158 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) server/application/admin/controller/AdPosition.php:51— server/application/admin/controller/AdPosition.php:51-66 | server/application/admin/controller/Express.php:53-65 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) server/application/api/controller/Account.php:316— server/application/api/controller/Account.php:316-328 | server/application/api/controller/Account.php:340-353 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) server/thinkphp/library/think/console/input/Argument.php:83— server/thinkphp/library/think/console/input/Argument.php:83-95 | server/thinkphp/library/think/console/input/Option.php:143-155 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) server/thinkphp/library/think/db/Connection.php:1064— server/thinkphp/library/think/db/Connection.php:1064-1076 | server/thinkphp/library/think/db/Connection.php:1437-1450 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) server/thinkphp/library/think/Validate.php:345— server/thinkphp/library/think/Validate.php:345-361 | server/thinkphp/library/think/Validate.php:373-385 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) server/thinkphp/library/think/cache/driver/Memcache.php:188— server/thinkphp/library/think/cache/driver/Memcache.php:188-203 | server/thinkphp/library/think/cache/driver/Memcached.php:202-214 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×9
Edited copy of a member (7 corresponding lines) server/application/admin/controller/FileNew.php:60— server/application/admin/controller/FileNew.php:60-67 | REDACTED:233-239 — 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) server/application/common/server/YlyPrinter.php:54— server/application/common/server/YlyPrinter.php:54-61 | server/application/common/server/YlyPrinter.php:71-77 — 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) server/application/api/controller/Bargain.php:66— server/application/api/controller/Bargain.php:66-72 | server/application/api/controller/Share.php:78-87 — 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) server/thinkphp/library/think/console/output/formatter/Style.php:119— server/thinkphp/library/think/console/output/formatter/Style.php:119-125 | server/thinkphp/library/think/console/output/formatter/Style.php:135-142 — 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) server/application/admin/controller/Activity.php:144— server/application/admin/controller/Activity.php:144-150 | server/application/admin/controller/Seckill.php:163-172 — 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) server/application/admin/controller/DistributionMember.php:21— server/application/admin/controller/DistributionMember.php:21-27 | server/application/admin/controller/DistributionMember.php:37-46 — 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) server/application/admin/controller/Coupon.php:97— server/application/admin/controller/Coupon.php:97-103 | server/application/admin/controller/LuckDraw.php:36-51 — 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) server/application/admin/controller/AdPosition.php:35— server/application/admin/controller/AdPosition.php:35-42 | server/application/admin/controller/Sms.php:26-32 — 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) server/thinkphp/library/think/model/relation/HasMany.php:276— server/thinkphp/library/think/model/relation/HasMany.php:276-282 | server/thinkphp/library/think/model/relation/MorphMany.php:314-320 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×8
Members sharing a duplicated core (4 members, 50+ identical tokens) server/application/admin/logic/BargainLogic.php:57— server/application/admin/logic/BargainLogic.php:57-91 | server/application/admin/logic/BargainLogic.php:393-456 | server/application/admin/logic/TeamActivityLogic.php:59-106 | server/application/admin/logic/TeamFoundLogic.php:60-128 — 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) server/application/admin/logic/BargainLogic.php:154— server/application/admin/logic/BargainLogic.php:154-238 | server/application/admin/logic/BargainLogic.php:249-324 | server/application/admin/logic/TeamActivityLogic.php:139-228 | server/application/admin/logic/TeamActivityLogic.php:239-331 — 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) server/application/admin/logic/OrderLogic.php:54— server/application/admin/logic/OrderLogic.php:54-120 | server/application/admin/logic/OrderLogic.php:180-276 | server/application/admin/logic/UserLogic.php:45-133 | server/application/admin/logic/UserLogic.php:138-214 — 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) server/application/admin/logic/StatisticsLogic.php:62— server/application/admin/logic/StatisticsLogic.php:62-96 | server/application/admin/logic/StatisticsLogic.php:109-164 | server/application/admin/logic/StatisticsLogic.php:222-282 | server/application/admin/logic/StatisticsLogic.php:295-339 — 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) server/thinkphp/library/think/cache/driver/Memcache.php:102— server/thinkphp/library/think/cache/driver/Memcache.php:102-121 | server/thinkphp/library/think/cache/driver/Memcached.php:116-135 | server/thinkphp/library/think/cache/driver/Redis.php:126-149 | server/thinkphp/library/think/cache/driver/Xcache.php:84-103 — 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) server/thinkphp/library/think/db/builder/Mysql.php:120— server/thinkphp/library/think/db/builder/Mysql.php:120-170 | server/thinkphp/library/think/db/builder/Pgsql.php:59-90 | server/thinkphp/library/think/db/builder/Sqlite.php:67-94 | server/thinkphp/library/think/db/builder/Sqlsrv.php:90-125 — 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) server/thinkphp/library/think/db/connector/Mysql.php:80— server/thinkphp/library/think/db/connector/Mysql.php:80-108 | server/thinkphp/library/think/db/connector/Pgsql.php:57-78 | server/thinkphp/library/think/db/connector/Sqlite.php:46-67 | server/thinkphp/library/think/db/connector/Sqlsrv.php:58-104 — 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) server/thinkphp/library/think/route/Domain.php:162— server/thinkphp/library/think/route/Domain.php:162-170 | server/thinkphp/library/think/route/Domain.php:183-192 | server/thinkphp/library/think/route/Domain.php:205-213 | server/thinkphp/library/think/route/Domain.php:226-234 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×7
Edited copy of a member (10 corresponding lines) server/application/admin/controller/Order.php:37— server/application/admin/controller/Order.php:37-46 | server/application/admin/controller/Verification.php:38-48 — 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) server/application/admin/controller/PayConfig.php:50— server/application/admin/controller/PayConfig.php:50-59 | server/application/admin/controller/PayConfig.php:101-110 — 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) server/application/admin/validate/SelffetchShop.php:85— server/application/admin/validate/SelffetchShop.php:85-94 | server/application/admin/validate/SelffetchVerifier.php:71-81 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) server/thinkphp/library/think/model/concern/RelationShip.php:129— server/thinkphp/library/think/model/concern/RelationShip.php:129-142 | server/thinkphp/library/think/model/relation/OneToOne.php:292-301 — 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) server/application/admin/controller/LiveGoods.php:45— server/application/admin/controller/LiveGoods.php:45-54 | server/application/admin/controller/LiveRoom.php:38-47 — 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) server/thinkphp/library/think/db/connector/Mysql.php:119— server/thinkphp/library/think/db/connector/Mysql.php:119-128 | server/thinkphp/library/think/db/connector/Sqlite.php:78-90 — 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) server/application/admin/controller/FaceSheetSender.php:50— server/application/admin/controller/FaceSheetSender.php:50-59 | server/application/admin/controller/LiveRoom.php:58-67 — 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 (4 corresponding lines) · ×7
Edited copy of a member (4 corresponding lines) server/thinkphp/library/think/view/driver/Php.php:155— server/thinkphp/library/think/view/driver/Php.php:155-158 | server/thinkphp/library/think/view/driver/Think.php:157-160 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) server/application/api/controller/Article.php:48— server/application/api/controller/Article.php:48-54 | server/application/api/controller/Help.php:46-49 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) server/application/admin/logic/GoodsCommentLogic.php:160— server/application/admin/logic/GoodsCommentLogic.php:160-165 | server/application/admin/logic/SupplierLogic.php:96-99 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) server/application/admin/logic/SelffetchShopLogic.php:158— server/application/admin/logic/SelffetchShopLogic.php:158-161 | server/application/admin/logic/SelffetchVerifierLogic.php:185-188 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) server/thinkphp/library/think/Request.php:311— server/thinkphp/library/think/Request.php:311-314 | server/thinkphp/library/think/Route.php:149-153 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) server/application/admin/logic/SelffetchShopLogic.php:173— server/application/admin/logic/SelffetchShopLogic.php:173-176 | server/application/admin/logic/SelffetchVerifierLogic.php:200-203 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) server/application/admin/logic/MnpMessageLogic.php:65— server/application/admin/logic/MnpMessageLogic.php:65-68 | server/application/admin/logic/OaMessageLogic.php:66-69 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) server/application/admin/logic/GoodsLogic.php:637— server/application/admin/logic/GoodsLogic.php:637-649 | server/application/admin/logic/GoodsLogic.php:683-695 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) server/application/admin/logic/WechatCorporatePaymentLogic.php:54— server/application/admin/logic/WechatCorporatePaymentLogic.php:54-66 | server/application/admin/logic/WechatMerchantTransferLogic.php:52-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (13 lines × 2) server/application/api/server/UserServer.php:70— server/application/api/server/UserServer.php:70-82 | server/application/api/server/UserServer.php:201-213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) server/application/common/logic/QrCodeLogic.php:82— server/application/common/logic/QrCodeLogic.php:82-94 | server/application/common/logic/QrCodeLogic.php:447-459 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/common/logic/QrCodeLogic.php:82` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) server/application/common/server/DistributionServer.php:81— server/application/common/server/DistributionServer.php:81-93 | server/application/common/server/DistributionServer.php:100-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/common/server/DistributionServer.php:81` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) server/thinkphp/library/think/process/exception/Faild.php:23— server/thinkphp/library/think/process/exception/Faild.php:23-35 | server/thinkphp/library/think/process/exception/Failed.php:23-35 — before extracting anything, compare `server/thinkphp/library/think/process/exception/Faild.php` and `server/thinkphp/library/think/process/exception/Failed.php` as WHOLE FILES: 95% 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.
Duplicated block (13 lines × 2) server/application/admin/validate/Bargain.php:66— server/application/admin/validate/Bargain.php:66-78 | server/application/admin/validate/TeamActivity.php:59-71 — 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 `server/application/admin/validate/Bargain.php:66` 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.
MethodTooLong: GoodsLogic.edit server/application/admin/logic/GoodsLogic.php:447— MethodTooLong — edit runs 229 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 129 over it, 2.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Menu_.getMenuContent server/application/common/model/Menu_.php:66— MethodTooLong — getMenuContent runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GoodsLogic.add server/application/admin/logic/GoodsLogic.php:261— MethodTooLong — add runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CouponLogic.orderCoupon server/application/api/logic/CouponLogic.php:280— MethodTooLong — orderCoupon runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PcLogic.pcLists server/application/api/logic/PcLogic.php:33— MethodTooLong — pcLists runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FaceSheetOrderLogic.print server/application/admin/logic/FaceSheetOrderLogic.php:150— MethodTooLong — print runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×6
Edited copy of a member (18 corresponding lines) server/application/admin/logic/SelffetchShopLogic.php:75— server/application/admin/logic/SelffetchShopLogic.php:75-92 | server/application/admin/logic/SelffetchShopLogic.php:129-146 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) server/application/admin/controller/Ad.php:48— server/application/admin/controller/Ad.php:48-65 | server/application/admin/controller/Ad.php:76-95 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) server/application/admin/logic/DistributionGoodsLogic.php:41— server/application/admin/logic/DistributionGoodsLogic.php:41-73 | server/application/admin/logic/DistributionMemberLogic.php:91-108 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) server/application/api/controller/Sms.php:40— server/application/api/controller/Sms.php:40-57 | REDACTED:314-331 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) server/application/api/logic/UserAddressLogic.php:105— server/application/api/logic/UserAddressLogic.php:105-122 | server/application/api/logic/UserAddressLogic.php:181-211 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) server/application/common/behavior/GiveReward.php:78— server/application/common/behavior/GiveReward.php:78-95 | server/application/common/behavior/GiveReward.php:109-126 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×6
Edited copy of a member (16 corresponding lines) server/application/admin/logic/ActivityAreaLogic.php:200— server/application/admin/logic/ActivityAreaLogic.php:200-215 | server/application/admin/logic/SeckillLogic.php:193-209 — 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) server/thinkphp/library/think/Collection.php:120— server/thinkphp/library/think/Collection.php:120-135 | server/thinkphp/library/think/Collection.php:148-163 — 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) server/thinkphp/library/think/Session.php:269— server/thinkphp/library/think/Session.php:269-292 | server/thinkphp/library/think/Session.php:489-504 — 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) server/application/common/logic/AfterSaleLogLogic.php:33— server/application/common/logic/AfterSaleLogLogic.php:33-49 | server/application/common/logic/OrderLogLogic.php:33-48 — 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) server/public/install/YxEnv.php:137— server/public/install/YxEnv.php:137-152 | server/thinkphp/library/think/Env.php:95-111 — 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) server/thinkphp/library/think/model/relation/BelongsToMany.php:344— server/thinkphp/library/think/model/relation/BelongsToMany.php:344-359 | server/thinkphp/library/think/model/relation/MorphOne.php:157-175 — 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 (12 corresponding lines) · ×6
Edited copy of a member (12 corresponding lines) server/application/admin/logic/FaceSheetLogic.php:38— server/application/admin/logic/FaceSheetLogic.php:38-49 | server/application/admin/logic/FaceSheetSenderLogic.php:38-53 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) server/application/admin/validate/GoodsCategory.php:65— server/application/admin/validate/GoodsCategory.php:65-76 | server/application/admin/validate/SignDaily.php:89-102 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) server/application/admin/controller/MenuDecorate.php:89— server/application/admin/controller/MenuDecorate.php:89-102 | server/application/admin/controller/User.php:117-128 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) server/application/admin/controller/AfterSale.php:145— server/application/admin/controller/AfterSale.php:145-156 | server/application/admin/controller/Order.php:74-85 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) server/application/admin/logic/SeckillLogic.php:95— server/application/admin/logic/SeckillLogic.php:95-106 | server/application/admin/logic/UserGroupLogic.php:32-48 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) server/thinkphp/library/think/console/command/Make.php:59— server/thinkphp/library/think/console/command/Make.php:59-70 | server/thinkphp/library/think/console/command/make/Command.php:32-43 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (18 lines × 2) server/application/admin/logic/MenuDecorateLogic.php:55— server/application/admin/logic/MenuDecorateLogic.php:55-72 | server/application/admin/logic/MenuDecorateLogic.php:78-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2) server/application/admin/logic/OrderLogic.php:78— server/application/admin/logic/OrderLogic.php:78-95 | server/application/admin/logic/OrderLogic.php:203-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/OrderLogic.php:78` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) server/application/admin/logic/TeamActivityLogic.php:211— server/application/admin/logic/TeamActivityLogic.php:211-228 | server/application/admin/logic/TeamActivityLogic.php:314-331 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/TeamActivityLogic.php:211` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/admin/logic/TeamActivityLogic.php:210` calls `TeamGoodsItemModel` and `server/application/admin/logic/TeamActivityLogic.php:313` 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 (18 lines × 2) server/application/admin/logic/WithdrawLogic.php:282— server/application/admin/logic/WithdrawLogic.php:282-299 | server/application/common/command/WechatMerchantTransfer.php:65-82 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/WithdrawLogic.php:282` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) server/application/common/logic/QrCodeLogic.php:101— server/application/common/logic/QrCodeLogic.php:101-118 | server/application/common/logic/QrCodeLogic.php:466-483 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/common/logic/QrCodeLogic.php:101` 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 (18 lines × 2) server/application/api/logic/OrderLogic.php:526— server/application/api/logic/OrderLogic.php:526-543 | server/application/api/logic/TeamLogic.php:268-285 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (14 lines × 2) server/application/admin/logic/SelffetchShopLogic.php:76— server/application/admin/logic/SelffetchShopLogic.php:76-89 | server/application/admin/logic/SelffetchShopLogic.php:130-143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) server/application/api/logic/LoginPasswordLogic.php:34— server/application/api/logic/LoginPasswordLogic.php:34-47 | server/application/api/logic/LoginPasswordLogic.php:67-80 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/api/logic/LoginPasswordLogic.php:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) server/application/common/logic/DistributionOrderGoodsLogic.php:146— server/application/common/logic/DistributionOrderGoodsLogic.php:146-159 | server/application/common/logic/DistributionOrderGoodsLogic.php:205-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) server/thinkphp/library/think/db/Connection.php:1379— server/thinkphp/library/think/db/Connection.php:1379-1392 | server/thinkphp/library/think/db/connector/Sqlsrv.php:175-188 — before extracting anything, compare `server/thinkphp/library/think/db/Connection.php` and `server/thinkphp/library/think/db/connector/Sqlsrv.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 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 `server/thinkphp/library/think/db/Connection.php:1379` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) server/thinkphp/library/think/db/Connection.php:1395— server/thinkphp/library/think/db/Connection.php:1395-1408 | server/thinkphp/library/think/db/connector/Sqlsrv.php:191-204 — before extracting anything, compare `server/thinkphp/library/think/db/Connection.php` and `server/thinkphp/library/think/db/connector/Sqlsrv.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 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 `server/thinkphp/library/think/db/Connection.php:1395` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) server/thinkphp/library/think/model/relation/MorphMany.php:110— server/thinkphp/library/think/model/relation/MorphMany.php:110-123 | server/thinkphp/library/think/model/relation/MorphOne.php:109-122 — before extracting anything, compare `server/thinkphp/library/think/model/relation/MorphMany.php` and `server/thinkphp/library/think/model/relation/MorphOne.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 `server/thinkphp/library/think/model/relation/MorphMany.php:110` 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.
AXI1 · Runtime container hardening· Container process runs as root · ×5
Container process runs as root: likeshop-mysql — 'likeshop-mysql' (mysql:5.7.29) runs as uid 0 — no user was specified, or one resolving to root was. Observed on the running container, which is the only place the answer is settled: an image's own USER, a base image's inherited one and a compose override are all invisible to a Dockerfile reader. Advisory evidence for CRA Annex I (2)(b).
Container process runs as root: likeshop-nginx — 'likeshop-nginx' (nginx:1.17.0) runs as uid 0 — no user was specified, or one resolving to root was. Observed on the running container, which is the only place the answer is settled: an image's own USER, a base image's inherited one and a compose override are all invisible to a Dockerfile reader. Advisory evidence for CRA Annex I (2)(b).
Container process runs as root: likeshop-node — 'likeshop-node' (node:10.15.3) runs as uid 0 — no user was specified, or one resolving to root was. Observed on the running container, which is the only place the answer is settled: an image's own USER, a base image's inherited one and a compose override are all invisible to a Dockerfile reader. Advisory evidence for CRA Annex I (2)(b).
Container process runs as root: likeshop-php7.2.4-fpm — 'likeshop-php7.2.4-fpm' (likeshop/php:7.2.4-fpm) runs as uid 0 — no user was specified, or one resolving to root was. Observed on the running container, which is the only place the answer is settled: an image's own USER, a base image's inherited one and a compose override are all invisible to a Dockerfile reader. Advisory evidence for CRA Annex I (2)(b).
Container process runs as root: likeshop-redis — 'likeshop-redis' (redis:5.0.5) runs as uid 0 — no user was specified, or one resolving to root was. Observed on the running container, which is the only place the answer is settled: an image's own USER, a base image's inherited one and a compose override are all invisible to a Dockerfile reader. Advisory evidence for CRA Annex I (2)(b).
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×5
Edited copy of a member (11 corresponding lines) server/application/admin/logic/MnpLogic.php:53— server/application/admin/logic/MnpLogic.php:53-73 | server/application/admin/logic/OaLogic.php:49-62 — 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.
Edited copy of a member (11 corresponding lines) server/application/admin/logic/LiveGoodsLogic.php:142— server/application/admin/logic/LiveGoodsLogic.php:142-152 | server/application/admin/logic/LiveRoomLogic.php:174-185 — 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.
Edited copy of a member (11 corresponding lines) server/application/api/controller/Distribution.php:35— server/application/api/controller/Distribution.php:35-48 | server/application/api/controller/Distribution.php:56-66 — 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.
Edited copy of a member (11 corresponding lines) server/application/admin/controller/Seckill.php:55— server/application/admin/controller/Seckill.php:55-66 | server/application/admin/controller/Seckill.php:74-84 — 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.
Edited copy of a member (11 corresponding lines) server/thinkphp/library/think/console/output/formatter/Style.php:77— server/thinkphp/library/think/console/output/formatter/Style.php:77-87 | server/thinkphp/library/think/console/output/formatter/Style.php:98-108 — 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 (19 corresponding lines) · ×5
Edited copy of a member (19 corresponding lines) server/application/admin/controller/FileNew.php:72— server/application/admin/controller/FileNew.php:72-90 | server/application/admin/controller/FileNew.php:95-116 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) server/application/common/logic/QrCodeLogic.php:229— server/application/common/logic/QrCodeLogic.php:229-247 | server/application/common/logic/QrCodeLogic.php:562-584 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) server/thinkphp/library/think/Model.php:728— server/thinkphp/library/think/Model.php:728-746 | server/thinkphp/library/think/Model.php:761-779 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) server/thinkphp/library/think/model/relation/BelongsToMany.php:374— server/thinkphp/library/think/model/relation/BelongsToMany.php:374-392 | server/thinkphp/library/think/model/relation/MorphMany.php:195-214 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) server/application/common/logic/FileCateLogic.php:46— server/application/common/logic/FileCateLogic.php:46-64 | server/application/common/logic/FileCateLogic.php:74-92 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×5
Edited copy of a member (15 corresponding lines) server/thinkphp/library/think/console/output/driver/Console.php:198— server/thinkphp/library/think/console/output/driver/Console.php:198-212 | server/thinkphp/library/think/console/output/driver/Console.php:221-237 — 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) server/application/admin/controller/DistributionLevel.php:31— server/application/admin/controller/DistributionLevel.php:31-45 | server/application/admin/controller/DistributionLevel.php:55-71 — 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) server/application/admin/controller/User.php:75— server/application/admin/controller/User.php:75-89 | server/application/admin/controller/User.php:96-110 — 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) server/application/common/logic/FileCateLogic.php:157— server/application/common/logic/FileCateLogic.php:157-176 | server/application/common/model/FileCate.php:73-87 — 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) server/thinkphp/library/think/view/driver/Php.php:69— server/thinkphp/library/think/view/driver/Php.php:69-86 | server/thinkphp/library/think/view/driver/Think.php:79-93 — 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) · ×5
Edited copy of a member (5 corresponding lines) server/application/admin/logic/WechatReplyLogic.php:56— server/application/admin/logic/WechatReplyLogic.php:56-61 | server/application/admin/logic/WechatReplyLogic.php:69-73 — 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) server/application/admin/model/User.php:81— server/application/admin/model/User.php:81-85 | server/application/api/model/User.php:35-39 — 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) server/application/admin/logic/AdLogic.php:199— server/application/admin/logic/AdLogic.php:199-203 | server/application/admin/logic/UserPrivilegeLogic.php:55-59 — 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) server/thinkphp/library/think/Template.php:147— server/thinkphp/library/think/Template.php:147-151 | server/thinkphp/library/think/db/Connection.php:477-481 — 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) server/thinkphp/library/think/console/Input.php:417— server/thinkphp/library/think/console/Input.php:417-421 | server/thinkphp/library/think/console/input/Definition.php:254-258 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (15 lines × 2) server/application/admin/logic/RoleLogic.php:89— server/application/admin/logic/RoleLogic.php:89-103 | server/application/admin/logic/RoleLogic.php:129-143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/RoleLogic.php:89` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) server/application/admin/logic/WithdrawLogic.php:187— server/application/admin/logic/WithdrawLogic.php:187-201 | server/application/admin/logic/WithdrawLogic.php:218-232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/WithdrawLogic.php:187` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) REDACTED:625— REDACTED:625-639 | REDACTED:672-686 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:625` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) server/application/common/logic/FileCateLogic.php:162— server/application/common/logic/FileCateLogic.php:162-176 | server/application/common/model/FileCate.php:73-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) server/thinkphp/library/think/process/pipes/Unix.php:159— server/thinkphp/library/think/process/pipes/Unix.php:159-173 | server/thinkphp/library/think/process/pipes/Windows.php:212-226 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (12 lines × 2) server/application/admin/logic/TeamActivityLogic.php:356— server/application/admin/logic/TeamActivityLogic.php:356-367 | server/application/admin/logic/TeamActivityLogic.php:387-398 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/TeamActivityLogic.php:356` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) server/application/api/logic/CouponLogic.php:77— server/application/api/logic/CouponLogic.php:77-88 | server/application/api/logic/CouponLogic.php:154-165 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/api/logic/CouponLogic.php:77` 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 (12 lines × 2) server/application/api/logic/UserAddressLogic.php:83— server/application/api/logic/UserAddressLogic.php:83-94 | server/application/api/logic/UserAddressLogic.php:306-317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) server/application/common/logic/QrCodeLogic.php:168— server/application/common/logic/QrCodeLogic.php:168-179 | server/application/common/logic/QrCodeLogic.php:531-542 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/common/logic/QrCodeLogic.php:163` calls `writeText`, `floatval` and `server/application/common/logic/QrCodeLogic.php:527` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) server/thinkphp/library/think/db/builder/Pgsql.php:35— server/thinkphp/library/think/db/builder/Pgsql.php:35-46 | server/thinkphp/library/think/db/builder/Sqlite.php:32-43 — before extracting anything, compare `server/thinkphp/library/think/db/builder/Pgsql.php` and `server/thinkphp/library/think/db/builder/Sqlite.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
REDACTED.layui.config().extend().use() (cognitive 20) server/application/admin/view/ad_position/lists.html:105— REDACTED.layui.config().extend().use() has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 6). None of this is in the body itself: all 20 points belong to 8 function literals inside it that branch (lines 269, 183, 163, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
REDACTED.layui.config().extend().use() (cognitive 20) server/application/admin/view/article/lists.html:93— REDACTED.layui.config().extend().use() has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 6). None of this is in the body itself: all 20 points belong to 8 function literals inside it that branch (lines 256, 172, 152, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
REDACTED.layui.config().extend().use() (cognitive 20) server/application/admin/view/face_sheet_order/lists.html:129— REDACTED.layui.config().extend().use() has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6, ternaries 2, error handling 1 (nesting depth added 1). None of this is in the body itself: all 20 points belong to 11 function literals inside it that branch (lines 239, 211, 206, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
REDACTED.layui.config().extend().use() (cognitive 20) server/application/admin/view/help/lists.html:91— REDACTED.layui.config().extend().use() has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 6). None of this is in the body itself: all 20 points belong to 8 function literals inside it that branch (lines 253, 169, 150, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×4
Edited copy of a member (17 corresponding lines) server/application/common/server/AliPayServer.php:182— server/application/common/server/AliPayServer.php:182-219 | server/application/common/server/WeChatPayServer.php:274-311 — 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) server/thinkphp/library/think/model/relation/BelongsTo.php:139— server/thinkphp/library/think/model/relation/BelongsTo.php:139-155 | server/thinkphp/library/think/model/relation/HasOne.php:138-154 — 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) server/application/admin/logic/MnpMessageLogic.php:74— server/application/admin/logic/MnpMessageLogic.php:74-94 | server/application/admin/logic/OaMessageLogic.php:75-91 — 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) server/thinkphp/library/think/model/relation/BelongsTo.php:53— server/thinkphp/library/think/model/relation/BelongsTo.php:53-69 | server/thinkphp/library/think/model/relation/HasOne.php:52-69 — 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 (14 corresponding lines) · ×4
Edited copy of a member (14 corresponding lines) server/thinkphp/library/think/Debug.php:125— server/thinkphp/library/think/Debug.php:125-138 | server/thinkphp/library/think/Debug.php:171-184 — 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.
Edited copy of a member (14 corresponding lines) server/application/admin/logic/ActivityAreaLogic.php:29— server/application/admin/logic/ActivityAreaLogic.php:29-43 | server/application/admin/logic/UserPrivilegeLogic.php:26-39 — 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.
Edited copy of a member (14 corresponding lines) server/application/admin/controller/Coupon.php:39— server/application/admin/controller/Coupon.php:39-52 | server/application/admin/controller/Coupon.php:60-76 — 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.
Edited copy of a member (14 corresponding lines) server/thinkphp/library/think/model/relation/HasMany.php:52— server/thinkphp/library/think/model/relation/HasMany.php:52-67 | server/thinkphp/library/think/model/relation/MorphMany.php:57-70 — 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.
Duplicated block (21 lines × 2) server/application/api/logic/CouponLogic.php:307— server/application/api/logic/CouponLogic.php:307-327 | server/application/api/validate/Order.php:118-138 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (21 lines × 2) server/public/install/YxEnv.php:62— server/public/install/YxEnv.php:62-82 | server/thinkphp/library/think/Env.php:63-83 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21 lines × 2) server/thinkphp/library/think/model/concern/Attribute.php:416— server/thinkphp/library/think/model/concern/Attribute.php:416-436 | server/thinkphp/library/think/model/concern/Attribute.php:575-595 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/thinkphp/library/think/model/concern/Attribute.php:416` 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 (21 lines × 2) server/thinkphp/library/think/model/relation/HasManyThrough.php:275— server/thinkphp/library/think/model/relation/HasManyThrough.php:275-295 | server/thinkphp/library/think/model/relation/HasManyThrough.php:311-331 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19–20 lines × 2) server/application/admin/logic/GoodsCategoryLogic.php:36— server/application/admin/logic/GoodsCategoryLogic.php:36-55 | server/application/admin/logic/GoodsCategoryLogic.php:66-84 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19–20 lines × 2) server/application/admin/logic/LiveRoomLogic.php:62— server/application/admin/logic/LiveRoomLogic.php:62-80 | server/application/api/logic/LiveRoomLogic.php:48-67 — 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 (19–20 lines × 2) server/application/api/logic/ArticleLogic.php:90— server/application/api/logic/ArticleLogic.php:90-108 | server/application/api/logic/HelpLogic.php:91-110 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (19–20 lines × 2) server/thinkphp/library/think/console/command/RouteList.php:54— server/thinkphp/library/think/console/command/RouteList.php:54-73 | server/thinkphp/library/think/console/command/optimize/Route.php:39-57 — 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 `server/thinkphp/library/think/console/command/RouteList.php:54` 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 (19 lines × 2) server/application/admin/logic/GoodsLogic.php:60— server/application/admin/logic/GoodsLogic.php:60-78 | server/application/admin/logic/GoodsLogic.php:177-195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19 lines × 2) server/thinkphp/library/think/db/builder/Pgsql.php:72— server/thinkphp/library/think/db/builder/Pgsql.php:72-90 | server/thinkphp/library/think/db/builder/Sqlite.php:76-94 — before extracting anything, compare `server/thinkphp/library/think/db/builder/Pgsql.php` and `server/thinkphp/library/think/db/builder/Sqlite.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 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 `server/thinkphp/library/think/db/builder/Pgsql.php:72` 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. 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 (19 lines × 2) server/thinkphp/library/think/model/relation/BelongsTo.php:253— server/thinkphp/library/think/model/relation/BelongsTo.php:253-271 | server/thinkphp/library/think/model/relation/HasOne.php:252-270 — before extracting anything, compare `server/thinkphp/library/think/model/relation/BelongsTo.php` and `server/thinkphp/library/think/model/relation/HasOne.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `server/thinkphp/library/think/model/relation/BelongsTo.php:253` 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 (19 lines × 2) server/application/common/server/FileServer.php:69— server/application/common/server/FileServer.php:69-87 | server/application/common/server/FileServer.php:388-406 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/common/server/FileServer.php:69` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/common/server/FileServer.php:64` calls `getFileName`, `getFileInfo` and `server/application/common/server/FileServer.php:384` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16–17 lines × 2) server/application/admin/logic/TeamActivityLogic.php:139— server/application/admin/logic/TeamActivityLogic.php:139-154 | server/application/admin/logic/TeamActivityLogic.php:239-255 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/TeamActivityLogic.php:139` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16–17 lines × 2) server/application/admin/logic/UserLogic.php:48— server/application/admin/logic/UserLogic.php:48-64 | server/application/admin/logic/UserLogic.php:138-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/UserLogic.php:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 2) server/thinkphp/library/think/Console.php:522— server/thinkphp/library/think/Console.php:522-538 | server/thinkphp/library/think/Console.php:567-582 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/thinkphp/library/think/Console.php:522` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 2) server/thinkphp/library/think/model/relation/HasMany.php:98— server/thinkphp/library/think/model/relation/HasMany.php:98-113 | server/thinkphp/library/think/model/relation/HasManyThrough.php:172-188 — 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 `server/thinkphp/library/think/model/relation/HasMany.php:98` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) server/application/api/logic/CouponLogic.php:438— server/application/api/logic/CouponLogic.php:438-453 | server/application/api/logic/CouponLogic.php:467-482 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/api/logic/CouponLogic.php:438` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) server/application/common/server/AliPayServer.php:195— server/application/common/server/AliPayServer.php:195-210 | server/application/common/server/WeChatPayServer.php:287-302 — 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 `server/application/common/server/AliPayServer.php:195` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) server/thinkphp/library/think/db/Connection.php:1139— server/thinkphp/library/think/db/Connection.php:1139-1154 | server/thinkphp/library/think/db/Connection.php:1209-1224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) server/thinkphp/library/think/model/relation/HasMany.php:161— server/thinkphp/library/think/model/relation/HasMany.php:161-176 | server/thinkphp/library/think/model/relation/HasOne.php:109-124 — before extracting anything, compare `server/thinkphp/library/think/model/relation/HasMany.php` and `server/thinkphp/library/think/model/relation/HasOne.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. 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 × 5) server/application/admin/logic/GoodsLogic.php:107— server/application/admin/logic/GoodsLogic.php:107-111 | server/application/admin/logic/RechargeLogLogic.php:34-38 | server/application/admin/logic/UserLogic.php:56-62 | server/application/admin/logic/UserLogic.php:146-151 | server/application/api/logic/GoodsLogic.php:46-51 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/GoodsLogic.php:107` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/admin/logic/RechargeLogLogic.php:33` calls `isset` and `server/application/admin/logic/GoodsLogic.php:106` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 5) server/application/admin/logic/GoodsLogic.php:107— server/application/admin/logic/GoodsLogic.php:107-111 | server/application/admin/logic/GoodsLogic.php:204-208 | server/application/admin/logic/UserLogic.php:61-66 | server/application/admin/logic/UserLogic.php:150-155 | server/application/api/logic/GoodsLogic.php:46-51 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/GoodsLogic.php:107` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 5) server/application/admin/logic/ArticleCategoryLogic.php:111— server/application/admin/logic/ArticleCategoryLogic.php:111-115 | server/application/admin/logic/ArticleLogic.php:130-134 | server/application/admin/logic/GoodsCommentLogic.php:172-176 | server/application/admin/logic/HelpCategoryLogic.php:108-112 | server/application/admin/logic/HelpLogic.php:118-122 — before extracting anything, compare `server/application/admin/logic/ArticleCategoryLogic.php` and `server/application/admin/logic/HelpCategoryLogic.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 5) server/application/admin/controller/Admin.php:56— server/application/admin/controller/Admin.php:56-60 | server/application/admin/controller/Auth.php:53-57 | server/application/admin/controller/Auth.php:81-85 | server/application/admin/controller/Crontab.php:50-54 | server/application/admin/controller/Crontab.php:69-73 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/controller/Admin.php:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 4) server/application/admin/logic/CommentHelperLogic.php:47— server/application/admin/logic/CommentHelperLogic.php:47-51 | server/application/admin/logic/FreightLogic.php:37-42 | server/application/admin/logic/OrderLogic.php:89-95 | server/application/admin/logic/OrderLogic.php:214-220 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/CommentHelperLogic.php:47` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 4) server/application/admin/logic/SelffetchShopLogic.php:37— server/application/admin/logic/SelffetchShopLogic.php:37-41 | server/application/admin/logic/SelffetchShopLogic.php:188-192 | server/application/admin/logic/SelffetchVerifierLogic.php:39-43 | server/application/admin/logic/SelffetchVerifierLogic.php:215-219 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/SelffetchShopLogic.php:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 4) server/application/admin/logic/ExpressLogic.php:147— server/application/admin/logic/ExpressLogic.php:147-151 | server/application/admin/logic/RoleLogic.php:155-159 | server/application/admin/logic/UserGroupLogic.php:93-97 | server/application/common/logic/FileCateLogic.php:103-107 — 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.
Duplicated block (5 lines × 4) server/thinkphp/library/think/Loader.php:208— server/thinkphp/library/think/Loader.php:208-212 | server/thinkphp/library/think/Loader.php:315-319 | server/thinkphp/library/think/Validate.php:244-248 | server/thinkphp/library/think/Validate.php:260-264 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Hotspot: pc/plugins/axios.js pc/plugins/axios.js:14— pc/plugins/axios.js changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in axios.default at line 14. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:03:53 +08:00' --until='2026-09-23 14:03:53 +08:00' --full-history --no-merges -- pc/plugins/axios.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: uniapp/utils/request.js uniapp/utils/request.js:40— uniapp/utils/request.js changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in request.service.interceptors.request.use() at line 40. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:03:53 +08:00' --until='2026-09-23 14:03:53 +08:00' --full-history --no-merges -- uniapp/utils/request.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: server/application/admin/logic/AfterSaleLogic.php server/application/admin/logic/AfterSaleLogic.php:45— server/application/admin/logic/AfterSaleLogic.php changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in AfterSaleLogic.lists at line 45. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:03:53 +08:00' --until='2026-09-23 14:03:53 +08:00' --full-history --no-merges -- server/application/admin/logic/AfterSaleLogic.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
style_html::Parser::get_tag (cognitive 46) REDACTED:3129— style_html::Parser::get_tag has cognitive complexity 46 (threshold 15). Drivers by points: if/else 23 (37 pts), boolean chains 4, ternaries 1 (3 pts), loops 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
style_html::Parser::get_content (cognitive 21) REDACTED:3038— style_html::Parser::get_content has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 pts), ternaries 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
style_html::Parser::get_unformatted (cognitive 17) REDACTED:3218— style_html::Parser::get_unformatted has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
layedit.layui.define()::toolActive::contextmenu (cognitive 31) REDACTED:1745— layedit.layui.define()::toolActive::contextmenu has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 23, if/else 3 (6 pts), match/switch 1 (2 pts) (nesting depth added 4). 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. This shape REPEATS in the file: 2 other methods here (layedit.layui.define()::insertInline, layedit.layui.define()::insertInlineAll) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
layedit.layui.define()::insertInline (cognitive 20) REDACTED:506— layedit.layui.define()::insertInline has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (layedit.layui.define()::insertInlineAll, layedit.layui.define()::toolActive::contextmenu) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
layedit.layui.define()::insertInlineAll (cognitive 17) REDACTED:556— layedit.layui.define()::insertInlineAll has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (layedit.layui.define()::insertInline, layedit.layui.define()::toolActive::contextmenu) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
REDACTED.layui.config().extend().use() (cognitive 17) server/application/admin/view/activity/lists.html:93— REDACTED.layui.config().extend().use() has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 1 (nesting depth added 4). None of this is in the body itself: all 17 points belong to 10 function literals inside it that branch (lines 237, 112, 143, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
REDACTED.layui.config().extend().use() (cognitive 17) REDACTED:97— REDACTED.layui.config().extend().use() has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 5). None of this is in the body itself: all 17 points belong to 7 function literals inside it that branch (lines 262, 199, 158, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
REDACTED.layui.config().extend().use() (cognitive 17) server/application/admin/view/seckill/lists.html:95— REDACTED.layui.config().extend().use() has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 1 (nesting depth added 4). None of this is in the body itself: all 17 points belong to 10 function literals inside it that branch (lines 239, 114, 145, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (5 members, 50+ identical tokens) server/application/admin/controller/Admin.php:56— server/application/admin/controller/Admin.php:56-67 | server/application/admin/controller/Auth.php:53-68 | server/application/admin/controller/Auth.php:81-97 | server/application/admin/controller/Crontab.php:50-60 | server/application/admin/controller/Crontab.php:69-81 — 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) server/application/admin/logic/OrderLogic.php:628— server/application/admin/logic/OrderLogic.php:628-655 | server/application/admin/logic/PrinterLogic.php:76-127 | server/application/admin/logic/PrinterLogic.php:136-181 | server/application/admin/logic/PrinterLogic.php:294-329 | server/application/admin/logic/PrinterLogic.php:387-413 — 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) server/application/admin/logic/OrderLogic.php:666— server/application/admin/logic/OrderLogic.php:666-686 | server/application/admin/logic/VerificationLogic.php:314-329 | server/application/admin/logic/VerificationLogic.php:341-360 | server/application/api/logic/OrderLogic.php:1403-1415 | server/application/common/behavior/Printer.php:72-86 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×3
Edited copy of a member (35 corresponding lines) server/thinkphp/library/think/view/driver/Php.php:112— server/thinkphp/library/think/view/driver/Php.php:112-150 | server/thinkphp/library/think/view/driver/Think.php:118-152 — These two members are one piece of code written twice and then edited apart: 35 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 (35 corresponding lines) server/thinkphp/library/think/db/Query.php:3009— server/thinkphp/library/think/db/Query.php:3009-3047 | server/thinkphp/library/think/db/Query.php:3136-3170 — These two members are one piece of code written twice and then edited apart: 35 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 (35 corresponding lines) server/application/admin/logic/MenuDecorateLogic.php:177— server/application/admin/logic/MenuDecorateLogic.php:177-211 | server/application/admin/logic/MenuDecorateLogic.php:252-286 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×3
Edited copy of a member (30 corresponding lines) server/application/admin/logic/ArticleLogic.php:31— server/application/admin/logic/ArticleLogic.php:31-69 | server/application/admin/logic/HelpLogic.php:31-60 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) REDACTED:610— REDACTED:610-639 | REDACTED:656-686 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) server/application/admin/logic/AdLogic.php:113— server/application/admin/logic/AdLogic.php:113-145 | server/application/admin/logic/AdLogic.php:158-187 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×3
Edited copy of a member (22 corresponding lines) server/application/api/logic/LoginPasswordLogic.php:34— server/application/api/logic/LoginPasswordLogic.php:34-59 | server/application/api/logic/LoginPasswordLogic.php:67-88 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) server/application/admin/logic/SelffetchShopLogic.php:37— server/application/admin/logic/SelffetchShopLogic.php:37-63 | server/application/admin/logic/SelffetchShopLogic.php:188-209 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) server/thinkphp/library/traits/controller/Jump.php:41— server/thinkphp/library/traits/controller/Jump.php:41-63 | server/thinkphp/library/traits/controller/Jump.php:78-99 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×3
Edited copy of a member (25 corresponding lines) server/thinkphp/library/think/db/Builder.php:801— server/thinkphp/library/think/db/Builder.php:801-825 | server/thinkphp/library/think/db/builder/Sqlsrv.php:40-66 — 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.
Edited copy of a member (25 corresponding lines) server/application/admin/logic/RoleLogic.php:79— server/application/admin/logic/RoleLogic.php:79-103 | server/application/admin/logic/RoleLogic.php:115-143 — 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.
Edited copy of a member (25 corresponding lines) server/thinkphp/library/think/Model.php:974— server/thinkphp/library/think/Model.php:974-998 | server/thinkphp/library/think/model/concern/SoftDelete.php:143-167 — 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 (20 corresponding lines) · ×3
Edited copy of a member (20 corresponding lines) server/thinkphp/library/think/Container.php:483— server/thinkphp/library/think/Container.php:483-502 | server/thinkphp/library/think/Container.php:515-534 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) server/thinkphp/library/think/db/Query.php:760— server/thinkphp/library/think/db/Query.php:760-779 | server/thinkphp/library/think/db/Query.php:793-816 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) server/application/admin/logic/LuckDrawLogic.php:86— server/application/admin/logic/LuckDrawLogic.php:86-106 | server/application/admin/logic/LuckDrawLogic.php:117-136 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×3
Edited copies of one member (3 members, 11+ corresponding lines) server/application/admin/controller/SignDaily.php:75— server/application/admin/controller/SignDaily.php:75-88 | server/application/admin/controller/SignDaily.php:97-110 | server/application/admin/controller/SignDaily.php:137-147 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) server/application/admin/controller/DistributionGoods.php:32— server/application/admin/controller/DistributionGoods.php:32-42 | server/application/admin/controller/DistributionMember.php:74-88 | server/application/admin/controller/User.php:190-206 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) server/application/admin/controller/FaceSheet.php:87— server/application/admin/controller/FaceSheet.php:87-97 | server/application/admin/controller/FaceSheet.php:107-119 | server/application/admin/controller/FaceSheetSender.php:69-80 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×3
Edited copies of one member (3 members, 9+ corresponding lines) server/application/admin/controller/Message.php:31— server/application/admin/controller/Message.php:31-41 | server/application/admin/controller/NoticeSetting.php:61-72 | server/application/admin/controller/Sms.php:44-52 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 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, 9+ corresponding lines) server/application/admin/controller/Order.php:94— server/application/admin/controller/Order.php:94-102 | server/application/admin/controller/Order.php:124-132 | server/application/admin/controller/Order.php:141-149 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 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, 9+ corresponding lines) server/thinkphp/library/think/model/relation/BelongsTo.php:31— server/thinkphp/library/think/model/relation/BelongsTo.php:31-41 | server/thinkphp/library/think/model/relation/HasMany.php:32-40 | server/thinkphp/library/think/model/relation/HasOne.php:31-40 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 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 (6 corresponding lines) · ×3
Edited copy of a member (6 corresponding lines) server/application/admin/controller/Withdraw.php:73— server/application/admin/controller/Withdraw.php:73-81 | server/application/admin/controller/FileNew.php:121-126 — These two members are one piece of code written twice and then edited apart: 6 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 (6 corresponding lines) server/application/admin/controller/DistributionSetting.php:16— server/application/admin/controller/DistributionSetting.php:16-21 | server/application/admin/controller/UserSetting.php:49-54 — These two members are one piece of code written twice and then edited apart: 6 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 (6 corresponding lines) server/application/admin/logic/MarketingConfigLogic.php:25— server/application/admin/logic/MarketingConfigLogic.php:25-30 | server/application/admin/logic/OpLogic.php:24-29 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 3+ corresponding lines) · ×3
Edited copies of one member (3 members, 3+ corresponding lines) server/application/api/controller/Bargain.php:94— server/application/api/controller/Bargain.php:94-96 | server/application/api/controller/GoodsComment.php:67-69 | server/application/api/controller/Order.php:151-153 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 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, 3+ corresponding lines) server/application/api/controller/AfterSale.php:33— server/application/api/controller/AfterSale.php:33-35 | server/application/api/controller/Goods.php:30-32 | server/application/api/controller/Order.php:39-41 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 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, 3+ corresponding lines) server/application/admin/logic/ArticleLogic.php:111— server/application/admin/logic/ArticleLogic.php:111-114 | server/application/admin/logic/GoodsCategoryLogic.php:230-232 | server/application/admin/logic/HelpLogic.php:99-102 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 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.
Duplicated block (17–18 lines × 2) server/application/admin/controller/Goods.php:95— server/application/admin/controller/Goods.php:95-111 | server/application/admin/controller/Goods.php:189-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/controller/Goods.php:95` 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–18 lines × 2) server/application/api/logic/AdLogic.php:40— server/application/api/logic/AdLogic.php:40-57 | server/application/api/logic/PcLogic.php:75-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (17–18 lines × 2) server/application/api/validate/Order.php:261— server/application/api/validate/Order.php:261-277 | server/application/api/validate/Order.php:279-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/api/validate/Order.php:261` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) server/thinkphp/library/think/db/Builder.php:809— server/thinkphp/library/think/db/Builder.php:809-825 | server/thinkphp/library/think/db/builder/Sqlsrv.php:50-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `server/thinkphp/library/think/db/Builder.php:809` 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. 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 (17 lines × 2) server/thinkphp/library/think/db/Connection.php:1410— server/thinkphp/library/think/db/Connection.php:1410-1426 | server/thinkphp/library/think/db/connector/Sqlsrv.php:206-222 — before extracting anything, compare `server/thinkphp/library/think/db/Connection.php` and `server/thinkphp/library/think/db/connector/Sqlsrv.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 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 `server/thinkphp/library/think/db/Connection.php:1410` 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. 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 (17 lines × 2) server/thinkphp/library/think/db/Query.php:760— server/thinkphp/library/think/db/Query.php:760-776 | server/thinkphp/library/think/db/Query.php:793-809 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/thinkphp/library/think/db/Query.php:760` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 3) server/application/admin/logic/MenuDecorateLogic.php:34— server/application/admin/logic/MenuDecorateLogic.php:34-43 | server/application/admin/logic/MenuDecorateLogic.php:58-67 | server/application/admin/logic/MenuDecorateLogic.php:81-90 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/MenuDecorateLogic.php:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) REDACTED:131— REDACTED:131-140 | REDACTED:220-229 | REDACTED:541-550 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) server/application/common/logic/QrCodeLogic.php:174— server/application/common/logic/QrCodeLogic.php:174-183 | server/application/common/logic/QrCodeLogic.php:537-546 | server/application/common/server/WeChatPayServer.php:156-165 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 4) server/application/admin/logic/DistributionMemberLogic.php:34— server/application/admin/logic/DistributionMemberLogic.php:34-39 | server/application/admin/logic/OrderLogic.php:94-100 | server/application/admin/logic/OrderLogic.php:219-225 | server/application/admin/logic/WithdrawLogic.php:63-69 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/DistributionMemberLogic.php:34` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 4) server/thinkphp/library/think/route/Domain.php:163— server/thinkphp/library/think/route/Domain.php:163-168 | server/thinkphp/library/think/route/Domain.php:185-190 | server/thinkphp/library/think/route/Domain.php:206-211 | server/thinkphp/library/think/route/Domain.php:227-232 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/thinkphp/library/think/route/Domain.php:184` calls `empty`, `config` and `server/thinkphp/library/think/route/Domain.php:162` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 4) server/application/admin/controller/GoodsBrand.php:102— server/application/admin/controller/GoodsBrand.php:102-107 | server/application/admin/controller/GoodsCategory.php:111-116 | server/application/admin/controller/MnpMessage.php:57-62 | server/application/admin/controller/OaMessage.php:58-63 — before extracting anything, compare `server/application/admin/controller/MnpMessage.php` and `server/application/admin/controller/OaMessage.php` as WHOLE FILES: 87% 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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 3) server/application/admin/logic/VerificationLogic.php:319— server/application/admin/logic/VerificationLogic.php:319-324 | server/application/admin/logic/VerificationLogic.php:348-353 | server/application/common/behavior/Printer.php:78-83 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/VerificationLogic.php:319` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) server/application/admin/logic/ArticleCategoryLogic.php:86— server/application/admin/logic/ArticleCategoryLogic.php:86-91 | server/application/admin/logic/ArticleLogic.php:119-125 | server/application/admin/logic/HelpCategoryLogic.php:83-88 — before extracting anything, compare `server/application/admin/logic/ArticleCategoryLogic.php` and `server/application/admin/logic/HelpCategoryLogic.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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 (6 lines × 3) server/application/admin/controller/SignDaily.php:75— server/application/admin/controller/SignDaily.php:75-80 | server/application/admin/controller/SignDaily.php:97-102 | server/application/admin/controller/SignDaily.php:137-142 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/controller/SignDaily.php:75` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) server/application/admin/logic/AdLogic.php:45— server/application/admin/logic/AdLogic.php:45-49 | server/application/admin/logic/ArticleLogic.php:36-41 | server/application/admin/logic/HelpLogic.php:34-39 — before extracting anything, compare `server/application/admin/logic/ArticleLogic.php` and `server/application/admin/logic/HelpLogic.php` as WHOLE FILES: this scan already matched 6 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. 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 `server/application/admin/logic/AdLogic.php:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) server/application/admin/logic/ArticleLogic.php:33— server/application/admin/logic/ArticleLogic.php:33-37 | server/application/admin/logic/CommentHelperLogic.php:40-45 | server/application/admin/logic/HelpLogic.php:31-35 — before extracting anything, compare `server/application/admin/logic/ArticleLogic.php` and `server/application/admin/logic/HelpLogic.php` as WHOLE FILES: this scan already matched 6 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/admin/logic/ArticleLogic.php:31` calls `name` and `server/application/admin/logic/HelpLogic.php:30` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 3) server/application/admin/logic/DistributionOrderGoodsLogic.php:45— server/application/admin/logic/DistributionOrderGoodsLogic.php:45-50 | server/application/admin/logic/SelffetchVerifierLogic.php:42-46 | server/application/admin/logic/SelffetchVerifierLogic.php:218-222 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/DistributionOrderGoodsLogic.php:45` 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.
Dead file (~341 LoC) uniapp/components/uview-ui/components/u-button/u-button.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~341 LoC) uniapp/pages/payment/payment.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~341 LoC) uniapp/pages/register/register.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
SC1 · Supply-chain hygiene· NuGet dependencies are not locked · ×3
NuGet dependencies are not locked server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/AlipayEasySDK.csproj:30— server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/AlipayEasySDK.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked server/vendor/alipaysdk/easysdk/csharp/UnitTest/UnitTest.csproj:10— server/vendor/alipaysdk/easysdk/csharp/UnitTest/UnitTest.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/EasySDKKernel.csproj:19— server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/EasySDKKernel.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
SC1 · Supply-chain hygiene· JavaScript dependencies are not locked · ×3
JavaScript dependencies are not locked server/public/pctest/package.json:11— server/public/pctest/package.json declares dependencies that no committed lockfile resolves — there is no REDACTED / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
JavaScript dependencies are not locked server/public/static/plug/layui-admin/package.json:10— server/public/static/plug/layui-admin/package.json declares dependencies that no committed lockfile resolves — there is no REDACTED / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
JavaScript dependencies are not locked uniapp/components/uview-ui/package.json:33— uniapp/components/uview-ui/package.json declares dependencies that no committed lockfile resolves — there is no REDACTED / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
REDACTED.layui.config().extend().use() (cognitive 29) server/application/admin/view/order/lists.html:311— REDACTED.layui.config().extend().use() has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20 (29 pts) (nesting depth added 9). None of this is in the body itself: all 29 points belong to 10 function literals inside it that branch (lines 450, 394, 473, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
REDACTED.layui.config().extend().use() (cognitive 29) REDACTED:152— REDACTED.layui.config().extend().use() has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (24 pts), ternaries 5 (nesting depth added 5). None of this is in the body itself: all 29 points belong to 13 function literals inside it that branch (lines 428, 275, 227, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
add.html.layui.config().extend().use() (cognitive 23) server/application/admin/view/bargain/add.html:172— add.html.layui.config().extend().use() has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 3, loops 1 (nesting depth added 7). None of this is in the body itself: all 23 points belong to 6 function literals inside it that branch (lines 235, 246, 257, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
add.html.layui.config().extend().use() (cognitive 23) server/application/admin/view/luck_draw/add.html:115— add.html.layui.config().extend().use() has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 1, loops 1 (nesting depth added 5). None of this is in the body itself: all 23 points belong to 6 function literals inside it that branch (lines 151, 181, 224, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
(anonymous) (cognitive 22) uniapp/utils/request.js:40— (anonymous) has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 9, ternaries 1 (3 pts) (nesting depth added 6). Of this number, 15 points are the body's own statements and 7 belong to 2 function literals inside it that branch. 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.
(anonymous) (cognitive 22) uniapp/utils/request.js:87— (anonymous) has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 7 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (37 corresponding lines) · ×2
Edited copy of a member (37 corresponding lines) server/application/admin/logic/OrderLogic.php:132— server/application/admin/logic/OrderLogic.php:132-175 | server/application/admin/logic/VerificationLogic.php:119-168 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) server/thinkphp/library/think/db/Builder.php:1053— server/thinkphp/library/think/db/Builder.php:1053-1090 | server/thinkphp/library/think/db/builder/Mysql.php:52-88 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×2
Edited copy of a member (28 corresponding lines) server/application/admin/logic/SelffetchVerifierLogic.php:39— server/application/admin/logic/SelffetchVerifierLogic.php:39-75 | server/application/admin/logic/SelffetchVerifierLogic.php:215-242 — These two members are one piece of code written twice and then edited apart: 28 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 (28 corresponding lines) server/thinkphp/library/think/Console.php:515— server/thinkphp/library/think/Console.php:515-542 | server/thinkphp/library/think/Console.php:554-588 — These two members are one piece of code written twice and then edited apart: 28 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 (33 corresponding lines) · ×2
Edited copy of a member (33 corresponding lines) server/thinkphp/library/think/cache/driver/Memcached.php:37— server/thinkphp/library/think/cache/driver/Memcached.php:37-74 | server/thinkphp/library/think/session/driver/Memcached.php:44-76 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) server/application/admin/validate/Order.php:120— server/application/admin/validate/Order.php:120-165 | server/application/admin/validate/Verification.php:69-101 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×2
Edited copy of a member (24 corresponding lines) server/thinkphp/library/think/model/relation/HasManyThrough.php:269— server/thinkphp/library/think/model/relation/HasManyThrough.php:269-297 | server/thinkphp/library/think/model/relation/HasManyThrough.php:311-334 — These two members are one piece of code written twice and then edited apart: 24 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 (24 corresponding lines) server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Util/AES.cs:21— server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Util/AES.cs:21-44 | server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Util/AES.cs:53-76 — These two members are one piece of code written twice and then edited apart: 24 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, 19+ corresponding lines) · ×2
Edited copies of one member (4 members, 19+ corresponding lines) server/thinkphp/library/think/model/relation/BelongsTo.php:167— server/thinkphp/library/think/model/relation/BelongsTo.php:167-185 | server/thinkphp/library/think/model/relation/HasMany.php:321-340 | server/thinkphp/library/think/model/relation/HasManyThrough.php:117-139 | server/thinkphp/library/think/model/relation/HasOne.php:166-184 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 19 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.
Edited copies of one member (4 members, 19+ corresponding lines) server/application/admin/logic/DistributionLevelLogic.php:338— server/application/admin/logic/DistributionLevelLogic.php:338-362 | server/application/admin/logic/DistributionLevelLogic.php:374-392 | server/application/admin/logic/DistributionLevelLogic.php:404-423 | server/application/admin/logic/DistributionLevelLogic.php:435-453 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 19 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, 20+ corresponding lines) · ×2
Edited copies of one member (3 members, 20+ corresponding lines) server/application/admin/logic/BargainLogic.php:362— server/application/admin/logic/BargainLogic.php:362-381 | server/application/admin/logic/TeamActivityLogic.php:342-367 | server/application/admin/logic/TeamActivityLogic.php:378-398 — 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) server/thinkphp/library/think/model/relation/HasMany.php:127— server/thinkphp/library/think/model/relation/HasMany.php:127-146 | server/thinkphp/library/think/model/relation/HasManyThrough.php:202-221 | server/thinkphp/library/think/model/relation/MorphMany.php:160-180 — 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 copies of one member (3 members, 15+ corresponding lines) · ×2
Edited copies of one member (3 members, 15+ corresponding lines) server/application/admin/controller/FileCate.php:34— server/application/admin/controller/FileCate.php:34-48 | server/application/admin/controller/FileCate.php:54-69 | server/application/admin/controller/Role.php:43-57 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 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, 15+ corresponding lines) server/thinkphp/library/think/model/relation/HasMany.php:215— server/thinkphp/library/think/model/relation/HasMany.php:215-233 | server/thinkphp/library/think/model/relation/MorphMany.php:255-270 | server/thinkphp/library/think/model/relation/MorphOne.php:190-204 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 14+ corresponding lines) · ×2
Edited copies of one member (4 members, 14+ corresponding lines) server/application/admin/controller/Article.php:70— server/application/admin/controller/Article.php:70-87 | server/application/admin/controller/GoodsBrand.php:66-81 | server/application/admin/controller/GoodsCategory.php:73-89 | server/application/admin/controller/Help.php:68-81 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 14+ corresponding lines) server/application/admin/controller/AdPosition.php:77— server/application/admin/controller/AdPosition.php:77-93 | server/application/admin/controller/Express.php:80-93 | server/application/admin/controller/Printer.php:42-55 | server/application/admin/controller/Printer.php:64-78 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×2
Edited copies of one member (3 members, 16+ corresponding lines) server/application/admin/controller/Seckill.php:109— server/application/admin/controller/Seckill.php:109-126 | server/application/admin/controller/UserLevel.php:42-57 | server/application/admin/controller/UserLevel.php:65-82 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) server/thinkphp/library/think/model/concern/RelationShip.php:471— server/thinkphp/library/think/model/concern/RelationShip.php:471-487 | server/thinkphp/library/think/model/concern/RelationShip.php:501-517 | server/thinkphp/library/think/model/concern/RelationShip.php:529-544 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×2
Edited copies of one member (3 members, 13+ corresponding lines) server/application/admin/controller/AssuranceService.php:76— server/application/admin/controller/AssuranceService.php:76-88 | server/application/admin/controller/Freight.php:123-135 | server/application/admin/controller/Recharge.php:77-89 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) server/application/common/server/storage/engine/Aliyun.php:35— server/application/common/server/storage/engine/Aliyun.php:35-51 | server/application/common/server/storage/engine/Aliyun.php:63-81 | server/application/common/server/storage/engine/Aliyun.php:91-103 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 9+ corresponding lines) · ×2
Edited copies of one member (4 members, 9+ corresponding lines) server/application/api/logic/UserAddressLogic.php:39— server/application/api/logic/UserAddressLogic.php:39-48 | server/application/api/logic/UserAddressLogic.php:61-69 | server/application/api/logic/UserAddressLogic.php:81-94 | server/application/api/logic/UserAddressLogic.php:304-317 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 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.
Edited copies of one member (4 members, 9+ corresponding lines) server/application/admin/controller/Goods.php:291— server/application/admin/controller/Goods.php:291-304 | server/application/admin/controller/MenuDecorate.php:175-185 | server/application/admin/controller/Recharge.php:107-118 | server/application/admin/controller/WechatReply.php:85-93 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 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 (4 members, 12+ corresponding lines) · ×2
Edited copies of one member (4 members, 12+ corresponding lines) server/application/admin/controller/GoodsComment.php:60— server/application/admin/controller/GoodsComment.php:60-72 | server/application/admin/controller/Printer.php:86-98 | server/application/admin/controller/Supplier.php:55-66 | server/application/admin/controller/UserGroup.php:70-81 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 12+ corresponding lines) server/thinkphp/library/think/model/relation/BelongsTo.php:83— server/thinkphp/library/think/model/relation/BelongsTo.php:83-94 | server/thinkphp/library/think/model/relation/HasMany.php:190-201 | server/thinkphp/library/think/model/relation/HasOne.php:83-94 | server/thinkphp/library/think/model/relation/MorphMany.php:228-240 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×2
Edited copy of a member (8 corresponding lines) server/application/api/controller/Share.php:28— server/application/api/controller/Share.php:28-35 | server/application/api/controller/Share.php:61-68 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) server/application/admin/controller/Coupon.php:83— server/application/admin/controller/Coupon.php:83-90 | server/application/admin/controller/Seckill.php:92-102 — 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 copies of one member (6 members, 10+ corresponding lines) · ×2
Edited copies of one member (6 members, 10+ corresponding lines) server/application/admin/controller/Activity.php:55— server/application/admin/controller/Activity.php:55-64 | server/application/admin/controller/Activity.php:72-83 | server/application/admin/controller/Activity.php:102-113 | server/application/admin/controller/UserPrivilege.php:41-51 | server/application/admin/controller/UserPrivilege.php:59-71 | server/application/admin/controller/WechatReply.php:37-50 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
Edited copies of one member (6 members, 10+ corresponding lines) server/application/admin/controller/AssuranceService.php:54— server/application/admin/controller/AssuranceService.php:54-64 | server/application/admin/controller/Freight.php:74-83 | server/application/admin/controller/GoodsBrand.php:44-58 | server/application/admin/controller/GoodsCategory.php:50-62 | server/application/admin/controller/Recharge.php:60-70 | server/application/admin/controller/Supplier.php:38-48 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 7+ corresponding lines) · ×2
Edited copies of one member (5 members, 7+ corresponding lines) server/application/admin/controller/AfterSale.php:76— server/application/admin/controller/AfterSale.php:76-84 | server/application/admin/controller/AfterSale.php:93-101 | server/application/admin/controller/AfterSale.php:110-118 | server/application/admin/controller/AfterSale.php:127-135 | server/application/api/controller/AfterSale.php:76-82 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 7 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.
Edited copies of one member (5 members, 7+ corresponding lines) server/application/api/controller/AfterSale.php:41— server/application/api/controller/AfterSale.php:41-47 | server/application/api/controller/Order.php:164-171 | server/application/api/controller/Team.php:82-88 | REDACTED:55-62 | server/application/api/controller/Withdraw.php:30-36 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 7 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 copies of one member (5 members, 6+ corresponding lines) · ×2
Edited copies of one member (5 members, 6+ corresponding lines) server/application/api/controller/Account.php:144— server/application/api/controller/Account.php:144-150 | server/application/api/controller/Account.php:190-196 | server/application/api/controller/Account.php:217-223 | server/application/api/controller/Account.php:265-270 | server/application/api/controller/Account.php:280-285 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 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.
Edited copies of one member (5 members, 6+ corresponding lines) server/application/admin/controller/DistributionApply.php:11— server/application/admin/controller/DistributionApply.php:11-17 | server/application/admin/controller/DistributionGoods.php:16-22 | server/application/admin/controller/DistributionMember.php:59-64 | server/application/admin/controller/DistributionOrderGoods.php:17-22 | server/application/admin/controller/User.php:211-216 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 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.
Duplicated block (22–24 lines × 2) server/application/admin/logic/TeamActivityLogic.php:157— server/application/admin/logic/TeamActivityLogic.php:157-178 | server/application/admin/logic/TeamActivityLogic.php:257-280 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (22–24 lines × 2) REDACTED:282— REDACTED:282-305 | REDACTED:491-512 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:282` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23 lines × 2) server/application/common/server/FileServer.php:119— server/application/common/server/FileServer.php:119-141 | server/application/common/server/FileServer.php:182-204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/common/server/FileServer.php:119` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23 lines × 2) server/thinkphp/library/think/db/builder/Mysql.php:140— server/thinkphp/library/think/db/builder/Mysql.php:140-162 | server/thinkphp/library/think/db/builder/Sqlsrv.php:99-121 — 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 `server/thinkphp/library/think/db/builder/Mysql.php:140` 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, `server/thinkphp/library/think/db/builder/Mysql.php:163` calls `strpos`, `str_replace` and `server/thinkphp/library/think/db/builder/Sqlsrv.php:122` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (20–22 lines × 2) server/application/admin/logic/OrderLogic.php:568— server/application/admin/logic/OrderLogic.php:568-589 | server/application/api/logic/OrderLogic.php:1215-1234 — 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 `server/application/admin/logic/OrderLogic.php:568` 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 (20–22 lines × 2) server/application/admin/validate/Login.php:75— server/application/admin/validate/Login.php:75-94 | server/application/api/validate/Login.php:128-149 — before extracting anything, compare `server/application/admin/validate/Login.php` and `server/application/api/validate/Login.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 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 `server/application/admin/validate/Login.php:75` 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 (22 lines × 2) REDACTED:728— REDACTED:728-749 | REDACTED:773-794 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:728` 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 (22 lines × 2) server/application/admin/model/Freight.php:48— server/application/admin/model/Freight.php:48-69 | server/application/common/model/Freight.php:38-59 — before extracting anything, compare `server/application/admin/model/Freight.php` and `server/application/common/model/Freight.php` as WHOLE FILES: 97% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/model/Freight.php:48` 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) server/application/admin/logic/GoodsLogic.php:285— server/application/admin/logic/GoodsLogic.php:285-304 | server/application/admin/logic/GoodsLogic.php:479-498 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/GoodsLogic.php:285` 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, `server/application/admin/logic/GoodsLogic.php:474` calls `name`, `where`, `value` and `server/application/admin/logic/GoodsLogic.php:282` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (20 lines × 2) server/application/admin/logic/MnpMessageLogic.php:34— server/application/admin/logic/MnpMessageLogic.php:34-53 | server/application/admin/logic/OaMessageLogic.php:35-54 — before extracting anything, compare `server/application/admin/logic/MnpMessageLogic.php` and `server/application/admin/logic/OaMessageLogic.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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 3) server/application/admin/logic/WechatCorporatePaymentLogic.php:160— server/application/admin/logic/WechatCorporatePaymentLogic.php:160-176 | server/application/admin/logic/WechatCorporatePaymentLogic.php:233-249 | server/application/admin/logic/WithdrawLogic.php:338-354 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/admin/logic/WithdrawLogic.php:335` calls `name`, `where`, `find` and `server/application/admin/logic/WechatCorporatePaymentLogic.php:157` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17 lines × 3) server/thinkphp/library/think/db/Connection.php:592— server/thinkphp/library/think/db/Connection.php:592-608 | server/thinkphp/library/think/db/Connection.php:659-675 | server/thinkphp/library/think/db/Connection.php:731-747 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13–15 lines × 2) server/application/admin/logic/WechatCorporatePaymentLogic.php:116— server/application/admin/logic/WechatCorporatePaymentLogic.php:116-130 | server/application/admin/logic/WechatCorporatePaymentLogic.php:196-208 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/WechatCorporatePaymentLogic.php:116` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–15 lines × 2) server/thinkphp/library/think/model/relation/BelongsToMany.php:126— server/thinkphp/library/think/model/relation/BelongsToMany.php:126-140 | server/thinkphp/library/think/model/relation/BelongsToMany.php:443-455 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/thinkphp/library/think/model/relation/BelongsToMany.php:126` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 4) server/application/admin/logic/WechatCorporatePaymentLogic.php:160— server/application/admin/logic/WechatCorporatePaymentLogic.php:160-173 | server/application/admin/logic/WechatCorporatePaymentLogic.php:233-246 | server/application/admin/logic/WithdrawLogic.php:287-299 | server/application/admin/logic/WithdrawLogic.php:338-351 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/WechatCorporatePaymentLogic.php:160` 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 `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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/admin/logic/WithdrawLogic.php:335` calls `name`, `where`, `find` and `server/application/admin/logic/WechatCorporatePaymentLogic.php:157` 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–14 lines × 4) server/thinkphp/library/think/cache/driver/Memcache.php:102— server/thinkphp/library/think/cache/driver/Memcache.php:102-114 | server/thinkphp/library/think/cache/driver/Memcached.php:116-128 | server/thinkphp/library/think/cache/driver/Redis.php:126-139 | server/thinkphp/library/think/cache/driver/Xcache.php:84-96 — before extracting anything, compare `server/thinkphp/library/think/cache/driver/Memcache.php` and `server/thinkphp/library/think/cache/driver/Memcached.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13–14 lines × 3) server/application/common/logic/QrCodeLogic.php:105— server/application/common/logic/QrCodeLogic.php:105-118 | server/application/common/logic/QrCodeLogic.php:320-332 | server/application/common/logic/QrCodeLogic.php:470-483 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/common/logic/QrCodeLogic.php:105` 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–14 lines × 3) server/application/common/server/FileServer.php:76— server/application/common/server/FileServer.php:76-89 | server/application/common/server/FileServer.php:251-263 | server/application/common/server/FileServer.php:395-408 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/common/server/FileServer.php:76` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–13 lines × 3) server/application/admin/logic/AdLogic.php:48— server/application/admin/logic/AdLogic.php:48-59 | server/application/admin/logic/AdPositionLogic.php:53-65 | server/application/admin/logic/FreightLogic.php:37-47 — 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 `server/application/admin/logic/AdLogic.php:48` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–13 lines × 3) server/application/common/server/WechatMiniExpressSendSyncServer.php:107— server/application/common/server/WechatMiniExpressSendSyncServer.php:107-119 | server/application/common/server/WechatMiniExpressSendSyncServer.php:188-200 | server/application/common/server/WechatMiniExpressSendSyncServer.php:237-247 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/common/server/WechatMiniExpressSendSyncServer.php:107` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 4) server/application/api/logic/CouponLogic.php:436— server/application/api/logic/CouponLogic.php:436-447 | server/application/api/logic/CouponLogic.php:466-476 | server/application/api/validate/Order.php:166-176 | server/application/api/validate/Order.php:190-200 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/api/logic/CouponLogic.php:436` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 4) REDACTED:124— REDACTED:124-134 | REDACTED:213-223 | REDACTED:284-295 | REDACTED:492-502 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:124` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) server/application/admin/logic/AccountLogLogic.php:60— server/application/admin/logic/AccountLogLogic.php:60-71 | server/application/admin/logic/RechargeLogLogic.php:42-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/AccountLogLogic.php:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `server/application/admin/logic/RechargeLogLogic.php:53` calls `field` and `server/application/admin/logic/AccountLogLogic.php:72` 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 (11–12 lines × 2) server/application/admin/logic/StatisticsLogic.php:109— server/application/admin/logic/StatisticsLogic.php:109-119 | server/application/admin/logic/StatisticsLogic.php:295-306 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) server/application/admin/logic/CommonLogic.php:99— server/application/admin/logic/CommonLogic.php:99-108 | server/application/admin/logic/GoodsLogic.php:156-166 — 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 `server/application/admin/logic/CommonLogic.php:99` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) server/thinkphp/library/think/db/Connection.php:1265— server/thinkphp/library/think/db/Connection.php:1265-1274 | server/thinkphp/library/think/db/Connection.php:1357-1367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `server/thinkphp/library/think/db/Connection.php:1277` calls `setOption` and `server/thinkphp/library/think/db/Connection.php:1370` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–10 lines × 2) server/application/admin/logic/ActivityAreaLogic.php:29— server/application/admin/logic/ActivityAreaLogic.php:29-37 | server/application/admin/logic/UserPrivilegeLogic.php:26-35 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/ActivityAreaLogic.php:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) server/application/admin/logic/ExpressLogic.php:45— server/application/admin/logic/ExpressLogic.php:45-54 | server/application/admin/logic/GoodsBrandLogic.php:33-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 `server/application/admin/logic/ExpressLogic.php:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `server/application/admin/logic/GoodsBrandLogic.php:42` calls `order` and `server/application/admin/logic/ExpressLogic.php:55` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8–10 lines × 2) server/application/admin/logic/GoodsLogic.php:413— server/application/admin/logic/GoodsLogic.php:413-422 | server/application/admin/logic/GoodsLogic.php:696-703 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/GoodsLogic.php:413` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–10 lines × 2) server/application/api/logic/CouponLogic.php:32— server/application/api/logic/CouponLogic.php:32-41 | server/application/api/logic/IndexLogic.php:50-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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 4) server/application/admin/logic/AfterSaleLogic.php:71— server/application/admin/logic/AfterSaleLogic.php:71-79 | server/application/admin/logic/OrderLogic.php:77-85 | server/application/admin/logic/OrderLogic.php:202-210 | server/application/admin/logic/VerificationLogic.php:69-77 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/AfterSaleLogic.php:71` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 4) server/thinkphp/library/think/model/relation/BelongsTo.php:223— server/thinkphp/library/think/model/relation/BelongsTo.php:223-231 | server/thinkphp/library/think/model/relation/BelongsTo.php:263-271 | server/thinkphp/library/think/model/relation/HasOne.php:222-230 | server/thinkphp/library/think/model/relation/HasOne.php:262-270 — before extracting anything, compare `server/thinkphp/library/think/model/relation/BelongsTo.php` and `server/thinkphp/library/think/model/relation/HasOne.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `server/thinkphp/library/think/model/relation/BelongsTo.php:223` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) server/application/admin/controller/AdminBase.php:107— server/application/admin/controller/AdminBase.php:107-115 | server/application/api/controller/ApiBase.php:102-110 | server/thinkphp/library/traits/controller/Jump.php:55-63 — 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 (9 lines × 3) server/application/admin/logic/GoodsLogic.php:101— server/application/admin/logic/GoodsLogic.php:101-109 | server/application/admin/logic/GoodsLogic.php:198-206 | server/application/admin/logic/SmsLogic.php:41-49 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/GoodsLogic.php:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 2) server/application/admin/controller/FileNew.php:79— server/application/admin/controller/FileNew.php:79-86 | server/application/admin/controller/FileNew.php:102-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/controller/FileNew.php:79` 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, `server/application/admin/controller/FileNew.php:111` calls `getCateById` and `server/application/admin/controller/FileNew.php:87` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8–9 lines × 2) server/thinkphp/library/think/template/taglib/Cx.php:349— server/thinkphp/library/think/template/taglib/Cx.php:349-356 | server/thinkphp/library/think/template/taglib/Cx.php:387-395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/thinkphp/library/think/template/taglib/Cx.php:349` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `server/thinkphp/library/think/template/taglib/Cx.php:396` calls `is_array`, `explode` and `server/thinkphp/library/think/template/taglib/Cx.php:357` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 3) server/application/admin/controller/AccountLog.php:29— server/application/admin/controller/AccountLog.php:29-36 | server/application/admin/controller/AccountLog.php:43-50 | server/application/admin/controller/AccountLog.php:58-65 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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 × 3) server/application/admin/validate/Login.php:53— server/application/admin/validate/Login.php:53-60 | server/application/api/validate/Login.php:79-86 | server/application/api/validate/SmsSend.php:92-99 — before extracting anything, compare `server/application/admin/validate/Login.php` and `server/application/api/validate/Login.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7–8 lines × 2) server/application/admin/controller/Goods.php:291— server/application/admin/controller/Goods.php:291-298 | server/application/admin/controller/MenuDecorate.php:175-181 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7–8 lines × 2) server/application/api/logic/CouponLogic.php:166— server/application/api/logic/CouponLogic.php:166-172 | server/application/api/logic/IndexLogic.php:69-76 — 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 `server/application/api/logic/CouponLogic.php:166` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) server/application/admin/logic/OrderLogic.php:94— server/application/admin/logic/OrderLogic.php:94-100 | server/application/admin/logic/OrderLogic.php:219-225 | server/application/admin/logic/WithdrawLogic.php:63-69 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/OrderLogic.php:94` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 3) server/application/admin/logic/ArticleCategoryLogic.php:70— server/application/admin/logic/ArticleCategoryLogic.php:70-76 | server/application/admin/logic/ArticleLogic.php:93-106 | server/application/admin/logic/HelpCategoryLogic.php:67-73 — before extracting anything, compare `server/application/admin/logic/ArticleCategoryLogic.php` and `server/application/admin/logic/HelpCategoryLogic.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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 (45 lines × 2 locations) REDACTED:3242— REDACTED:3242 · REDACTED:3551 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (45 lines × 2 locations) REDACTED:3729— REDACTED:3729 · REDACTED:3801 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (37 lines × 2 locations) REDACTED:1093— REDACTED:1093 · REDACTED:1894 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (37 lines × 2 locations) uniapp/bundle/pages/bind_phone/bind_phone.vue:114— uniapp/bundle/pages/bind_phone/bind_phone.vue:114 · uniapp/pages/login/login.vue:687 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (35 lines × 2 locations) REDACTED:901— REDACTED:901 · REDACTED:940 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (35 lines × 2 locations) uniapp/components/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue:130— uniapp/components/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue:130 · uniapp/components/uview-ui/components/u-tabs/u-tabs.vue:113 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (31 lines × 2 locations) REDACTED:2355— REDACTED:2355 · REDACTED:2411 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (31 lines × 2 locations) uniapp/components/cate-one/cate-one.vue:13— uniapp/components/cate-one/cate-one.vue:13 · uniapp/components/cate-two/cate-two.vue:13 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (27 lines × 2 locations) REDACTED:1516— REDACTED:1516 · REDACTED:1575 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (27 lines × 2 locations) uniapp/bundle/pages/set_pay_pwd/set_pay_pwd.vue:75— uniapp/bundle/pages/set_pay_pwd/set_pay_pwd.vue:75 · uniapp/components/set-pay-pwd/set-pay-pwd.vue:94 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (26 lines × 2 locations) uniapp/bundle/pages/user_withdraw/user_withdraw.vue:237— uniapp/bundle/pages/user_withdraw/user_withdraw.vue:237 · uniapp/bundle/pages/widthdraw_result/widthdraw_result.vue:125 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (26 lines × 2 locations) uniapp/bundle/pages/widthdraw_result/widthdraw_result.vue:125— uniapp/bundle/pages/widthdraw_result/widthdraw_result.vue:125 · uniapp/pages/confirm_order/confirm_order.vue:440 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Complex function (anonymous) (cyclomatic 15, cognitive 14) REDACTED:1057— (anonymous) has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 15, cognitive 14) REDACTED:1860— (anonymous) has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Dead file (~302 LoC) uniapp/components/uview-ui/components/u-count-down/u-count-down.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~302 LoC) uniapp/components/uview-ui/components/u-subsection/u-subsection.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Unused dependency 'core-js' REDACTED:17— Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'core-js' server/public/pctest/package.json:17— Declared in server/public/pctest/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'vue-baidu-map' REDACTED:25— Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'vue-baidu-map' server/public/pctest/package.json:24— Declared in server/public/pctest/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Weak cipher server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Util/AES.cs:27— DES / 3DES / RijndaelManaged-bare is deprecated or broken. Use AES-GCM via `Aes.Create()` with explicit key/iv sizes.
Weak cipher server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Util/AES.cs:59— DES / 3DES / RijndaelManaged-bare is deprecated or broken. Use AES-GCM via `Aes.Create()` with explicit key/iv sizes.
X18 · Disposal-pattern correctness· Disposable created and abandoned in the function that made it · ×2
Disposable created and abandoned in the function that made it server/thinkphp/library/think/Template.php:307— `fopen()` is called here and hands back a handle the caller must close — and it is held in `$handle`, and every use of `$handle` in the function reads through it or tests it — it is never closed, returned, passed, captured or stored. PHP frees an unclosed handle when its last reference goes, which is the end of the function at the earliest, not a point this code states: the descriptor stays open for the rest of the call (a long loop, a long-running worker holds many), buffered writes are flushed only then, and a failed flush is reported nowhere. Close it where it is done with: `fclose($handle);`, in a `finally` if the code between can throw.
Disposable created and abandoned in the function that made it REDACTED:591— `opendir()` is called here and hands back a handle the caller must close — and it is held in `$handle`, and every use of `$handle` in the function reads through it or tests it — it is never closed, returned, passed, captured or stored. PHP frees an unclosed handle when its last reference goes, which is the end of the function at the earliest, not a point this code states: the descriptor stays open for the rest of the call (a long loop, a long-running worker holds many), buffered writes are flushed only then, and a failed flush is reported nowhere. Close it where it is done with: `closedir($handle);`, in a `finally` if the code between can throw.
AX2 · Stateful singletons· Process-global static state · ×1
Process-global static state: Factory server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Factory/Factory.cs:12— `Factory` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (context; e.g. `context` at line 27). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
AXR1 · Runtime accessibility (rendered)· WCAG 1.1.1 reproducibly failed in a rendered surface · ×1
WCAG 1.1.1 reproducibly failed in a rendered surface — axe-core rule(s) image-alt failed on: img. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
AXR1 · Runtime accessibility (rendered)· WCAG 1.4.3 reproducibly failed in a rendered surface · ×1
WCAG 1.4.3 reproducibly failed in a rendered surface — axe-core rule(s) color-contrast failed on: .active, button. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
AXR1 · Runtime accessibility (rendered)· WCAG 2.1.1 reproducibly failed in a rendered surface · ×1
WCAG 2.1.1 reproducibly failed in a rendered surface — axe-core rule(s) scrollable-region-focusable failed on: .content. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
AXR1 · Runtime accessibility (rendered)· WCAG 2.1.3 reproducibly failed in a rendered surface · ×1
WCAG 2.1.3 reproducibly failed in a rendered surface — axe-core rule(s) scrollable-region-focusable failed on: .content. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
dtree.layui.define() (cyclomatic 1124) REDACTED:9— dtree.layui.define() has cyclomatic complexity 1124 (threshold 15). Of this number, 248 points are the body's own statements and 876 belong to 187 function items inside it that branch. 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.
(anonymous) (cyclomatic 389) REDACTED:9— (anonymous) has cyclomatic complexity 389 (threshold 15). Most of this is not in the body itself: 1 of the 389 points is its own statement and the rest belongs to 308 function items inside it that branch (a function literal at line 297, a function literal at line 1057, a function literal at line 1860, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
treeTable.layui.define() (cyclomatic 232) server/public/static/plug/treetable-lay/treeTable.js:5— treeTable.layui.define() has cyclomatic complexity 232 (threshold 15). Of this number, 49 points are the body's own statements and 183 belong to 62 function items inside it that branch. 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.
MpHtmlParser.MpHtmlParser.setNode (cyclomatic 102) uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:120— MpHtmlParser.MpHtmlParser.setNode has cyclomatic complexity 102 (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.
layedit.js_beautify (cyclomatic 90) REDACTED:3367— layedit.js_beautify has cyclomatic complexity 90 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
layedit.style_html (cyclomatic 84) REDACTED:3011— layedit.style_html has cyclomatic complexity 84 (threshold 15). Most of this is not in the body itself: 11 of the 84 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 3129, Parser, a function literal at line 3038, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MpHtmlParser.MpHtmlParser.popNode (cyclomatic 75) uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:355— MpHtmlParser.MpHtmlParser.popNode has cyclomatic complexity 75 (threshold 15). Of this number, 60 points are the body's own statements and 15 belong to 3 function literals inside it that branch. 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.
area.html.layui.config().extend().use() (cyclomatic 55) server/application/admin/view/freight/area.html:47— area.html.layui.config().extend().use() has cyclomatic complexity 55 (threshold 15). Most of this is not in the body itself: 1 of the 55 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 99, getChildrenIds, getSecondLeader, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
area_edit.html.layui.config().extend().use() (cyclomatic 55) server/application/admin/view/freight/area_edit.html:56— area_edit.html.layui.config().extend().use() has cyclomatic complexity 55 (threshold 15). Most of this is not in the body itself: 1 of the 55 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 121, getChildrenIds, getSecondLeader, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
js_beautify::get_next_token (cyclomatic 55) REDACTED:3451— js_beautify::get_next_token has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
getLostPoint (cyclomatic 54) uniapp/components/tki-qrcode/qrcode.js:508— getLostPoint has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Url.build (cyclomatic 48) server/thinkphp/library/think/Url.php:76— Url.build has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity· one (cyclomatic 48) · ×1
one (cyclomatic 48) server/public/static/plug/formSelects/formSelects-v4.js:812— one has cyclomatic complexity 48 (threshold 15). Most of this is not in the body itself: 3 of the 48 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 873, 816, 927, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
GoodsCommentLogic.lists (cyclomatic 46) server/application/admin/logic/GoodsCommentLogic.php:24— GoodsCommentLogic.lists has cyclomatic complexity 46 (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.
QRCode (cyclomatic 46) uniapp/components/tki-qrcode/qrcode.js:1022— QRCode has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 8 of the 46 points are its own statements and the rest belongs to 10 function items inside it that branch (empty, getForeGround, createCanvas, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
CouponLogic.orderCoupon (cyclomatic 42) server/application/api/logic/CouponLogic.php:280— CouponLogic.orderCoupon has cyclomatic complexity 42 (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.
GoodsLogic.edit (cyclomatic 39) server/application/admin/logic/GoodsLogic.php:447— GoodsLogic.edit has cyclomatic complexity 39 (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.
oa_menu.html.layui.config().extend().use() (cyclomatic 37) server/application/admin/view/oa/oa_menu.html:314— oa_menu.html.layui.config().extend().use() has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to 10 function items inside it that branch (checkData, a function literal at line 391, mergeMenu, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
GoodsLogic.lists (cyclomatic 36) server/application/admin/logic/GoodsLogic.php:58— GoodsLogic.lists has cyclomatic complexity 36 (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.
OrderLogic.add (cyclomatic 36) server/application/api/logic/OrderLogic.php:511— OrderLogic.add has cyclomatic complexity 36 (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.
Order.checkCoupon (cyclomatic 33) server/application/api/validate/Order.php:82— Order.checkCoupon has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tree.layui.define("jquery") (cyclomatic 33) server/public/static/plug/iconpicker/assets/layui/lay/modules/tree.js:2— tree.layui.define("jquery") has cyclomatic complexity 33 (threshold 15). Of this number, 18 points are the body's own statements and 15 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
(anonymous) (cyclomatic 33) server/public/static/plug/iconpicker/assets/layui/lay/modules/tree.js:2— (anonymous) has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 20 function items inside it that branch (a function literal at line 25, a function literal at line 18, a function literal at line 23, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
common.is_private_ip (cyclomatic 31) REDACTED:106— common.is_private_ip has cyclomatic complexity 31 (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.
Collection.where (cyclomatic 31) server/thinkphp/library/think/Collection.php:340— Collection.where has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
(anonymous) (cyclomatic 31) server/public/static/plug/iconpicker/module/iconPicker/iconPicker.js:7— (anonymous) has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 25 function items inside it that branch (render::createList, render, a function literal at line 265, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Template.parseTag (cyclomatic 30) server/thinkphp/library/think/Template.php:812— Template.parseTag has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
axios.default (cyclomatic 30) pc/plugins/axios.js:14— axios.default has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 17, 50, 33). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
layedit.layui.define()::toolActive::contextmenu (cyclomatic 30) REDACTED:1745— layedit.layui.define()::toolActive::contextmenu has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
(anonymous) (cyclomatic 30) pc/plugins/axios.js:14— (anonymous) has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 17, 50, 33, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
SignLogic.sign (cyclomatic 29) server/application/api/logic/SignLogic.php:163— SignLogic.sign has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Conversion.toArray (cyclomatic 29) server/thinkphp/library/think/model/concern/Conversion.php:131— Conversion.toArray has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
formSelects-v4.Common.handlerLabel (cyclomatic 29) server/public/static/plug/formSelects/formSelects-v4.js:1161— formSelects-v4.Common.handlerLabel has cyclomatic complexity 29 (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.
GoodsLogic.add (cyclomatic 28) server/application/admin/logic/GoodsLogic.php:261— GoodsLogic.add has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Validate.checkItem (cyclomatic 28) server/thinkphp/library/think/Validate.php:509— Validate.checkItem has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Connection.update (cyclomatic 28) server/thinkphp/library/think/db/Connection.php:1087— Connection.update has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
style_html::Parser::get_tag (cyclomatic 28) REDACTED:3129— style_html::Parser::get_tag has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Session.init (cyclomatic 27) server/thinkphp/library/think/Session.php:123— Session.init has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Unix.readAndWrite (cyclomatic 27) server/thinkphp/library/think/process/pipes/Unix.php:93— Unix.readAndWrite has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OrderLogic.exportFile (cyclomatic 26) server/application/admin/logic/OrderLogic.php:178— OrderLogic.exportFile has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Builder.parseData (cyclomatic 26) server/thinkphp/library/think/db/Builder.php:92— Builder.parseData has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Rule.checkOption (cyclomatic 26) server/thinkphp/library/think/route/Rule.php:886— Rule.checkOption has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RuleGroup.checkMergeRuleRegex (cyclomatic 26) server/thinkphp/library/think/route/RuleGroup.php:279— RuleGroup.checkMergeRuleRegex has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Ask.autocomplete (cyclomatic 25) server/thinkphp/library/think/console/output/Ask.php:99— Ask.autocomplete has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
REDACTED.layui.config().extend().use() (cyclomatic 25) REDACTED:152— REDACTED.layui.config().extend().use() has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 13 function literals inside it that branch (lines 428, 275, 227, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
OrderLogic.getListsCondition (cyclomatic 24) server/application/admin/logic/OrderLogic.php:52— OrderLogic.getListsCondition has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
WeChatLogic.index (cyclomatic 24) server/application/api/logic/WeChatLogic.php:72— WeChatLogic.index has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Builder.parseWhereItem (cyclomatic 24) server/thinkphp/library/think/db/Builder.php:364— Builder.parseWhereItem 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.
TagLib.parseTag (cyclomatic 23) server/thinkphp/library/think/template/TagLib.php:87— TagLib.parseTag has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
REDACTED.layui.config().extend().use() (cyclomatic 23) REDACTED:158— REDACTED.layui.config().extend().use() has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 15 function literals inside it that branch (lines 358, 342, 214, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
edit.html.layui.config().extend().use() (cyclomatic 23) server/application/admin/view/luck_draw/edit.html:118— edit.html.layui.config().extend().use() has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 187, 154, 235, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
permission.judgePermission (cyclomatic 23) uniapp/utils/permission.js:221— permission.judgePermission has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong to 2 function items inside it that branch. 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.
MpHtmlParser (cyclomatic 23) uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:14— MpHtmlParser has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 7 function items inside it that branch (decode, getUrl, bubble, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AfterSaleLogic.lists (cyclomatic 22) server/application/admin/logic/AfterSaleLogic.php:45— AfterSaleLogic.lists has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
BargainLogic.bargainDetail (cyclomatic 22) server/application/api/logic/BargainLogic.php:385— BargainLogic.bargainDetail has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OrderLogic.getOrderDetail (cyclomatic 22) server/application/api/logic/OrderLogic.php:932— OrderLogic.getOrderDetail has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Connection.delete (cyclomatic 22) server/thinkphp/library/think/db/Connection.php:1182— Connection.delete has cyclomatic complexity 22 (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.
Connection.column (cyclomatic 22) server/thinkphp/library/think/db/Connection.php:1338— Connection.column has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Sqlsrv.column (cyclomatic 22) server/thinkphp/library/think/db/connector/Sqlsrv.php:139— Sqlsrv.column has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Attribute.readTransform (cyclomatic 22) server/thinkphp/library/think/model/concern/Attribute.php:569— Attribute.readTransform has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Windows.write (cyclomatic 22) server/thinkphp/library/think/process/pipes/Windows.php:175— Windows.write has cyclomatic complexity 22 (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.
formSelects-v4.Common.search (cyclomatic 22) server/public/static/plug/formSelects/formSelects-v4.js:330— formSelects-v4.Common.search has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 2 function literals inside it that branch. 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.
MpHtmlParser.MpHtmlParser.remove (cyclomatic 22) uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:305— MpHtmlParser.MpHtmlParser.remove has cyclomatic complexity 22 (threshold 15). Of this number, 15 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: MpHtmlParser.MpHtmlParser (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
UserLogic.lists (cyclomatic 21) server/application/admin/logic/UserLogic.php:44— UserLogic.lists 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.
Url.parseDomain (cyclomatic 21) server/thinkphp/library/think/Url.php:282— Url.parseDomain 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.
Request.request (cyclomatic 21) uniapp/components/uview-ui/libs/request/index.js:11— Request.request has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 30, 29). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity· children (cyclomatic 21) · ×1
children (cyclomatic 21) uniapp/components/lime-painter/components/common/relation.js:43— children has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 13 function items inside it that branch (bindRelation, handler, handler, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
BargainLogic.getLaunch (cyclomatic 20) server/application/admin/logic/BargainLogic.php:390— BargainLogic.getLaunch has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
UserLogic.exportFile (cyclomatic 20) server/application/admin/logic/UserLogic.php:136— UserLogic.exportFile has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OrderLogic.getOrderList (cyclomatic 20) server/application/api/logic/OrderLogic.php:849— OrderLogic.getOrderList has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UserLevelLogic.lists (cyclomatic 20) server/application/api/logic/UserLevelLogic.php:30— UserLevelLogic.lists has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Build.module (cyclomatic 20) server/thinkphp/library/think/Build.php:112— Build.module has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Model.updateData (cyclomatic 20) server/thinkphp/library/think/Model.php:564— Model.updateData has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Template.parseVarFunction (cyclomatic 20) server/thinkphp/library/think/Template.php:1015— Template.parseVarFunction has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Mysql.parseKey (cyclomatic 20) server/thinkphp/library/think/db/builder/Mysql.php:118— Mysql.parseKey has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RuleItem.match (cyclomatic 20) server/thinkphp/library/think/route/RuleItem.php:233— RuleItem.match has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
add.html.layui.config().extend().use() (cyclomatic 20) server/application/admin/view/luck_draw/add.html:115— add.html.layui.config().extend().use() has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 151, 181, 224, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
REDACTED.layui.config().extend().use() (cyclomatic 20) server/application/admin/view/order/lists.html:311— REDACTED.layui.config().extend().use() has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 10 function literals inside it that branch (lines 450, 394, 473, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
formSelects-v4.Common.init (cyclomatic 20) server/public/static/plug/formSelects/formSelects-v4.js:237— formSelects-v4.Common.init has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 241, 276). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
formSelects-v4.Select4.btns (cyclomatic 20) server/public/static/plug/formSelects/formSelects-v4.js:1708— formSelects-v4.Select4.btns has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1737, 1719). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
request.service.interceptors.request.use() (cyclomatic 20) uniapp/utils/request.js:40— request.service.interceptors.request.use() has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous) (cyclomatic 20) uniapp/utils/request.js:40— (anonymous) has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to 2 function literals inside it that branch. 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.
GoodsLogic.exportFile (cyclomatic 19) server/application/admin/logic/GoodsLogic.php:175— GoodsLogic.exportFile has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TeamLogic.buy (cyclomatic 19) server/application/api/logic/TeamLogic.php:257— TeamLogic.buy has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Request.cache (cyclomatic 19) server/thinkphp/library/think/Request.php:2050— Request.cache has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Query.parseOptions (cyclomatic 19) server/thinkphp/library/think/db/Query.php:3677— Query.parseOptions has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Attribute.writeTransform (cyclomatic 19) server/thinkphp/library/think/model/concern/Attribute.php:406— Attribute.writeTransform has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
formSelects-v4.Select4.value (cyclomatic 19) server/public/static/plug/formSelects/formSelects-v4.js:1508— formSelects-v4.Select4.value has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to one function literal inside it that branches. 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.
setupPositionProbePattern (cyclomatic 19) uniapp/components/tki-qrcode/qrcode.js:104— setupPositionProbePattern 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.
AccountLogLogic.lists (cyclomatic 18) server/application/admin/logic/AccountLogLogic.php:31— AccountLogLogic.lists has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
RechargeLogLogic.lists (cyclomatic 18) server/application/admin/logic/RechargeLogLogic.php:25— RechargeLogLogic.lists has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
App.init (cyclomatic 18) server/thinkphp/library/think/App.php:268— App.init has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Request.create (cyclomatic 18) server/thinkphp/library/think/Request.php:365— Request.create has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Builder.buildWhere (cyclomatic 18) server/thinkphp/library/think/db/Builder.php:285— Builder.buildWhere has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Query.parseWhereExp (cyclomatic 18) server/thinkphp/library/think/db/Query.php:1531— Query.parseWhereExp has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Query.resultToModel (cyclomatic 18) server/thinkphp/library/think/db/Query.php:3351— Query.resultToModel has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RuleGroup.check (cyclomatic 18) server/thinkphp/library/think/route/RuleGroup.php:119— RuleGroup.check has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TagLib.parseAttr (cyclomatic 18) server/thinkphp/library/think/template/TagLib.php:233— TagLib.parseAttr has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
REDACTED.layui.config().extend().use() (cyclomatic 18) server/application/admin/view/face_sheet_order/lists.html:129— REDACTED.layui.config().extend().use() has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 211, 206, 239, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
REDACTED.layui.config().extend().use() (cyclomatic 18) server/application/admin/view/freight/index.html:52— REDACTED.layui.config().extend().use() has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 13 function items inside it that branch (a function literal at line 228, getLists, a function literal at line 359, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
formSelects-v4.Select4.config (cyclomatic 18) server/public/static/plug/formSelects/formSelects-v4.js:1602— formSelects-v4.Select4.config has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
appender (cyclomatic 18) server/public/static/plug/formSelects/formSelects-v4.js:183— appender has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (filter, forEach, map). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Goods.edit (cyclomatic 17) server/application/admin/controller/Goods.php:178— Goods.edit has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FaceSheetOrderLogic.lists (cyclomatic 17) server/application/admin/logic/FaceSheetOrderLogic.php:49— FaceSheetOrderLogic.lists has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
TeamFoundLogic.lists (cyclomatic 17) server/application/admin/logic/TeamFoundLogic.php:57— TeamFoundLogic.lists has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
VerificationLogic.getWhere (cyclomatic 17) server/application/admin/logic/VerificationLogic.php:41— VerificationLogic.getWhere has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WithdrawLogic.lists (cyclomatic 17) server/application/admin/logic/WithdrawLogic.php:44— WithdrawLogic.lists has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
UrlServer.getFileUrl (cyclomatic 17) server/application/common/server/UrlServer.php:33— UrlServer.getFileUrl has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Loader.findFile (cyclomatic 17) server/thinkphp/library/think/Loader.php:143— Loader.findFile has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Template.parseThinkVar (cyclomatic 17) server/thinkphp/library/think/Template.php:1108— Template.parseThinkVar has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Template.getRegex (cyclomatic 17) server/thinkphp/library/think/Template.php:1252— Template.getRegex has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RouteList.getRouteList (cyclomatic 17) server/thinkphp/library/think/console/command/RouteList.php:52— RouteList.getRouteList has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cx.tagForeach (cyclomatic 17) server/thinkphp/library/think/template/taglib/Cx.php:137— Cx.tagForeach has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
add.html.layui.config().extend().use() (cyclomatic 17) server/application/admin/view/bargain/add.html:172— add.html.layui.config().extend().use() has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 235, 246, 257, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
edit.html.layui.config().extend().use() (cyclomatic 17) server/application/admin/view/bargain/edit.html:201— edit.html.layui.config().extend().use() has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 264, 275, 286, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
REDACTED.layui.config().extend().use() (cyclomatic 17) REDACTED:116— REDACTED.layui.config().extend().use() has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 14 function literals inside it that branch (lines 208, 123, 130, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
request.service.interceptors.response.use() (cyclomatic 17) uniapp/utils/request.js:87— request.service.interceptors.response.use() has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous) (cyclomatic 17) uniapp/utils/request.js:87— (anonymous) has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Goods.add (cyclomatic 16) server/application/admin/controller/Goods.php:87— Goods.add has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AfterSaleLogic.getDetail (cyclomatic 16) server/application/admin/logic/AfterSaleLogic.php:149— AfterSaleLogic.getDetail has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UpgradeLogic.index (cyclomatic 16) REDACTED:64— UpgradeLogic.index has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CouponLogic.getGoodsCoupon (cyclomatic 16) server/application/api/logic/CouponLogic.php:97— CouponLogic.getGoodsCoupon has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GoodsLogic.getGoodsDetail (cyclomatic 16) server/application/api/logic/GoodsLogic.php:117— GoodsLogic.getGoodsDetail has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SignLogic.lists (cyclomatic 16) server/application/api/logic/SignLogic.php:33— SignLogic.lists has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DistributionServer.commission (cyclomatic 16) server/application/common/server/DistributionServer.php:28— DistributionServer.commission has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Console.findAlternatives (cyclomatic 16) server/thinkphp/library/think/Console.php:746— Console.findAlternatives has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Validate.check (cyclomatic 16) server/thinkphp/library/think/Validate.php:396— Validate.check has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Validate.is (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Input.addLongOption (cyclomatic 16) server/thinkphp/library/think/console/Input.php:198— Input.addLongOption has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Console.renderException (cyclomatic 16) server/thinkphp/library/think/console/output/driver/Console.php:71— Console.renderException has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Query.field (cyclomatic 16) server/thinkphp/library/think/db/Query.php:1008— Query.field has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Query.parsePkWhere (cyclomatic 16) server/thinkphp/library/think/db/Query.php:3631— Query.parsePkWhere has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Console.output (cyclomatic 16) server/thinkphp/library/think/debug/Console.php:42— Console.output has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Module.init (cyclomatic 16) server/thinkphp/library/think/route/dispatch/Module.php:26— Module.init has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Url.parseUrl (cyclomatic 16) server/thinkphp/library/think/route/dispatch/Url.php:37— Url.parseUrl has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
consumeToken.issue (cyclomatic 16) pc/utils/consumeToken.js:40— consumeToken.issue has cyclomatic complexity 16 (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.
REDACTED.layui.config().extend().use() (cyclomatic 16) REDACTED:123— REDACTED.layui.config().extend().use() has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 11 function items inside it that branch (a function literal at line 281, changeFields, a function literal at line 166, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
REDACTED.layui.config().extend().use() (cyclomatic 16) REDACTED:163— REDACTED.layui.config().extend().use() has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 11 function items inside it that branch (a function literal at line 321, changeFields, a function literal at line 206, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
tools.toast (cyclomatic 16) uniapp/utils/tools.js:161— tools.toast has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Repeated repair: uniapp/pages/shop_cart/shop_cart.vue uniapp/pages/shop_cart/shop_cart.vue:229— uniapp/pages/shop_cart/shop_cart.vue changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is (anonymous) at line 229), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix 最新版uniapp 无法编译成h5的bug fix sql 注入的问题”; “feat 物流查询优化 fix 购物车加减没实时联动的bug”; “fix 新版hbuilder 无法编译的bug feat 增加消费token feat 增加密码加密提交”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:03:53 +08:00' --until='2026-09-23 14:03:53 +08:00' --full-history --no-merges -- uniapp/pages/shop_cart/shop_cart.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
dtree.layui.define() (cognitive 308) REDACTED:9— dtree.layui.define() has cognitive complexity 308 (threshold 15). Drivers by points: boolean chains 249, if/else 49 (52 pts), ternaries 4, loops 3 (nesting depth added 3). Of this number, 247 points are the body's own statements and 61 belong to 187 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
popNode (cognitive 210) uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:355— popNode has cognitive complexity 210 (threshold 15). Drivers by points: if/else 39 (126 pts), loops 11 (42 pts), boolean chains 21, ternaries 4 (21 pts) (nesting depth added 135). Of this number, 152 points are the body's own statements and 58 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
setNode (cognitive 198) uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:120— setNode has cognitive complexity 198 (threshold 15). Drivers by points: if/else 61 (148 pts), boolean chains 21, ternaries 3 (14 pts), loops 4 (13 pts), match/switch 1 (2 pts) (nesting depth added 108). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CouponLogic.orderCoupon (cognitive 175) server/application/api/logic/CouponLogic.php:280— CouponLogic.orderCoupon has cognitive complexity 175 (threshold 15). Drivers by points: if/else 23 (113 pts), loops 7 (41 pts), match/switch 2 (8 pts), ternaries 1 (7 pts), boolean chains 6 (nesting depth added 136). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
layedit.js_beautify (cognitive 167) REDACTED:3367— layedit.js_beautify has cognitive complexity 167 (threshold 15). Drivers by points: if/else 95 (203 pts), boolean chains 44, loops 12 (23 pts), match/switch 1 (2 pts), ternaries 1 (nesting depth added 120). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (layedit.js_beautify::get_next_token) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
treeTable.layui.define() (cognitive 159) server/public/static/plug/treetable-lay/treeTable.js:5— treeTable.layui.define() has cognitive complexity 159 (threshold 15). Drivers by points: if/else 50 (78 pts), boolean chains 68, loops 11 (13 pts) (nesting depth added 30). Of this number, 48 points are the body's own statements and 111 belong to 62 function items inside it that branch. 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.
area.html.layui.config().extend().use() (cognitive 122) server/application/admin/view/freight/area.html:47— area.html.layui.config().extend().use() has cognitive complexity 122 (threshold 15). Drivers by points: if/else 28 (72 pts), loops 24 (47 pts), boolean chains 3 (nesting depth added 67). None of this is in the body itself: all 122 points belong to 9 function items inside it that branch (a function literal at line 99, getSecondLeader, getFirstChildBySource, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
area_edit.html.layui.config().extend().use() (cognitive 122) server/application/admin/view/freight/area_edit.html:56— area_edit.html.layui.config().extend().use() has cognitive complexity 122 (threshold 15). Drivers by points: if/else 28 (72 pts), loops 24 (47 pts), boolean chains 3 (nesting depth added 67). None of this is in the body itself: all 122 points belong to 9 function items inside it that branch (a function literal at line 121, getSecondLeader, getFirstChildBySource, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Template.parseTag (cognitive 112) server/thinkphp/library/think/Template.php:812— Template.parseTag has cognitive complexity 112 (threshold 15). Drivers by points: if/else 12 (49 pts), ternaries 6 (44 pts), match/switch 3 (15 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 88). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
getLostPoint (cognitive 106) uniapp/components/tki-qrcode/qrcode.js:508— getLostPoint has cognitive complexity 106 (threshold 15). Drivers by points: if/else 25 (92 pts), boolean chains 8, loops 4 (6 pts) (nesting depth added 69). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Order.checkCoupon (cognitive 94) server/application/api/validate/Order.php:82— Order.checkCoupon has cognitive complexity 94 (threshold 15). Drivers by points: if/else 21 (62 pts), loops 6 (23 pts), boolean chains 5, ternaries 1 (4 pts) (nesting depth added 61). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Url.build (cognitive 93) server/thinkphp/library/think/Url.php:76— Url.build has cognitive complexity 93 (threshold 15). Drivers by points: if/else 29 (58 pts), ternaries 7 (13 pts), boolean chains 12, loops 3 (10 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
layedit.js_beautify::get_next_token (cognitive 90) REDACTED:3451— layedit.js_beautify::get_next_token has cognitive complexity 90 (threshold 15). Drivers by points: if/else 28 (59 pts), loops 7 (18 pts), boolean chains 13 (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (layedit.js_beautify) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity· one (cognitive 77) · ×1
one (cognitive 77) server/public/static/plug/formSelects/formSelects-v4.js:812— one has cognitive complexity 77 (threshold 15). Drivers by points: if/else 27 (43 pts), ternaries 9 (15 pts), boolean chains 11, loops 3 (8 pts) (nesting depth added 27). Most of this is not in the body itself: 2 of the 77 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 873, 816, 927, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
GoodsLogic.edit (cognitive 67) server/application/admin/logic/GoodsLogic.php:447— GoodsLogic.edit has cognitive complexity 67 (threshold 15). Drivers by points: if/else 18 (32 pts), loops 7 (15 pts), ternaries 10 (12 pts), boolean chains 6, error handling 1, match/switch 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TagLib.parseTag (cognitive 63) server/thinkphp/library/think/template/TagLib.php:87— TagLib.parseTag has cognitive complexity 63 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 6 (18 pts), ternaries 6 (15 pts), boolean chains 1 (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Conversion.toArray (cognitive 61) server/thinkphp/library/think/model/concern/Conversion.php:131— Conversion.toArray has cognitive complexity 61 (threshold 15). Drivers by points: if/else 16 (43 pts), ternaries 2 (8 pts), boolean chains 5, loops 4 (5 pts) (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
RuleGroup.checkMergeRuleRegex (cognitive 57) server/thinkphp/library/think/route/RuleGroup.php:279— RuleGroup.checkMergeRuleRegex has cognitive complexity 57 (threshold 15). Drivers by points: if/else 14 (40 pts), loops 4 (8 pts), boolean chains 5, ternaries 1 (3 pts), error handling 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ask.autocomplete (cognitive 54) server/thinkphp/library/think/console/output/Ask.php:99— Ask.autocomplete has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (38 pts), boolean chains 8, loops 2 (4 pts), ternaries 1 (4 pts) (nesting depth added 30). 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.
Url.parseDomain (cognitive 53) server/thinkphp/library/think/Url.php:282— Url.parseDomain has cognitive complexity 53 (threshold 15). Drivers by points: if/else 9 (30 pts), ternaries 3 (10 pts), loops 2 (8 pts), boolean chains 5 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
oa_menu.html.layui.config().extend().use() (cognitive 53) server/application/admin/view/oa/oa_menu.html:314— oa_menu.html.layui.config().extend().use() has cognitive complexity 53 (threshold 15). Drivers by points: if/else 36 (51 pts), match/switch 2 (nesting depth added 15). None of this is in the body itself: all 53 points belong to 10 function items inside it that branch (checkData, a function literal at line 391, a function literal at line 350, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
SignLogic.sign (cognitive 51) server/application/api/logic/SignLogic.php:163— SignLogic.sign has cognitive complexity 51 (threshold 15). Drivers by points: if/else 16 (36 pts), boolean chains 10, ternaries 2 (4 pts), error handling 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OrderLogic.add (cognitive 49) server/application/api/logic/OrderLogic.php:511— OrderLogic.add has cognitive complexity 49 (threshold 15). Drivers by points: if/else 20 (33 pts), boolean chains 8, loops 2 (4 pts), ternaries 3, error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TagLib.parseAttr (cognitive 48) server/thinkphp/library/think/template/TagLib.php:233— TagLib.parseAttr has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (28 pts), ternaries 2 (10 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Build.module (cognitive 46) server/thinkphp/library/think/Build.php:112— Build.module has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 5 (18 pts), if/else 7 (14 pts), loops 4 (10 pts), match/switch 1 (4 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Validate.checkItem (cognitive 45) server/thinkphp/library/think/Validate.php:509— Validate.checkItem has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 11, ternaries 1 (3 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GoodsCommentLogic.lists (cognitive 44) server/application/admin/logic/GoodsCommentLogic.php:24— GoodsCommentLogic.lists has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 17, loops 2, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
common.is_private_ip (cognitive 44) REDACTED:106— common.is_private_ip has cognitive complexity 44 (threshold 15). Drivers by points: if/else 23 (37 pts), boolean chains 7 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
getParent (cognitive 44) uniapp/components/uview-ui/libs/function/getParent.js:3— getParent has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (28 pts), ternaries 2 (10 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 28). Of this number, 40 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
QRCode (cognitive 43) uniapp/components/tki-qrcode/qrcode.js:1022— QRCode has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 9, loops 4 (6 pts), ternaries 2 (4 pts) (nesting depth added 9). Most of this is not in the body itself: 9 of the 43 points are its own statements and the rest belongs to 10 function items inside it that branch (empty, createCanvas, getForeGround, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Unix.readAndWrite (cognitive 42) server/thinkphp/library/think/process/pipes/Unix.php:93— Unix.readAndWrite has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 7, loops 3 (5 pts), ternaries 3 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Goods.add (cognitive 41) server/application/admin/controller/Goods.php:87— Goods.add has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 3 (10 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
permission.judgePermission (cognitive 41) uniapp/utils/permission.js:221— permission.judgePermission has cognitive complexity 41 (threshold 15). Drivers by points: if/else 29 (39 pts), boolean chains 2 (nesting depth added 10). Of this number, 36 points are the body's own statements and 5 belong to 2 function items inside it that branch. 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.
Goods.edit (cognitive 40) server/application/admin/controller/Goods.php:178— Goods.edit has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 1 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
GoodsLogic.add (cognitive 40) server/application/admin/logic/GoodsLogic.php:261— GoodsLogic.add has cognitive complexity 40 (threshold 15). Drivers by points: loops 6 (13 pts), ternaries 10 (12 pts), if/else 5 (8 pts), boolean chains 5, error handling 1, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Template.parseExtend (cognitive 40) server/thinkphp/library/think/Template.php:569— Template.parseExtend has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 2 (8 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Console.renderException (cognitive 40) server/thinkphp/library/think/console/output/driver/Console.php:71— Console.renderException has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 7 (24 pts), loops 5 (11 pts), if/else 2 (4 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Builder.buildWhere (cognitive 40) server/thinkphp/library/think/db/Builder.php:285— Builder.buildWhere has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 5 (15 pts), ternaries 2 (6 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Loader.findFile (cognitive 39) server/thinkphp/library/think/Loader.php:143— Loader.findFile has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 6 (14 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BargainLogic.bargainDetail (cognitive 38) server/application/api/logic/BargainLogic.php:385— BargainLogic.bargainDetail has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 11 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Template.parseVar (cognitive 38) server/thinkphp/library/think/Template.php:948— Template.parseVar has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (30 pts), match/switch 1 (6 pts), loops 1 (2 pts) (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Connection.update (cognitive 38) server/thinkphp/library/think/db/Connection.php:1087— Connection.update has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 9, loops 2 (5 pts), ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WeChatLogic.index (cognitive 37) server/application/api/logic/WeChatLogic.php:72— WeChatLogic.index has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 3 (6 pts), ternaries 3 (6 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GoodsLogic.lists (cognitive 36) server/application/admin/logic/GoodsLogic.php:58— GoodsLogic.lists has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 8, match/switch 2 (4 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OrderLogic.getOrderList (cognitive 35) server/application/api/logic/OrderLogic.php:849— OrderLogic.getOrderList has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 7 (21 pts), if/else 3 (6 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
appender (cognitive 35) server/public/static/plug/formSelects/formSelects-v4.js:183— appender has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 18). Most of this is not in the body itself: 3 of the 35 points are its own statements and the rest belongs to 3 function items inside it that branch (filter, forEach, map). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
UpgradeLogic.index (cognitive 34) REDACTED:64— UpgradeLogic.index has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 2 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Template.parseVarFunction (cognitive 34) server/thinkphp/library/think/Template.php:1015— Template.parseVarFunction has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (27 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Query.view (cognitive 34) server/thinkphp/library/think/db/Query.php:1157— Query.view has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 2 (6 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CouponLogic.registerSendCoupon (cognitive 33) server/application/api/logic/CouponLogic.php:499— CouponLogic.registerSendCoupon has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (26 pts), match/switch 1 (4 pts), loops 1 (3 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
OrderLogic.orderTraces (cognitive 33) server/application/api/logic/OrderLogic.php:1175— OrderLogic.orderTraces has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 1 (5 pts), boolean chains 2 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Builder.parseWhereItem (cognitive 33) server/thinkphp/library/think/db/Builder.php:364— Builder.parseWhereItem has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 4 (8 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MpHtmlParser.MpHtmlParser.remove (cognitive 33) uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:305— MpHtmlParser.MpHtmlParser.remove has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 12). Of this number, 26 points are the body's own statements and 7 belong to one function item inside it that branches. 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.
(anonymous) (cognitive 33) server/public/static/plug/iconpicker/assets/layui/lay/modules/tree.js:2— (anonymous) has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 17, ternaries 14 (15 pts), if/else 1 (nesting depth added 1). None of this is in the body itself: all 33 points belong to 20 function items inside it that branch (a function literal at line 25, a function literal at line 18, a function literal at line 45, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
App.init (cognitive 32) server/thinkphp/library/think/App.php:268— App.init has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (27 pts), ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Validate.check (cognitive 32) server/thinkphp/library/think/Validate.php:396— Validate.check has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 3 (7 pts), loops 2, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Connection.column (cognitive 32) server/thinkphp/library/think/db/Connection.php:1338— Connection.column has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (22 pts), ternaries 2 (6 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Sqlsrv.column (cognitive 32) server/thinkphp/library/think/db/connector/Sqlsrv.php:139— Sqlsrv.column has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (20 pts), ternaries 3 (8 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Rule.checkOption (cognitive 32) server/thinkphp/library/think/route/Rule.php:886— Rule.checkOption has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 14, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
formSelects-v4.Select4.value (cognitive 32) server/public/static/plug/formSelects/formSelects-v4.js:1508— formSelects-v4.Select4.value has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 4 (nesting depth added 12). Of this number, 20 points are the body's own statements and 12 belong to one function literal inside it that branches. 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.
OrderLogic.getOrderDetail (cognitive 31) server/application/api/logic/OrderLogic.php:932— OrderLogic.getOrderDetail has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 7, ternaries 4 (6 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
axios.default (cognitive 31) pc/plugins/axios.js:14— axios.default has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 14, if/else 9 (14 pts), ternaries 1 (3 pts) (nesting depth added 7). None of this is in the body itself: all 31 points belong to 3 function literals inside it that branch (lines 17, 50, 33). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
REDACTED.layui.config().extend().use() (cognitive 31) REDACTED:158— REDACTED.layui.config().extend().use() has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25 (30 pts), ternaries 1 (nesting depth added 5). None of this is in the body itself: all 31 points belong to 15 function literals inside it that branch (lines 358, 342, 292, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
(anonymous) (cognitive 31) pc/plugins/axios.js:14— (anonymous) has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 14, if/else 9 (14 pts), ternaries 1 (3 pts) (nesting depth added 7). None of this is in the body itself: all 31 points belong to 5 function literals inside it that branch (lines 17, 50, 33, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
mapData (cognitive 31) uniapp/components/tki-qrcode/qrcode.js:323— mapData has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (24 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session.init (cognitive 30) server/thinkphp/library/think/Session.php:123— Session.init has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (19 pts), ternaries 4 (7 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Query.parsePkWhere (cognitive 30) server/thinkphp/library/think/db/Query.php:3631— Query.parsePkWhere has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 5 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UserLevelLogic.lists (cognitive 29) server/application/api/logic/UserLevelLogic.php:30— UserLevelLogic.lists has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 7, loops 4 (6 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Order.checkDeliveryType (cognitive 29) server/application/api/validate/Order.php:252— Order.checkDeliveryType has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 2 (6 pts), ternaries 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Excel.out (cognitive 29) server/application/common/server/excel/Excel.php:32— Excel.out has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 3 (4 pts), ternaries 2 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Request.dealUploadFile (cognitive 29) server/thinkphp/library/think/Request.php:1207— Request.dealUploadFile has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (8 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RouteList.getRouteList (cognitive 29) server/thinkphp/library/think/console/command/RouteList.php:52— RouteList.getRouteList has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 4 (8 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Query.parseView (cognitive 29) server/thinkphp/library/think/db/Query.php:3580— Query.parseView has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Attribute.getRelationAttribute (cognitive 29) server/thinkphp/library/think/model/concern/Attribute.php:528— Attribute.getRelationAttribute has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 2 (11 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
MorphTo.eagerlyResultSet (cognitive 29) server/thinkphp/library/think/model/relation/MorphTo.php:169— MorphTo.eagerlyResultSet has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (9 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
edit.html.layui.config().extend().use() (cognitive 29) server/application/admin/view/luck_draw/edit.html:118— edit.html.layui.config().extend().use() has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 1, loops 1 (nesting depth added 8). None of this is in the body itself: all 29 points belong to 6 function literals inside it that branch (lines 187, 154, 235, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Request.pathinfo (cognitive 28) server/thinkphp/library/think/Request.php:678— Request.pathinfo has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 4 (13 pts), if/else 5 (11 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Console.output (cognitive 28) server/thinkphp/library/think/debug/Console.php:42— Console.output has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 6 (8 pts), loops 3 (6 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Windows.write (cognitive 28) server/thinkphp/library/think/process/pipes/Windows.php:175— Windows.write has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 7, loops 2 (4 pts), ternaries 3 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MpHtmlParser.MpHtmlParser.setText (cognitive 28) uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:90— MpHtmlParser.MpHtmlParser.setText has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
search (cognitive 28) server/public/static/plug/formSelects/formSelects-v4.js:330— search has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 7, ternaries 1 (nesting depth added 8). Of this number, 22 points are the body's own statements and 6 belong to 3 function literals inside it that branch. 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.
AfterSaleLogic.getDetail (cognitive 27) server/application/admin/logic/AfterSaleLogic.php:149— AfterSaleLogic.getDetail has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (22 pts), loops 3, match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UserLogic.lists (cognitive 27) server/application/admin/logic/UserLogic.php:44— UserLogic.lists has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 7, ternaries 1 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GoodsLogic.getGoodsDetail (cognitive 27) server/application/api/logic/GoodsLogic.php:117— GoodsLogic.getGoodsDetail has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 3 (6 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SignLogic.lists (cognitive 27) server/application/api/logic/SignLogic.php:33— SignLogic.lists has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (6 pts), ternaries 3 (5 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Model.updateData (cognitive 27) server/thinkphp/library/think/Model.php:564— Model.updateData has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 4 (6 pts), boolean chains 3, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Html.output (cognitive 27) server/thinkphp/library/think/debug/Html.php:41— Html.output has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 6 (8 pts), loops 2 (5 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RuleItem.match (cognitive 27) server/thinkphp/library/think/route/RuleItem.php:233— RuleItem.match has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, ternaries 2 (3 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
handlerLabel (cognitive 27) server/public/static/plug/formSelects/formSelects-v4.js:1161— handlerLabel has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 17, if/else 6 (7 pts), ternaries 3 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Template.getRegex (cognitive 26) server/thinkphp/library/think/Template.php:1252— Template.getRegex has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 2, match/switch 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Builder.parseData (cognitive 26) server/thinkphp/library/think/db/Builder.php:92— Builder.parseData has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 7, match/switch 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UrlServer.getFileUrl (cognitive 25) server/application/common/server/UrlServer.php:33— UrlServer.getFileUrl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (7 pts), boolean chains 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Autoload.createMap (cognitive 25) server/thinkphp/library/think/console/command/optimize/Autoload.php:151— Autoload.createMap has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Definition.getSynopsis (cognitive 25) server/thinkphp/library/think/console/input/Definition.php:336— Definition.getSynopsis has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 3 (11 pts), if/else 5 (9 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Connection.getTableInfo (cognitive 25) server/thinkphp/library/think/db/Connection.php:344— Connection.getTableInfo has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 3 (6 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Dispatch.createBindModel (cognitive 25) server/thinkphp/library/think/route/Dispatch.php:289— Dispatch.createBindModel has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (4 pts), ternaries 1 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
REDACTED.layui.config().extend().use() (cognitive 25) server/application/admin/view/goods_comment/lists.html:151— REDACTED.layui.config().extend().use() has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (23 pts), loops 1 (2 pts) (nesting depth added 9). None of this is in the body itself: all 25 points belong to 7 function literals inside it that branch (lines 260, 409, 270, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
init (cognitive 25) server/public/static/plug/formSelects/formSelects-v4.js:237— init has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 7 (9 pts), boolean chains 8, if/else 6 (8 pts) (nesting depth added 4). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 241, 276, 264, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
btns (cognitive 25) server/public/static/plug/formSelects/formSelects-v4.js:1708— btns has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, ternaries 3 (5 pts) (nesting depth added 6). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1737, 1719). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
FreightLogic.areaSort (cognitive 24) server/application/admin/logic/FreightLogic.php:184— FreightLogic.areaSort has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 3 (9 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UserLogic.exportFile (cognitive 24) server/application/admin/logic/UserLogic.php:136— UserLogic.exportFile has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 7, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UserSettingLogic.set (cognitive 24) server/application/admin/logic/UserSettingLogic.php:65— UserSettingLogic.set has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OrderClose.execute (cognitive 24) server/application/common/command/OrderClose.php:38— OrderClose.execute has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DistributionServer.commission (cognitive 24) server/application/common/server/DistributionServer.php:28— DistributionServer.commission has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Console.findAlternatives (cognitive 24) server/thinkphp/library/think/Console.php:746— Console.findAlternatives has cognitive complexity 24 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 2 (7 pts), loops 4 (5 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Attribute.readTransform (cognitive 24) server/thinkphp/library/think/model/concern/Attribute.php:569— Attribute.readTransform has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 4 (10 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
deepMerge.deepMerge (cognitive 24) uniapp/components/uview-ui/libs/function/deepMerge.js:4— deepMerge.deepMerge has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
WithdrawLogic.search (cognitive 23) server/application/admin/logic/WithdrawLogic.php:259— WithdrawLogic.search has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Config.buildCacheContent (cognitive 23) server/thinkphp/library/think/console/command/optimize/Config.php:48— Config.buildCacheContent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Query.getJoinTable (cognitive 23) server/thinkphp/library/think/db/Query.php:927— Query.getJoinTable has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Query.chunk (cognitive 23) server/thinkphp/library/think/db/Query.php:3490— Query.chunk has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 3 (7 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Query.parseOptions (cognitive 23) server/thinkphp/library/think/db/Query.php:3677— Query.parseOptions has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 3 (6 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mysql.parseKey (cognitive 23) server/thinkphp/library/think/db/builder/Mysql.php:118— Mysql.parseKey has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (7 pts), boolean chains 5 (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.
Socket.save (cognitive 23) server/thinkphp/library/think/log/driver/Socket.php:68— Socket.save has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 3 (6 pts), loops 3 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
edit.html.layui.config().extend().use() (cognitive 23) server/application/admin/view/bargain/edit.html:201— edit.html.layui.config().extend().use() has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 3, loops 1 (nesting depth added 7). None of this is in the body itself: all 23 points belong to 6 function literals inside it that branch (lines 264, 275, 286, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
formSelects-v4.Common.calcLabelLeft (cognitive 23) server/public/static/plug/formSelects/formSelects-v4.js:773— formSelects-v4.Common.calcLabelLeft has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createBytes (cognitive 23) uniapp/components/tki-qrcode/qrcode.js:263— createBytes has cognitive complexity 23 (threshold 15). Drivers by points: loops 9 (14 pts), if/else 2 (6 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity· children (cognitive 23) · ×1
children (cognitive 23) uniapp/components/lime-painter/components/common/relation.js:43— children has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, boolean chains 6, ternaries 2 (4 pts) (nesting depth added 2). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 13 function items inside it that branch (bindRelation, handler, handler, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
request::(anonymous)::complete (cognitive 23) uniapp/components/uview-ui/libs/request/index.js:30— request::(anonymous)::complete has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OrderLogic.exportFile (cognitive 22) server/application/admin/logic/OrderLogic.php:178— OrderLogic.exportFile has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9, boolean chains 8, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 2). 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.
YlyPrinter.ylyPrint (cognitive 22) server/application/common/server/YlyPrinter.php:134— YlyPrinter.ylyPrint has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Request.create (cognitive 22) server/thinkphp/library/think/Request.php:365— Request.create has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 4 (5 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Route.import (cognitive 22) server/thinkphp/library/think/Route.php:480— Route.import has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 4 (7 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Connection.delete (cognitive 22) server/thinkphp/library/think/db/Connection.php:1182— Connection.delete has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (10 pts), loops 1 (2 pts) (nesting depth added 4). 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.
Sqlsrv.parseOrder (cognitive 22) server/thinkphp/library/think/db/builder/Sqlsrv.php:38— Sqlsrv.parseOrder has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 3 (9 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
layedit.style_html (cognitive 22) REDACTED:3011— layedit.style_html has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 3 (8 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 6). Of this number, 11 points are the body's own statements and 11 belong to 12 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
request.service.interceptors.request.use() (cognitive 22) uniapp/utils/request.js:40— request.service.interceptors.request.use() has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 9, ternaries 1 (3 pts) (nesting depth added 6). Of this number, 16 points are the body's own statements and 6 belong to one function literal inside it that branches. 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.
request.service.interceptors.response.use() (cognitive 22) uniapp/utils/request.js:87— request.service.interceptors.response.use() has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 7 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BargainLogic.getLaunch (cognitive 21) server/application/admin/logic/BargainLogic.php:390— BargainLogic.getLaunch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, match/switch 1 (3 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CouponLogic.getGoodsCoupon (cognitive 21) server/application/api/logic/CouponLogic.php:97— CouponLogic.getGoodsCoupon has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TeamLogic.buy (cognitive 21) server/application/api/logic/TeamLogic.php:257— TeamLogic.buy has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, ternaries 3, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Request.cache (cognitive 21) server/thinkphp/library/think/Request.php:2050— Request.cache has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Url.getRuleUrl (cognitive 21) server/thinkphp/library/think/Url.php:350— Url.getRuleUrl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Input.addLongOption (cognitive 21) server/thinkphp/library/think/console/Input.php:198— Input.addLongOption has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Choice.getDefaultValidator (cognitive 21) server/thinkphp/library/think/console/output/question/Choice.php:104— Choice.getDefaultValidator has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Builder.parseOrder (cognitive 21) server/thinkphp/library/think/db/Builder.php:799— Builder.parseOrder has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (9 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Connection.find (cognitive 21) server/thinkphp/library/think/db/Connection.php:789— Connection.find has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
REDACTED.layui.config().extend().use() (cognitive 21) server/application/admin/view/freight/index.html:52— REDACTED.layui.config().extend().use() has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (19 pts), ternaries 2 (nesting depth added 4). None of this is in the body itself: all 21 points belong to 13 function items inside it that branch (a function literal at line 228, getLists, a function literal at line 359, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
REDACTED.layui.config().extend().use() (cognitive 21) REDACTED:123— REDACTED.layui.config().extend().use() has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 1, ternaries 1 (nesting depth added 3). None of this is in the body itself: all 21 points belong to 11 function items inside it that branch (a function literal at line 281, changeFields, a function literal at line 189, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
REDACTED.layui.config().extend().use() (cognitive 21) REDACTED:163— REDACTED.layui.config().extend().use() has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 1, ternaries 1 (nesting depth added 3). None of this is in the body itself: all 21 points belong to 11 function items inside it that branch (a function literal at line 321, changeFields, a function literal at line 229, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
REDACTED.layui.config().extend().use() (cognitive 21) REDACTED:116— REDACTED.layui.config().extend().use() has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17 (20 pts), ternaries 1 (nesting depth added 3). None of this is in the body itself: all 21 points belong to 14 function literals inside it that branch (lines 208, 338, 372, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
setupPositionAdjustPattern (cognitive 21) uniapp/components/tki-qrcode/qrcode.js:160— setupPositionAdjustPattern has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (9 pts), boolean chains 2 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AfterSaleLogic.lists (cognitive 20) server/application/admin/logic/AfterSaleLogic.php:45— AfterSaleLogic.lists has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 5, if/else 5, ternaries 3 (5 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CommonLogic.getGoodsList (cognitive 20) server/application/admin/logic/CommonLogic.php:67— CommonLogic.getGoodsList has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GoodsLogic.exportFile (cognitive 20) server/application/admin/logic/GoodsLogic.php:175— GoodsLogic.exportFile has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 5, boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CouponLogic.couponClose (cognitive 20) server/application/common/logic/CouponLogic.php:23— CouponLogic.couponClose has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Collection.where (cognitive 20) server/thinkphp/library/think/Collection.php:340— Collection.where has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, ternaries 4 (8 pts), if/else 3, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Request.header (cognitive 20) server/thinkphp/library/think/Request.php:1294— Request.header has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Schema.execute (cognitive 20) server/thinkphp/library/think/console/command/optimize/Schema.php:31— Schema.execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (5 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Descriptor.describeConsole (cognitive 20) server/thinkphp/library/think/console/output/Descriptor.php:213— Descriptor.describeConsole has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (7 pts), boolean chains 2, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Query.resultToModel (cognitive 20) server/thinkphp/library/think/db/Query.php:3351— Query.resultToModel has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RuleGroup.check (cognitive 20) server/thinkphp/library/think/route/RuleGroup.php:119— RuleGroup.check has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Url.parseUrl (cognitive 20) server/thinkphp/library/think/route/dispatch/Url.php:37— Url.parseUrl has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 4 (6 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Cx.tagForeach (cognitive 20) server/thinkphp/library/think/template/taglib/Cx.php:137— Cx.tagForeach has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 5, boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
queryParams (cognitive 20) uniapp/components/uview-ui/libs/function/queryParams.js:6— queryParams has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 3 (6 pts), loops 2 (5 pts), match/switch 1 (3 pts) (nesting depth added 10). Of this number, 16 points are the body's own statements and 4 belong to 4 function literals inside it that branch. 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.
OrderLogic.getListsCondition (cognitive 19) server/application/admin/logic/OrderLogic.php:52— OrderLogic.getListsCondition has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, boolean chains 8, match/switch 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WeChatPayServer.unifiedOrder (cognitive 19) server/application/common/server/WeChatPayServer.php:74— WeChatPayServer.unifiedOrder has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Template.parseTemplateFile (cognitive 19) server/thinkphp/library/think/Template.php:1213— Template.parseTemplateFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (9 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Autoload.findClasses (cognitive 19) server/thinkphp/library/think/console/command/optimize/Autoload.php:207— Autoload.findClasses has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ask.doAsk (cognitive 19) server/thinkphp/library/think/console/output/Ask.php:60— Ask.doAsk has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 1 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Query.field (cognitive 19) server/thinkphp/library/think/db/Query.php:1008— Query.field has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (6 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Query.order (cognitive 19) server/thinkphp/library/think/db/Query.php:1887— Query.order has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Module.init (cognitive 19) server/thinkphp/library/think/route/dispatch/Module.php:26— Module.init has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 5 (6 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
REDACTED.layui.use() (cognitive 19) server/application/admin/view/file_new/lists.html:118— REDACTED.layui.use() has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (16 pts), loops 2, match/switch 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 10 function literals inside it that branch (lines 346, 141, 183, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
setupPositionProbePattern (cognitive 19) uniapp/components/tki-qrcode/qrcode.js:104— setupPositionProbePattern has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rgbToHex (cognitive 19) uniapp/components/uview-ui/libs/function/colorGradient.js:62— rgbToHex has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (5 pts), ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MpHtmlParser::decode (cognitive 19) uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:33— MpHtmlParser::decode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArticleLogic.lists (cognitive 18) server/application/admin/logic/ArticleLogic.php:29— ArticleLogic.lists has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RechargeLogLogic.lists (cognitive 18) server/application/admin/logic/RechargeLogLogic.php:25— RechargeLogLogic.lists has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
WithdrawLogic.lists (cognitive 18) server/application/admin/logic/WithdrawLogic.php:44— WithdrawLogic.lists has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Payment.payway (cognitive 18) server/application/api/controller/Payment.php:199— Payment.payway has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UserAddressLogic.handleRegionField (cognitive 18) server/application/api/logic/UserAddressLogic.php:266— UserAddressLogic.handleRegionField has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
common.safe_http_fetch (cognitive 18) REDACTED:219— common.safe_http_fetch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
WechatMiniExpressSendSyncServer._sync_order (cognitive 18) server/application/common/server/WechatMiniExpressSendSyncServer.php:42— WechatMiniExpressSendSyncServer._sync_order has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 3 (6 pts), boolean chains 4, error handling 1, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Request.filterValue (cognitive 18) server/thinkphp/library/think/Request.php:1459— Request.filterValue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), ternaries 1 (4 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Template.parseBlock (cognitive 18) server/thinkphp/library/think/Template.php:693— Template.parseBlock has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (5 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Validate.unique (cognitive 18) server/thinkphp/library/think/Validate.php:991— Validate.unique has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 1 (2 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Connection.multiConnect (cognitive 18) server/thinkphp/library/think/db/Connection.php:2034— Connection.multiConnect has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 5 (6 pts), loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Query.table (cognitive 18) server/thinkphp/library/think/db/Query.php:1825— Query.table has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mysql.getExplain (cognitive 18) server/thinkphp/library/think/db/connector/Mysql.php:137— Mysql.getExplain has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (6 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
REDACTED.layui.config().extend().use() (cognitive 18) server/application/admin/view/supplier/lists.html:57— REDACTED.layui.config().extend().use() has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 4). None of this is in the body itself: all 18 points belong to 7 function literals inside it that branch (lines 140, 111, 158, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
renderSelect (cognitive 18) server/public/static/plug/formSelects/formSelects-v4.js:706— renderSelect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 722, 732, 712). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
config (cognitive 18) server/public/static/plug/formSelects/formSelects-v4.js:1602— config has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, ternaries 3 (6 pts), if/else 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AdLogic.lists (cognitive 17) server/application/admin/logic/AdLogic.php:39— AdLogic.lists has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, match/switch 1 (2 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.
TeamFoundLogic.lists (cognitive 17) server/application/admin/logic/TeamFoundLogic.php:57— TeamFoundLogic.lists has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, match/switch 1 (3 pts), loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GoodsCommentLogic.lists (cognitive 17) server/application/api/logic/GoodsCommentLogic.php:28— GoodsCommentLogic.lists has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PcLogic.pcLists (cognitive 17) server/application/api/logic/PcLogic.php:33— PcLogic.pcLists has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UserServer.updateUser (cognitive 17) server/application/api/server/UserServer.php:150— UserServer.updateUser has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileCate.formatTreeMenu (cognitive 17) server/application/common/model/FileCate.php:90— FileCate.formatTreeMenu has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (7 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
installModel.cpFiles (cognitive 17) REDACTED:589— installModel.cpFiles has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Model.__construct (cognitive 17) server/thinkphp/library/think/Model.php:174— Model.__construct has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Redis.__construct (cognitive 17) server/thinkphp/library/think/cache/driver/Redis.php:42— Redis.__construct has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Query.alias (cognitive 17) server/thinkphp/library/think/db/Query.php:2057— Query.alias has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Attribute.data (cognitive 17) server/thinkphp/library/think/model/concern/Attribute.php:178— Attribute.data has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Resource.buildResourceRule (cognitive 17) server/thinkphp/library/think/route/Resource.php:67— Resource.buildResourceRule has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (5 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Php.parseTemplate (cognitive 17) server/thinkphp/library/think/view/driver/Php.php:110— Php.parseTemplate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
REDACTED.layui.config().extend().use() (cognitive 17) REDACTED:87— REDACTED.layui.config().extend().use() has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 4, boolean chains 1 (nesting depth added 3). None of this is in the body itself: all 17 points belong to 10 function literals inside it that branch (lines 212, 190, 269, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
image.html.layui.config().extend().use() (cognitive 17) server/application/admin/view/file/image.html:51— image.html.layui.config().extend().use() has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (14 pts), loops 2 (3 pts) (nesting depth added 2). None of this is in the body itself: all 17 points belong to 7 function items inside it that branch (a function literal at line 173, a function literal at line 67, a function literal at line 137, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
REDACTED.layui.define() (cognitive 17) server/application/admin/view/user/lists.html:355— REDACTED.layui.define() has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (17 pts) (nesting depth added 4). None of this is in the body itself: all 17 points belong to 5 function literals inside it that branch (lines 401, 420, 474, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
mounted.String.format (cognitive 17) server/public/install/js/mounted.js:4— mounted.String.format has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tree.layui.define("jquery") (cognitive 17) server/public/static/plug/iconpicker/assets/layui/lay/modules/tree.js:2— tree.layui.define("jquery") has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 17. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MpHtmlParser.MpHtmlParser.EndTag (cognitive 17) uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:560— MpHtmlParser.MpHtmlParser.EndTag has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AccountLogLogic.lists (cognitive 16) server/application/admin/logic/AccountLogLogic.php:31— AccountLogLogic.lists has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 5, ternaries 1 (2 pts), loops 1, match/switch 1 (nesting depth added 1). 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.
BargainLogic.add (cognitive 16) server/application/admin/logic/BargainLogic.php:152— BargainLogic.add has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (6 pts), if/else 5, ternaries 4, error handling 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FaceSheetOrderLogic.lists (cognitive 16) server/application/admin/logic/FaceSheetOrderLogic.php:49— FaceSheetOrderLogic.lists has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 4, if/else 4, loops 2 (3 pts), ternaries 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileNewLogic.updateLevel (cognitive 16) server/application/admin/logic/FileNewLogic.php:191— FileNewLogic.updateLevel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (16 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SeckillLogic.goodsList (cognitive 16) server/application/admin/logic/SeckillLogic.php:25— SeckillLogic.goodsList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TeamActivityLogic.add (cognitive 16) server/application/admin/logic/TeamActivityLogic.php:137— TeamActivityLogic.add has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (6 pts), if/else 5, ternaries 4, error handling 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (TeamActivityLogic.edit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
TeamActivityLogic.edit (cognitive 16) server/application/admin/logic/TeamActivityLogic.php:237— TeamActivityLogic.edit has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (6 pts), if/else 5, ternaries 4, error handling 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (TeamActivityLogic.add) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
TeamActivityLogic.teamOrder (cognitive 16) server/application/admin/logic/TeamActivityLogic.php:407— TeamActivityLogic.teamOrder has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MenuServer.createHtml (cognitive 16) REDACTED:109— MenuServer.createHtml has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (5 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AfterSaleLogic.lists (cognitive 16) server/application/api/logic/AfterSaleLogic.php:39— AfterSaleLogic.lists has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (6 pts), ternaries 2 (6 pts), if/else 1 (3 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GoodsCategoryLogic.categoryThirdTree (cognitive 16) server/application/api/logic/GoodsCategoryLogic.php:34— GoodsCategoryLogic.categoryThirdTree has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IndexLogic.lists (cognitive 16) server/application/api/logic/IndexLogic.php:30— IndexLogic.lists has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UserLogic.transferRecord (cognitive 16) REDACTED:464— UserLogic.transferRecord has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TeamEnd.execute (cognitive 16) server/application/common/command/TeamEnd.php:46— TeamEnd.execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 3, boolean chains 2, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PasswordCryptoService.decryptRequest (cognitive 16) server/application/common/server/PasswordCryptoService.php:59— PasswordCryptoService.decryptRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 2, loops 2, ternaries 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
installModel.checkConfig (cognitive 16) REDACTED:290— installModel.checkConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Process.stop (cognitive 16) REDACTED:645— Process.stop has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Route.checkDomain (cognitive 16) server/thinkphp/library/think/Route.php:913— Route.checkDomain has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Connection.bindValue (cognitive 16) server/thinkphp/library/think/db/Connection.php:1494— Connection.bindValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (6 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Query.parseWhereExp (cognitive 16) server/thinkphp/library/think/db/Query.php:1531— Query.parseWhereExp has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 2 (5 pts), boolean chains 4 (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.
Query.withSearch (cognitive 16) server/thinkphp/library/think/db/Query.php:2342— Query.withSearch has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 2 (5 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Query.resultSetToModelCollection (cognitive 16) server/thinkphp/library/think/db/Query.php:3056— Query.resultSetToModelCollection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Console.console (cognitive 16) server/thinkphp/library/think/debug/Console.php:117— Console.console has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 2 (4 pts), boolean chains 2, match/switch 1 (2 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.
RelationShip.checkAutoRelationWrite (cognitive 16) server/thinkphp/library/think/model/concern/RelationShip.php:620— RelationShip.checkAutoRelationWrite has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Think.parseTemplate (cognitive 16) server/thinkphp/library/think/view/driver/Think.php:115— Think.parseTemplate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
REDACTED.layui.config().extend().use() (cognitive 16) REDACTED:141— REDACTED.layui.config().extend().use() has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, ternaries 3. None of this is in the body itself: all 16 points belong to 11 function literals inside it that branch (lines 218, 255, 282, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
issue (cognitive 16) pc/utils/consumeToken.js:40— issue has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, ternaries 3 (4 pts), if/else 3 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
changePlaceHolder (cognitive 16) server/public/static/plug/formSelects/formSelects-v4.js:1304— changePlaceHolder has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 2 (5 pts), boolean chains 4 (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.
guid (cognitive 16) uniapp/components/uview-ui/libs/function/guid.js:11— guid has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 2 (4 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Near-duplicate member family (3 members, 21 shared lines) · ×1
Near-duplicate member family (3 members, 21 shared lines) server/application/admin/controller/Log.php:37— server/application/admin/controller/Log.php:37-65 | server/application/admin/controller/RechargeLog.php:29-55 | server/application/admin/controller/Withdraw.php:36-64 — These 3 members are variants of one another: a block of 21 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 9 shared lines) · ×1
Near-duplicate member family (3 members, 9 shared lines) server/application/admin/logic/GoodsLogic.php:60— server/application/admin/logic/GoodsLogic.php:60-168 | server/application/admin/logic/GoodsLogic.php:177-231 | server/application/admin/logic/SmsLogic.php:39-75 — These 3 members are variants of one another: a block of 9 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
Near-duplicate member pair (69 shared lines) server/application/common/logic/QrCodeLogic.php:82— server/application/common/logic/QrCodeLogic.php:82-190 | server/application/common/logic/QrCodeLogic.php:447-556 — These two members are variants of one another: 69 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (45 shared lines) server/thinkphp/library/think/db/Connection.php:1340— server/thinkphp/library/think/db/Connection.php:1340-1426 | server/thinkphp/library/think/db/connector/Sqlsrv.php:141-222 — These two members are variants of one another: 45 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (43 shared lines) server/application/api/logic/CouponLogic.php:282— server/application/api/logic/CouponLogic.php:282-493 | server/application/api/validate/Order.php:83-209 — These two members are variants of one another: 43 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) server/application/admin/logic/WechatCorporatePaymentLogic.php:54— server/application/admin/logic/WechatCorporatePaymentLogic.php:54-177 | server/application/admin/logic/WechatCorporatePaymentLogic.php:185-285 | server/application/admin/logic/WithdrawLogic.php:182-208 | server/application/admin/logic/WithdrawLogic.php:216-235 | server/application/admin/logic/WithdrawLogic.php:261-314 | server/application/admin/logic/WithdrawLogic.php:322-354 | server/application/common/command/WechatMerchantTransfer.php:46-93 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Edited copy of a member (79 corresponding lines) · ×1
Edited copy of a member (79 corresponding lines) server/application/admin/controller/Goods.php:89— server/application/admin/controller/Goods.php:89-167 | server/application/admin/controller/Goods.php:180-266 — These two members are one piece of code written twice and then edited apart: 79 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 (61 corresponding lines) · ×1
Edited copy of a member (61 corresponding lines) server/thinkphp/library/think/debug/Console.php:44— server/thinkphp/library/think/debug/Console.php:44-114 | server/thinkphp/library/think/debug/Html.php:43-103 — These two members are one piece of code written twice and then edited apart: 61 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 (57 corresponding lines) · ×1
Edited copy of a member (57 corresponding lines) server/thinkphp/library/think/db/Connection.php:644— server/thinkphp/library/think/db/Connection.php:644-700 | server/thinkphp/library/think/db/Connection.php:717-777 — These two members are one piece of code written twice and then edited apart: 57 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, 42+ corresponding lines) · ×1
Edited copies of one member (4 members, 42+ corresponding lines) REDACTED:117— REDACTED:117-163 | REDACTED:201-251 | REDACTED:271-321 | REDACTED:484-525 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 42 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) server/application/api/logic/ArticleLogic.php:77— server/application/api/logic/ArticleLogic.php:77-108 | server/application/api/logic/HelpLogic.php:77-110 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (49 corresponding lines) · ×1
Edited copy of a member (49 corresponding lines) server/application/common/server/FileServer.php:41— server/application/common/server/FileServer.php:41-89 | server/application/common/server/FileServer.php:358-408 — These two members are one piece of code written twice and then edited apart: 49 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 (47 corresponding lines) · ×1
Edited copy of a member (47 corresponding lines) server/application/common/server/FileServer.php:101— server/application/common/server/FileServer.php:101-153 | server/application/common/server/FileServer.php:164-210 — These two members are one piece of code written twice and then edited apart: 47 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 (43 corresponding lines) · ×1
Edited copy of a member (43 corresponding lines) server/thinkphp/library/think/db/Query.php:2573— server/thinkphp/library/think/db/Query.php:2573-2615 | server/thinkphp/library/think/db/Query.php:2627-2671 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 29+ corresponding lines) · ×1
Edited copies of one member (3 members, 29+ corresponding lines) server/thinkphp/library/think/model/concern/RelationShip.php:207— server/thinkphp/library/think/model/concern/RelationShip.php:207-240 | server/thinkphp/library/think/model/concern/RelationShip.php:254-282 | server/thinkphp/library/think/model/concern/RelationShip.php:296-324 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 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 (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) server/thinkphp/library/think/cache/driver/Memcache.php:36— server/thinkphp/library/think/cache/driver/Memcache.php:36-60 | server/thinkphp/library/think/session/driver/Memcache.php:43-65 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) server/application/admin/logic/CouponLogic.php:66— server/application/admin/logic/CouponLogic.php:66-115 | server/application/admin/logic/CouponLogic.php:120-171 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 35+ corresponding lines) · ×1
Edited copies of one member (3 members, 35+ corresponding lines) server/thinkphp/library/think/model/relation/BelongsTo.php:199— server/thinkphp/library/think/model/relation/BelongsTo.php:199-239 | server/thinkphp/library/think/model/relation/HasOne.php:198-238 | server/thinkphp/library/think/model/relation/MorphOne.php:109-143 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 35 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 (31 corresponding lines) · ×1
Edited copy of a member (31 corresponding lines) REDACTED:719— REDACTED:719-749 | REDACTED:761-794 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) server/application/admin/logic/LiveRoomLogic.php:57— server/application/admin/logic/LiveRoomLogic.php:57-85 | server/application/api/logic/LiveRoomLogic.php:44-77 — 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 (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) server/thinkphp/library/think/Loader.php:230— server/thinkphp/library/think/Loader.php:230-263 | server/thinkphp/library/think/Loader.php:269-303 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 30+ corresponding lines) · ×1
Edited copies of one member (3 members, 30+ corresponding lines) server/thinkphp/library/think/model/relation/BelongsToMany.php:301— server/thinkphp/library/think/model/relation/BelongsToMany.php:301-330 | server/thinkphp/library/think/model/relation/HasMany.php:81-113 | server/thinkphp/library/think/model/relation/MorphMany.php:110-146 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 16+ corresponding lines) · ×1
Edited copies of one member (5 members, 16+ corresponding lines) server/application/admin/controller/SelffetchShop.php:52— server/application/admin/controller/SelffetchShop.php:52-68 | server/application/admin/controller/SelffetchShop.php:80-97 | server/application/admin/controller/SelffetchVerifier.php:54-69 | server/application/admin/controller/SelffetchVerifier.php:97-114 | server/application/admin/controller/Verification.php:72-88 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 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) server/thinkphp/library/think/Session.php:237— server/thinkphp/library/think/Session.php:237-257 | server/thinkphp/library/think/Session.php:438-459 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 15+ corresponding lines) · ×1
Edited copies of one member (5 members, 15+ corresponding lines) server/application/admin/controller/Bargain.php:52— server/application/admin/controller/Bargain.php:52-66 | server/application/admin/controller/Bargain.php:75-92 | server/application/admin/controller/LuckDraw.php:60-74 | server/application/admin/controller/TeamActivity.php:56-70 | server/application/admin/controller/TeamActivity.php:80-96 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 15 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 copies of one member (3 members, 21+ corresponding lines) · ×1
Edited copies of one member (3 members, 21+ corresponding lines) server/application/api/logic/CollectLogic.php:25— server/application/api/logic/CollectLogic.php:25-45 | server/application/api/logic/GoodsLogic.php:220-241 | server/application/api/logic/GoodsLogic.php:246-267 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) server/application/admin/controller/AdminBase.php:129— server/application/admin/controller/AdminBase.php:129-147 | server/application/api/controller/ApiBase.php:83-110 | server/application/api/controller/ApiBase.php:124-150 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) server/application/api/controller/Account.php:66— server/application/api/controller/Account.php:66-75 | REDACTED:47-57 | REDACTED:77-88 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 8+ corresponding lines) · ×1
Edited copies of one member (5 members, 8+ corresponding lines) server/application/admin/controller/Bargain.php:136— server/application/admin/controller/Bargain.php:136-144 | server/application/admin/controller/NoticeSetting.php:80-87 | server/application/admin/controller/TeamActivity.php:140-149 | server/application/admin/controller/TeamFound.php:60-69 | server/application/admin/controller/TeamFound.php:79-87 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 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 copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) server/application/api/controller/Bargain.php:80— server/application/api/controller/Bargain.php:80-86 | server/application/api/controller/Bargain.php:105-111 | server/application/api/controller/Coupon.php:50-59 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) server/thinkphp/library/think/Validate.php:858— server/thinkphp/library/think/Validate.php:858-869 | server/thinkphp/library/think/Validate.php:881-892 | server/thinkphp/library/think/Validate.php:904-915 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 8+ corresponding lines) · ×1
Edited copies of one member (4 members, 8+ corresponding lines) server/application/admin/controller/MenuDecorate.php:146— server/application/admin/controller/MenuDecorate.php:146-154 | server/application/admin/controller/Role.php:96-104 | server/application/admin/controller/UserLevel.php:90-97 | server/application/admin/controller/UserPrivilege.php:80-87 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 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 (4 members, 4+ corresponding lines) · ×1
Edited copies of one member (4 members, 4+ corresponding lines) server/application/api/controller/Notice.php:36— server/application/api/controller/Notice.php:36-39 | REDACTED:123-126 | REDACTED:145-149 | server/application/api/controller/Withdraw.php:50-54 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 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 (6 members, 7+ corresponding lines) · ×1
Edited copies of one member (6 members, 7+ corresponding lines) server/application/admin/controller/Ad.php:33— server/application/admin/controller/Ad.php:33-39 | server/application/admin/controller/Article.php:35-41 | server/application/admin/controller/CommentHelper.php:46-52 | server/application/admin/controller/Freight.php:59-65 | server/application/admin/controller/Help.php:35-41 | server/application/admin/controller/User.php:36-43 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 7 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 (5 members, 3+ corresponding lines) · ×1
Edited copies of one member (5 members, 3+ corresponding lines) server/application/admin/logic/ActivityAreaLogic.php:147— server/application/admin/logic/ActivityAreaLogic.php:147-149 | server/application/admin/logic/ExpressLogic.php:107-109 | server/application/admin/logic/GoodsBrandLogic.php:72-74 | server/application/admin/logic/MenuDecorateLogic.php:167-169 | server/application/admin/logic/UserPrivilegeLogic.php:63-65 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 3 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 copies of one member (3 members, 4+ corresponding lines) · ×1
Edited copies of one member (3 members, 4+ corresponding lines) server/application/admin/controller/Freight.php:110— server/application/admin/controller/Freight.php:110-113 | server/application/admin/controller/Sms.php:55-58 | server/application/admin/controller/Withdraw.php:102-105 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 3+ corresponding lines) · ×1
Edited copies of one member (4 members, 3+ corresponding lines) server/application/api/controller/ActivityArea.php:29— server/application/api/controller/ActivityArea.php:29-31 | server/application/api/controller/Article.php:33-35 | server/application/api/controller/Help.php:32-34 | server/application/api/controller/Seckill.php:71-76 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 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 (4 members, 5+ corresponding lines) · ×1
Edited copies of one member (4 members, 5+ corresponding lines) server/application/admin/logic/AdLogic.php:268— server/application/admin/logic/AdLogic.php:268-272 | server/application/admin/logic/AdPositionLogic.php:205-211 | server/application/admin/logic/AuthLogic.php:210-216 | server/application/api/logic/UserAddressLogic.php:224-231 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (2 corresponding lines) · ×1
Edited copy of a member (2 corresponding lines) server/application/admin/logic/SeckillLogic.php:121— server/application/admin/logic/SeckillLogic.php:121-122 | server/application/admin/logic/UserPrivilegeLogic.php:50-51 — These two members are one piece of code written twice and then edited apart: 2 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 (1 corresponding lines) · ×1
Edited copy of a member (1 corresponding lines) server/application/admin/logic/RechargeLogic.php:80— server/application/admin/logic/RechargeLogic.php:80-80 | server/application/admin/logic/WechatReplyLogic.php:82-82 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (43–45 lines × 2) server/thinkphp/library/think/debug/Console.php:57— server/thinkphp/library/think/debug/Console.php:57-101 | server/thinkphp/library/think/debug/Html.php:57-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (35 lines × 2) server/thinkphp/library/think/view/driver/Php.php:116— server/thinkphp/library/think/view/driver/Php.php:116-150 | server/thinkphp/library/think/view/driver/Think.php:118-152 — 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 `server/thinkphp/library/think/view/driver/Php.php:116` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/thinkphp/library/think/view/driver/Php.php:112` calls `empty`, `getModulePath` and `server/thinkphp/library/think/view/driver/Think.php:116` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (33–34 lines × 2) server/application/api/logic/ArticleLogic.php:30— server/application/api/logic/ArticleLogic.php:30-62 | server/application/api/logic/HelpLogic.php:30-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (31 lines × 2) server/application/admin/logic/Hfive.php:63— server/application/admin/logic/Hfive.php:63-93 | server/application/admin/logic/Pc.php:63-93 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (30 lines × 2) server/application/admin/controller/Goods.php:123— server/application/admin/controller/Goods.php:123-152 | server/application/admin/controller/Goods.php:207-236 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/controller/Goods.php:123` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (4–30 lines × 3) server/application/admin/logic/OrderLogic.php:140— server/application/admin/logic/OrderLogic.php:140-168 | server/application/admin/logic/VerificationLogic.php:128-157 | server/application/api/logic/OrderLogic.php:1374-1377 — 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 `server/application/admin/logic/OrderLogic.php:140` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/admin/logic/VerificationLogic.php:127` calls `join` and `server/application/admin/logic/OrderLogic.php:139` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (25–26 lines × 2) server/application/admin/logic/WechatCorporatePaymentLogic.php:152— server/application/admin/logic/WechatCorporatePaymentLogic.php:152-177 | server/application/admin/logic/WechatCorporatePaymentLogic.php:225-249 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/WechatCorporatePaymentLogic.php:152` 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 (24–25 lines × 3) server/thinkphp/library/think/model/concern/RelationShip.php:211— server/thinkphp/library/think/model/concern/RelationShip.php:211-235 | server/thinkphp/library/think/model/concern/RelationShip.php:256-279 | server/thinkphp/library/think/model/concern/RelationShip.php:298-321 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/thinkphp/library/think/model/concern/RelationShip.php:211` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 2) server/application/admin/logic/BargainLogic.php:173— server/application/admin/logic/BargainLogic.php:173-197 | server/application/admin/logic/BargainLogic.php:257-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/BargainLogic.php:173` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23–25 lines × 2) server/application/admin/logic/PrinterLogic.php:95— server/application/admin/logic/PrinterLogic.php:95-119 | server/application/admin/logic/PrinterLogic.php:151-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/PrinterLogic.php:95` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (23–24 lines × 2) server/thinkphp/library/think/db/Connection.php:646— server/thinkphp/library/think/db/Connection.php:646-669 | server/thinkphp/library/think/db/Connection.php:719-741 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/thinkphp/library/think/db/Connection.php:646` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23 lines × 3) server/thinkphp/library/think/model/relation/BelongsTo.php:199— server/thinkphp/library/think/model/relation/BelongsTo.php:199-221 | server/thinkphp/library/think/model/relation/HasManyThrough.php:153-175 | server/thinkphp/library/think/model/relation/HasOne.php:198-220 — before extracting anything, compare `server/thinkphp/library/think/model/relation/BelongsTo.php` and `server/thinkphp/library/think/model/relation/HasOne.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `server/thinkphp/library/think/model/relation/BelongsTo.php:199` 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 (22 lines × 3) server/application/common/logic/QrCodeLogic.php:127— server/application/common/logic/QrCodeLogic.php:127-148 | server/application/common/logic/QrCodeLogic.php:329-350 | server/application/common/logic/QrCodeLogic.php:486-507 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/common/logic/QrCodeLogic.php:125` calls `getFileUrl` and `server/application/common/logic/QrCodeLogic.php:327` 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 (21–22 lines × 2) server/thinkphp/library/think/db/Connection.php:828— server/thinkphp/library/think/db/Connection.php:828-849 | server/thinkphp/library/think/db/Connection.php:908-928 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/thinkphp/library/think/db/Connection.php:828` 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 (21 lines × 3) server/application/admin/controller/Log.php:45— server/application/admin/controller/Log.php:45-65 | server/application/admin/controller/RechargeLog.php:35-55 | server/application/admin/controller/Withdraw.php:44-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (20–21 lines × 2) server/thinkphp/library/think/db/Builder.php:1070— server/thinkphp/library/think/db/Builder.php:1070-1090 | server/thinkphp/library/think/db/builder/Mysql.php:69-88 — 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 `server/thinkphp/library/think/db/Builder.php:1070` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17–19 lines × 4) server/thinkphp/library/think/db/connector/Mysql.php:90— server/thinkphp/library/think/db/connector/Mysql.php:90-106 | server/thinkphp/library/think/db/connector/Pgsql.php:60-76 | server/thinkphp/library/think/db/connector/Sqlite.php:49-65 | server/thinkphp/library/think/db/connector/Sqlsrv.php:68-86 — before extracting anything, compare `server/thinkphp/library/think/db/connector/Pgsql.php` and `server/thinkphp/library/think/db/connector/Sqlsrv.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 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 `server/thinkphp/library/think/db/connector/Pgsql.php:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17–19 lines × 3) server/application/admin/logic/PrinterLogic.php:109— server/application/admin/logic/PrinterLogic.php:109-127 | server/application/admin/logic/PrinterLogic.php:163-181 | server/application/admin/logic/PrinterLogic.php:397-413 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/PrinterLogic.php:109` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18–19 lines × 2) server/application/admin/logic/CouponLogic.php:97— server/application/admin/logic/CouponLogic.php:97-115 | server/application/admin/logic/CouponLogic.php:154-171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/CouponLogic.php:97` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17–19 lines × 2) server/application/admin/logic/GoodsLogic.php:266— server/application/admin/logic/GoodsLogic.php:266-282 | server/application/admin/logic/GoodsLogic.php:454-472 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/GoodsLogic.php:266` 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–18 lines × 3) server/application/common/server/FileServer.php:101— server/application/common/server/FileServer.php:101-115 | server/application/common/server/FileServer.php:164-178 | server/application/common/server/FileServer.php:358-375 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/common/server/FileServer.php:101` 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–17 lines × 2) server/application/admin/controller/AdminBase.php:131— server/application/admin/controller/AdminBase.php:131-147 | server/thinkphp/library/traits/controller/Jump.php:85-99 — 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 (33 lines × 2) server/application/admin/logic/BargainLogic.php:405— server/application/admin/logic/BargainLogic.php:405-437 | server/application/admin/logic/TeamFoundLogic.php:70-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. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/BargainLogic.php:405` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `User` names `app\admin\model\User` in one and `app\common\model\User` 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.
Duplicated block (15–16 lines × 2) server/application/admin/controller/AdminBase.php:98— server/application/admin/controller/AdminBase.php:98-113 | server/thinkphp/library/traits/controller/Jump.php:47-61 — 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 (14–15 lines × 2) server/application/api/validate/Order.php:167— server/application/api/validate/Order.php:167-180 | server/application/api/validate/Order.php:191-205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/api/validate/Order.php:167` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 5) server/application/admin/logic/WechatCorporatePaymentLogic.php:159— server/application/admin/logic/WechatCorporatePaymentLogic.php:159-172 | server/application/admin/logic/WechatCorporatePaymentLogic.php:232-245 | server/application/admin/logic/WithdrawLogic.php:191-204 | server/application/admin/logic/WithdrawLogic.php:222-235 | server/application/admin/logic/WithdrawLogic.php:337-350 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/admin/logic/WithdrawLogic.php:335` calls `name`, `where`, `find` and `server/application/admin/logic/WechatCorporatePaymentLogic.php:157` 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 × 3) server/application/admin/logic/OrderLogic.php:59— server/application/admin/logic/OrderLogic.php:59-72 | server/application/admin/logic/OrderLogic.php:184-197 | server/application/admin/logic/VerificationLogic.php:54-67 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/OrderLogic.php:59` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–14 lines × 2) server/application/admin/logic/DistributionApplyLogic.php:20— server/application/admin/logic/DistributionApplyLogic.php:20-30 | server/application/admin/logic/FaceSheetOrderLogic.php:63-76 — 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 `server/application/admin/logic/DistributionApplyLogic.php:20` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13–14 lines × 2) server/application/admin/logic/OrderLogic.php:643— server/application/admin/logic/OrderLogic.php:643-655 | server/application/admin/logic/PrinterLogic.php:316-329 — 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 `server/application/admin/logic/OrderLogic.php:643` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10–14 lines × 2) server/application/admin/logic/WechatCorporatePaymentLogic.php:77— server/application/admin/logic/WechatCorporatePaymentLogic.php:77-86 | server/application/admin/logic/WechatMerchantTransferLogic.php:74-87 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/admin/logic/WechatCorporatePaymentLogic.php:76` calls `where` and `server/application/admin/logic/WechatMerchantTransferLogic.php:73` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11–13 lines × 5) server/application/admin/logic/OrderLogic.php:643— server/application/admin/logic/OrderLogic.php:643-653 | server/application/admin/logic/PrinterLogic.php:113-124 | server/application/admin/logic/PrinterLogic.php:166-178 | server/application/admin/logic/PrinterLogic.php:316-327 | server/application/admin/logic/PrinterLogic.php:400-410 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/OrderLogic.php:643` 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, `server/application/admin/logic/PrinterLogic.php:125` calls `rollback` and `server/application/admin/logic/OrderLogic.php:654` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 4) server/thinkphp/library/think/db/builder/Mysql.php:140— server/thinkphp/library/think/db/builder/Mysql.php:140-152 | server/thinkphp/library/think/db/builder/Pgsql.php:72-84 | server/thinkphp/library/think/db/builder/Sqlite.php:76-88 | server/thinkphp/library/think/db/builder/Sqlsrv.php:99-111 — before extracting anything, compare `server/thinkphp/library/think/db/builder/Pgsql.php` and `server/thinkphp/library/think/db/builder/Sqlite.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 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 `server/thinkphp/library/think/db/builder/Mysql.php:140` 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 (13 lines × 3) server/thinkphp/library/think/model/relation/BelongsTo.php:167— server/thinkphp/library/think/model/relation/BelongsTo.php:167-179 | server/thinkphp/library/think/model/relation/HasMany.php:321-333 | server/thinkphp/library/think/model/relation/HasOne.php:166-178 — before extracting anything, compare `server/thinkphp/library/think/model/relation/BelongsTo.php` and `server/thinkphp/library/think/model/relation/HasOne.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9–13 lines × 2) server/application/admin/logic/BargainLogic.php:57— server/application/admin/logic/BargainLogic.php:57-69 | server/application/admin/logic/TeamActivityLogic.php:62-70 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11–12 lines × 3) server/thinkphp/library/think/model/relation/BelongsTo.php:218— server/thinkphp/library/think/model/relation/BelongsTo.php:218-229 | server/thinkphp/library/think/model/relation/HasOne.php:217-228 | server/thinkphp/library/think/model/relation/MorphOne.php:129-139 — before extracting anything, compare `server/thinkphp/library/think/model/relation/BelongsTo.php` and `server/thinkphp/library/think/model/relation/HasOne.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `server/thinkphp/library/think/model/relation/BelongsTo.php:218` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `server/thinkphp/library/think/model/relation/BelongsTo.php:231` calls `empty`, `bindAttr` and `server/thinkphp/library/think/model/relation/MorphOne.php:141` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 4) server/application/admin/logic/AfterSaleLogic.php:59— server/application/admin/logic/AfterSaleLogic.php:59-69 | server/application/admin/logic/OrderLogic.php:65-75 | server/application/admin/logic/OrderLogic.php:190-200 | server/application/admin/logic/VerificationLogic.php:60-70 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/AfterSaleLogic.php:59` 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 lines × 3) server/application/admin/logic/BargainLogic.php:63— server/application/admin/logic/BargainLogic.php:63-73 | server/application/admin/logic/BargainLogic.php:400-410 | server/application/admin/logic/TeamActivityLogic.php:64-74 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/BargainLogic.php:63` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 3) server/application/admin/logic/GoodsLogic.php:635— server/application/admin/logic/GoodsLogic.php:635-644 | server/application/admin/logic/GoodsLogic.php:681-691 | server/application/admin/logic/GoodsLogic.php:720-730 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 4) server/application/admin/logic/OrderLogic.php:109— server/application/admin/logic/OrderLogic.php:109-118 | server/application/admin/logic/OrderLogic.php:234-243 | server/application/admin/logic/UserLogic.php:68-77 | server/application/admin/logic/UserLogic.php:157-166 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/OrderLogic.php:109` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–10 lines × 3) server/application/admin/logic/DistributionMemberLogic.php:30— server/application/admin/logic/DistributionMemberLogic.php:30-37 | server/application/admin/logic/OrderLogic.php:89-98 | server/application/admin/logic/OrderLogic.php:214-223 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/DistributionMemberLogic.php:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 3) server/application/admin/logic/StatisticsLogic.php:130— server/application/admin/logic/StatisticsLogic.php:130-138 | server/application/admin/logic/StatisticsLogic.php:246-254 | server/application/admin/logic/StatisticsLogic.php:311-320 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/StatisticsLogic.php:130` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5–9 lines × 3) server/application/admin/logic/CommonLogic.php:75— server/application/admin/logic/CommonLogic.php:75-83 | server/application/admin/logic/HelpLogic.php:41-45 | server/application/admin/logic/WechatReplyLogic.php:29-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 3 call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5–8 lines × 4) server/application/admin/logic/ActivityAreaLogic.php:54— server/application/admin/logic/ActivityAreaLogic.php:54-58 | server/application/admin/logic/CommonLogic.php:73-79 | server/application/admin/logic/HelpLogic.php:38-43 | server/application/admin/logic/SeckillLogic.php:30-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/CommonLogic.php:73` 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 (8 lines × 4) server/application/admin/logic/BargainLogic.php:187— server/application/admin/logic/BargainLogic.php:187-194 | server/application/admin/logic/BargainLogic.php:271-278 | server/application/admin/logic/TeamActivityLogic.php:172-179 | server/application/admin/logic/TeamActivityLogic.php:274-281 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `server/application/admin/logic/BargainLogic.php:197` calls `Bargain` and `server/application/admin/logic/TeamActivityLogic.php:182` 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 × 4) server/application/admin/logic/StatisticsLogic.php:74— server/application/admin/logic/StatisticsLogic.php:74-80 | server/application/admin/logic/StatisticsLogic.php:129-136 | server/application/admin/logic/StatisticsLogic.php:245-252 | server/application/admin/logic/StatisticsLogic.php:310-317 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/StatisticsLogic.php:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (3–6 lines × 3) server/application/admin/logic/TeamActivityLogic.php:456— server/application/admin/logic/TeamActivityLogic.php:456-461 | server/application/admin/logic/TeamFoundLogic.php:123-128 | server/application/admin/logic/TeamFoundLogic.php:145-147 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/admin/logic/TeamActivityLogic.php:456` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/admin/logic/TeamFoundLogic.php:121` calls `getFileUrl` and `server/application/admin/logic/TeamActivityLogic.php:454` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 8) server/application/admin/logic/ActivityAreaLogic.php:54— server/application/admin/logic/ActivityAreaLogic.php:54-58 | server/application/admin/logic/ArticleLogic.php:40-45 | server/application/admin/logic/CommonLogic.php:73-77 | server/application/admin/logic/GoodsLogic.php:104-108 | server/application/admin/logic/GoodsLogic.php:201-205 | server/application/admin/logic/HelpLogic.php:38-43 | server/application/admin/logic/SeckillLogic.php:30-35 | server/application/admin/logic/SmsLogic.php:44-48 — before extracting anything, compare `server/application/admin/logic/ArticleLogic.php` and `server/application/admin/logic/HelpLogic.php` as WHOLE FILES: this scan already matched 6 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. 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 `server/application/admin/logic/ArticleLogic.php:40` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/admin/logic/SmsLogic.php:43` calls `isset` and `server/application/admin/logic/ActivityAreaLogic.php:54` 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 × 6) server/application/admin/logic/DistributionMemberLogic.php:30— server/application/admin/logic/DistributionMemberLogic.php:30-35 | server/application/admin/logic/SelffetchShopLogic.php:40-44 | server/application/admin/logic/SelffetchShopLogic.php:191-195 | server/application/admin/logic/SelffetchVerifierLogic.php:45-49 | server/application/admin/logic/SelffetchVerifierLogic.php:221-225 | server/application/admin/logic/VerificationLogic.php:49-55 — there are 6 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/admin/logic/SelffetchVerifierLogic.php:44` calls `isset`, `empty` and `server/application/admin/logic/DistributionMemberLogic.php:30` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (4–5 lines × 3) server/application/admin/logic/GoodsCommentLogic.php:107— server/application/admin/logic/GoodsCommentLogic.php:107-110 | server/application/api/logic/GoodsCommentLogic.php:79-83 | server/application/api/model/Goods.php:126-130 — 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 `server/application/admin/logic/GoodsCommentLogic.php:107` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 8) server/application/admin/controller/Admin.php:105— server/application/admin/controller/Admin.php:105-111 | server/application/admin/controller/AssuranceService.php:99-105 | server/application/admin/controller/Express.php:105-111 | server/application/admin/controller/Goods.php:275-282 | server/application/admin/controller/GoodsBrand.php:89-95 | server/application/admin/controller/GoodsComment.php:40-46 | server/application/admin/controller/Recharge.php:97-103 | server/application/admin/controller/Supplier.php:74-80 — 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 8 call sites, so a change lands once.
Duplicated block (8 lines × 6) server/application/admin/controller/Article.php:95— server/application/admin/controller/Article.php:95-102 | server/application/admin/controller/ArticleCategory.php:79-86 | server/application/admin/controller/Help.php:89-96 | server/application/admin/controller/HelpCategory.php:83-90 | server/application/admin/controller/MenuDecorate.php:133-140 | server/application/admin/controller/UserGroup.php:91-98 — 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 6 call sites, so a change lands once.
Duplicated block (5 lines × 9) server/application/admin/controller/ArticleCategory.php:29— server/application/admin/controller/ArticleCategory.php:29-33 | server/application/admin/controller/GoodsComment.php:28-32 | server/application/admin/controller/HelpCategory.php:32-36 | server/application/admin/controller/SelffetchShop.php:36-41 | server/application/admin/controller/SelffetchVerifier.php:35-40 | server/application/admin/controller/SelffetchVerifier.php:80-85 | server/application/admin/controller/SignDaily.php:58-64 | server/application/admin/controller/Supplier.php:27-31 | server/application/admin/controller/UserGroup.php:35-39 — there are 9 copies across 8 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 9 sites; resolving a subset leaves the remainder to drift apart. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 10) server/application/admin/controller/AssuranceService.php:37— server/application/admin/controller/AssuranceService.php:37-43 | server/application/admin/controller/Coupon.php:27-32 | server/application/admin/controller/FaceSheet.php:71-77 | server/application/admin/controller/FaceSheetOrder.php:37-43 | server/application/admin/controller/FaceSheetSender.php:34-40 | server/application/admin/controller/GoodsBrand.php:30-36 | server/application/admin/controller/MnpMessage.php:32-37 | server/application/admin/controller/OaMessage.php:33-38 | server/application/admin/controller/Printer.php:28-33 | server/application/admin/controller/UserPrivilege.php:27-32 — before extracting anything, compare `server/application/admin/controller/MnpMessage.php` and `server/application/admin/controller/OaMessage.php` as WHOLE FILES: 87% 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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 6) server/thinkphp/library/think/Hook.php:66— server/thinkphp/library/think/Hook.php:66-72 | server/thinkphp/library/think/Response.php:241-247 | server/thinkphp/library/think/Validate.php:276-282 | server/thinkphp/library/think/View.php:97-103 | server/thinkphp/library/think/route/Rule.php:240-246 | server/thinkphp/library/think/route/Rule.php:258-264 — there are 6 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
End-of-life runtime: .NET netcoreapp2.1 server/vendor/alipaysdk/easysdk/csharp/UnitTest/UnitTest.csproj:4— server/vendor/alipaysdk/easysdk/csharp/UnitTest/UnitTest.csproj declares .NET netcoreapp2.1 as this project's target framework, and .NET Core 2.1, support ended 2021-08-21. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2021-08-21 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
Duplication concentrated across 4 sibling directories (15 clone groups) uniapp/components/order-list/order-list.vue:242— 15 duplicated blocks under uniapp/ have copies in at least two of the sibling directories bundle, components, pages, utils — 11 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 15 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 15 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 15 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 25 sibling directories (14 clone groups) uniapp/components/uview-ui/components/u-checkbox/u-checkbox.vue:51— 14 duplicated blocks under uniapp/components/uview-ui/components/ have copies in at least two of the sibling directories u-calendar, u-car-keyboard, u-checkbox, u-col, u-collapse-item, u-column-notice (+19 more sibling(s) not listed) — 8 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 14 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 14 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 14 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 15 sibling directories (12 clone groups) uniapp/bundle/pages/user_profile/user_profile.vue:270— 12 duplicated blocks under uniapp/bundle/pages/ have copies in at least two of the sibling directories forget_pay_pwd, goods_reviews, message_center, prize_record, sign_rule, transfer_record (+9 more sibling(s) not listed) — 6 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 12 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 12 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 12 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 3 sibling directories (8 clone groups) pc/components/public/numberBox.vue:57— 8 duplicated blocks under the repository root have copies in at least two of the sibling directories pc, server, uniapp — 7 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 8 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 4 sibling directories (6 clone groups) pc/pages/account/forget_pwd.vue:104— 6 duplicated blocks under pc/pages/ have copies in at least two of the sibling directories account, help_center, news_list, user — 5 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Wholesale file copy (234 identical lines × 2 files) uniapp/bundle/pages/user_profile/user_profile.vue:270— uniapp/bundle/pages/user_profile/user_profile.vue:270 · uniapp/bundle/pages/user_set/user_set.vue:197 — these 2 files are line-for-line copies of one another — 234 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (173 matched lines × 2 locations) · ×1
Duplicated block with local edits (173 matched lines × 2 locations) pc/components/public/numberBox.vue:57— pc/components/public/numberBox.vue:57 · uniapp/components/uview-ui/components/u-number-box/u-number-box.vue:70 — the two spans are one implementation copied and then locally edited — 934 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (99 matched lines × 2 locations) · ×1
Duplicated block with local edits (99 matched lines × 2 locations) uniapp/components/order-list/order-list.vue:242— uniapp/components/order-list/order-list.vue:242 · uniapp/pages/order_details/order_details.vue:431 — the two spans are one implementation copied and then locally edited — 451 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (97 matched lines × 2 locations) · ×1
Duplicated block with local edits (97 matched lines × 2 locations) uniapp/components/uview-ui/components/u-checkbox/u-checkbox.vue:51— uniapp/components/uview-ui/components/u-checkbox/u-checkbox.vue:51 · uniapp/components/uview-ui/components/u-radio/u-radio.vue:45 — the two spans are one implementation copied and then locally edited — 582 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (76 matched lines × 2 locations) · ×1
Duplicated block with local edits (76 matched lines × 2 locations) uniapp/components/uview-ui/components/u-column-notice/u-column-notice.vue:35— uniapp/components/uview-ui/components/u-column-notice/u-column-notice.vue:35 · uniapp/components/uview-ui/components/u-row-notice/u-row-notice.vue:38 — the two spans are one implementation copied and then locally edited — 291 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (66 matched lines × 2 locations) · ×1
Duplicated block with local edits (66 matched lines × 2 locations) uniapp/components/cate-list/cate-list.vue:115— uniapp/components/cate-list/cate-list.vue:115 · uniapp/pages/goods_search/goods_search.vue:134 — the two spans are one implementation copied and then locally edited — 317 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (60 lines × 2 locations) uniapp/pages/forget_pwd/forget_pwd.vue:173— uniapp/pages/forget_pwd/forget_pwd.vue:173 · uniapp/pages/register/register.vue:266 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (49 matched lines × 2 locations) · ×1
Duplicated block with local edits (49 matched lines × 2 locations) pc/pages/category.vue:229— pc/pages/category.vue:229 · pc/pages/goods_list/_type.vue:109 — the two spans are one implementation copied and then locally edited — 212 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (47 matched lines × 2 locations) · ×1
Duplicated block with local edits (47 matched lines × 2 locations) pc/pages/account/forget_pwd.vue:68— pc/pages/account/forget_pwd.vue:68 · pc/pages/account/register.vue:137 — the two spans are one implementation copied and then locally edited — 214 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (46 matched lines × 2 locations) · ×1
Duplicated block with local edits (46 matched lines × 2 locations) pc/pages/account/login.vue:141— pc/pages/account/login.vue:141 · pc/pages/account/register.vue:136 — the two spans are one implementation copied and then locally edited — 192 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (42 lines × 2 locations) pc/pages/user/evaluation/index.vue:85— pc/pages/user/evaluation/index.vue:85 · pc/pages/user/order/index.vue:105 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (41 matched lines × 2 locations) · ×1
Duplicated block with local edits (41 matched lines × 2 locations) pc/utils/consumeToken.js:4— pc/utils/consumeToken.js:4 · uniapp/utils/consumeToken.js:5 — the two spans are one implementation copied and then locally edited — 227 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (38 matched lines × 2 locations) · ×1
Duplicated block with local edits (38 matched lines × 2 locations) pc/plugins/axios.js:23— pc/plugins/axios.js:23 · uniapp/utils/request.js:46 — the two spans are one implementation copied and then locally edited — 284 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (33 lines × 2 locations) uniapp/bundle/pages/apply_refund/apply_refund.vue:214— uniapp/bundle/pages/apply_refund/apply_refund.vue:214 · uniapp/bundle/pages/apply_refund/apply_refund.vue:255 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication· Duplicated block with local edits (32 matched lines × 2 locations) · ×1
Duplicated block with local edits (32 matched lines × 2 locations) uniapp/components/goods-like/goods-like.vue:65— uniapp/components/goods-like/goods-like.vue:65 · uniapp/components/home-coupon/home-coupon.vue:61 — the two spans are one implementation copied and then locally edited — 141 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (30 lines × 2 locations) REDACTED:1134— REDACTED:1134 · REDACTED:1935 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (29 lines × 2 locations) REDACTED:2520— REDACTED:2520 · REDACTED:2553 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (28 lines × 2 locations) pc/components/orderList.vue:127— pc/components/orderList.vue:127 · pc/pages/user/order/detail.vue:325 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (27 lines × 3 locations) uniapp/bundle/pages/forget_pay_pwd/forget_pay_pwd.vue:101— uniapp/bundle/pages/forget_pay_pwd/forget_pay_pwd.vue:101 · uniapp/bundle/pages/user_profile/user_profile.vue:548 · uniapp/bundle/pages/user_set/user_set.vue:453 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (26 matched lines × 2 locations) · ×1
Duplicated block with local edits (26 matched lines × 2 locations) uniapp/bundle/pages/bargain/bargain.vue:66— uniapp/bundle/pages/bargain/bargain.vue:66 · uniapp/components/goods-bargain/goods-bargain.vue:15 — the two spans are one implementation copied and then locally edited — 111 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (24 lines × 4 locations) REDACTED:772— REDACTED:772 · REDACTED:980 · REDACTED:1169 · REDACTED:1797 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (23 lines × 3 locations) pc/components/orderList.vue:180— pc/components/orderList.vue:180 · pc/pages/payment.vue:197 · pc/pages/user/order/detail.vue:379 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
Duplicated block (23 lines × 2 locations) REDACTED:912— REDACTED:912 · REDACTED:1253 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Boundary violation [package:third-party-deep-import] pc/plugins/element-ui.js:3— pc/plugins/element-ui.js:3 imports element-ui/lib/locale/lang/en, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Complex function setting (cyclomatic 179, cognitive 146) REDACTED:420— setting has cyclomatic complexity 179 and cognitive complexity 146; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function reloadSetting (cyclomatic 111, cognitive 139) REDACTED:562— reloadSetting has cyclomatic complexity 111 and cognitive complexity 139; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function setNode (cyclomatic 102, cognitive 198) uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:120— setNode has cyclomatic complexity 102 and cognitive complexity 198; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function js_beautify (cyclomatic 90, cognitive 167) REDACTED:3367— js_beautify has cyclomatic complexity 90 and cognitive complexity 167; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function popNode (cyclomatic 57, cognitive 152) uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:355— popNode has cyclomatic complexity 57 and cognitive complexity 152; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function get_next_token (cyclomatic 55, cognitive 88) REDACTED:3451— get_next_token has cyclomatic complexity 55 and cognitive complexity 88; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getLostPoint (cyclomatic 54, cognitive 106) uniapp/components/tki-qrcode/qrcode.js:508— getLostPoint has cyclomatic complexity 54 and cognitive complexity 106; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function useDefaultOrUserDefineToolbarStyle (cyclomatic 53, cognitive 157) REDACTED:1103— useDefaultOrUserDefineToolbarStyle has cyclomatic complexity 53 and cognitive complexity 157; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function setContent (cyclomatic 48, cognitive 61) uniapp/components/uview-ui/components/u-parse/u-parse.vue:210— setContent has cyclomatic complexity 48 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function loadToolBar (cyclomatic 43, cognitive 71) REDACTED:3720— loadToolBar has cyclomatic complexity 43 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 31, cognitive 49) server/public/static/plug/formSelects/formSelects-v4.js:873— (anonymous) has cyclomatic complexity 31 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function handlerLabel (cyclomatic 29, cognitive 27) server/public/static/plug/formSelects/formSelects-v4.js:1161— handlerLabel has cyclomatic complexity 29 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function get_tag (cyclomatic 28, cognitive 46) REDACTED:3129— get_tag has cyclomatic complexity 28 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function renderBodyTd (cyclomatic 28, cognitive 35) server/public/static/plug/treetable-lay/treeTable.js:613— renderBodyTd has cyclomatic complexity 28 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function useDefaultOrUserDefineMenubarStyle (cyclomatic 26, cognitive 66) REDACTED:1018— useDefaultOrUserDefineMenubarStyle has cyclomatic complexity 26 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getResult (cyclomatic 23, cognitive 32) uniapp/components/uview-ui/components/u-picker/u-picker.vue:563— getResult has cyclomatic complexity 23 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function fnode (cyclomatic 20, cognitive 29) REDACTED:2020— fnode has cyclomatic complexity 20 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function node (cyclomatic 20, cognitive 29) REDACTED:2059— node has cyclomatic complexity 20 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _message (cyclomatic 20, cognitive 24) uniapp/components/uview-ui/components/u-parse/u-parse.vue:550— _message has cyclomatic complexity 20 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function judgePermission (cyclomatic 19, cognitive 36) uniapp/utils/permission.js:221— judgePermission has cyclomatic complexity 19 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function fnode (cyclomatic 19, cognitive 28) REDACTED:1887— fnode has cyclomatic complexity 19 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function node (cyclomatic 19, cognitive 28) REDACTED:1929— node has cyclomatic complexity 19 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function extMethod (cyclomatic 19, cognitive 21) REDACTED:3327— extMethod has cyclomatic complexity 19 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function setupPositionProbePattern (cyclomatic 19, cognitive 19) uniapp/components/tki-qrcode/qrcode.js:104— setupPositionProbePattern has cyclomatic complexity 19 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function search (cyclomatic 18, cognitive 22) server/public/static/plug/formSelects/formSelects-v4.js:330— search has cyclomatic complexity 18 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getText (cyclomatic 18, cognitive 20) uniapp/components/uview-ui/components/u-parse/u-parse.vue:461— getText has cyclomatic complexity 18 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function config (cyclomatic 18, cognitive 18) server/public/static/plug/formSelects/formSelects-v4.js:1602— config has cyclomatic complexity 18 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 17, cognitive 32) REDACTED:297— (anonymous) has cyclomatic complexity 17 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 17, cognitive 22) uniapp/utils/request.js:87— (anonymous) has cyclomatic complexity 17 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 17, cognitive 19) server/public/static/plug/formSelects/formSelects-v4.js:241— (anonymous) has cyclomatic complexity 17 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function issue (cyclomatic 16, cognitive 16) pc/utils/consumeToken.js:40— issue has cyclomatic complexity 16 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 16, cognitive 15) uniapp/utils/request.js:40— (anonymous) has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getMenubarDom (cyclomatic 16, cognitive 12) REDACTED:3156— getMenubarDom has cyclomatic complexity 16 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getMenubarToolDom (cyclomatic 16, cognitive 12) REDACTED:3196— getMenubarToolDom has cyclomatic complexity 16 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function remove (cyclomatic 15, cognitive 26) uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:305— remove has cyclomatic complexity 15 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function init (cyclomatic 15, cognitive 24) server/public/static/plug/treetable-lay/treeTable.js:97— init has cyclomatic complexity 15 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function applyWithdrawFun (cyclomatic 15, cognitive 18) uniapp/bundle/pages/user_withdraw/user_withdraw.vue:309— applyWithdrawFun has cyclomatic complexity 15 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function style (cyclomatic 15, cognitive 16) uniapp/components/uview-ui/components/u-popup/u-popup.vue:208— style has cyclomatic complexity 15 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
REDACTED: 4522 lines of code REDACTED:1— REDACTED has 4522 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 3725 lines of code REDACTED:1— REDACTED has 3725 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· server/public/static/plug/formSelects/formSelects-v4.js · ×1
server/public/static/plug/formSelects/formSelects-v4.js: 1655 lines of code server/public/static/plug/formSelects/formSelects-v4.js:1— server/public/static/plug/formSelects/formSelects-v4.js has 1655 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· server/public/static/plug/treetable-lay/treeTable.js · ×1
server/public/static/plug/treetable-lay/treeTable.js: 1425 lines of code server/public/static/plug/treetable-lay/treeTable.js:1— server/public/static/plug/treetable-lay/treeTable.js has 1425 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/pages/goods_details/goods_details.vue · ×1
uniapp/pages/goods_details/goods_details.vue: 1179 lines of code uniapp/pages/goods_details/goods_details.vue:1— uniapp/pages/goods_details/goods_details.vue has 1179 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/tki-qrcode/qrcode.js · ×1
uniapp/components/tki-qrcode/qrcode.js: 1151 lines of code uniapp/components/tki-qrcode/qrcode.js:1— uniapp/components/tki-qrcode/qrcode.js has 1151 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/pages/login/login.vue · ×1
uniapp/pages/login/login.vue: 876 lines of code uniapp/pages/login/login.vue:1— uniapp/pages/login/login.vue has 876 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/pages/index/index.vue · ×1
uniapp/pages/index/index.vue: 855 lines of code uniapp/pages/index/index.vue:1— uniapp/pages/index/index.vue has 855 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/bundle/pages/bargain_process/bargain_process.vue · ×1
uniapp/bundle/pages/bargain_process/bargain_process.vue: 795 lines of code uniapp/bundle/pages/bargain_process/bargain_process.vue:1— uniapp/bundle/pages/bargain_process/bargain_process.vue has 795 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/pages/order_details/order_details.vue · ×1
uniapp/pages/order_details/order_details.vue: 780 lines of code uniapp/pages/order_details/order_details.vue:1— uniapp/pages/order_details/order_details.vue has 780 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/bundle/pages/user_profile/user_profile.vue · ×1
uniapp/bundle/pages/user_profile/user_profile.vue: 777 lines of code uniapp/bundle/pages/user_profile/user_profile.vue:1— uniapp/bundle/pages/user_profile/user_profile.vue has 777 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
pc/pages/confirm_order.vue: 763 lines of code pc/pages/confirm_order.vue:1— pc/pages/confirm_order.vue has 763 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/bundle/pages/user_spread/user_spread.vue · ×1
uniapp/bundle/pages/user_spread/user_spread.vue: 705 lines of code uniapp/bundle/pages/user_spread/user_spread.vue:1— uniapp/bundle/pages/user_spread/user_spread.vue has 705 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/pages/confirm_order/confirm_order.vue · ×1
uniapp/pages/confirm_order/confirm_order.vue: 668 lines of code uniapp/pages/confirm_order/confirm_order.vue:1— uniapp/pages/confirm_order/confirm_order.vue has 668 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/uview-ui/components/u-picker/u-picker.vue · ×1
uniapp/components/uview-ui/components/u-picker/u-picker.vue: 664 lines of code uniapp/components/uview-ui/components/u-picker/u-picker.vue:1— uniapp/components/uview-ui/components/u-picker/u-picker.vue has 664 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· pc/pages/goods_details/_id.vue · ×1
pc/pages/goods_details/_id.vue: 662 lines of code pc/pages/goods_details/_id.vue:1— pc/pages/goods_details/_id.vue has 662 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/bundle/pages/user_set/user_set.vue · ×1
uniapp/bundle/pages/user_set/user_set.vue: 648 lines of code uniapp/bundle/pages/user_set/user_set.vue:1— uniapp/bundle/pages/user_set/user_set.vue has 648 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/uview-ui/components/u-parse/u-parse.vue · ×1
uniapp/components/uview-ui/components/u-parse/u-parse.vue: 640 lines of code uniapp/components/uview-ui/components/u-parse/u-parse.vue:1— uniapp/components/uview-ui/components/u-parse/u-parse.vue has 640 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/uview-ui/components/u-upload/u-upload.vue · ×1
uniapp/components/uview-ui/components/u-upload/u-upload.vue: 640 lines of code uniapp/components/uview-ui/components/u-upload/u-upload.vue:1— uniapp/components/uview-ui/components/u-upload/u-upload.vue has 640 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/uview-ui/components/u-calendar/u-calendar.vue · ×1
uniapp/components/uview-ui/components/u-calendar/u-calendar.vue: 616 lines of code uniapp/components/uview-ui/components/u-calendar/u-calendar.vue:1— uniapp/components/uview-ui/components/u-calendar/u-calendar.vue has 616 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js · ×1
uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js: 579 lines of code uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js:1— uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js has 579 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/uview-ui/components/u-button/u-button.vue · ×1
uniapp/components/uview-ui/components/u-button/u-button.vue: 557 lines of code uniapp/components/uview-ui/components/u-button/u-button.vue:1— uniapp/components/uview-ui/components/u-button/u-button.vue has 557 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/js_sdk/xtshadow-axios/axios.js · ×1
uniapp/js_sdk/xtshadow-axios/axios.js: 549 lines of code uniapp/js_sdk/xtshadow-axios/axios.js:1— uniapp/js_sdk/xtshadow-axios/axios.js has 549 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/lime-painter/components/l-painter/l-painter.vue · ×1
uniapp/components/lime-painter/components/l-painter/l-painter.vue: 518 lines of code uniapp/components/lime-painter/components/l-painter/l-painter.vue:1— uniapp/components/lime-painter/components/l-painter/l-painter.vue has 518 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· pc/pages/user/order/detail.vue · ×1
pc/pages/user/order/detail.vue: 496 lines of code pc/pages/user/order/detail.vue:1— pc/pages/user/order/detail.vue has 496 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
pc/pages/user/profile.vue: 476 lines of code pc/pages/user/profile.vue:1— pc/pages/user/profile.vue has 476 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue · ×1
uniapp/components/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue: 469 lines of code uniapp/components/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue:1— uniapp/components/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue has 469 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/uview-ui/components/u-parse/libs/trees.vue · ×1
uniapp/components/uview-ui/components/u-parse/libs/trees.vue: 468 lines of code uniapp/components/uview-ui/components/u-parse/libs/trees.vue:1— uniapp/components/uview-ui/components/u-parse/libs/trees.vue has 468 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/spec-popup/spec-popup.vue · ×1
uniapp/components/spec-popup/spec-popup.vue: 462 lines of code uniapp/components/spec-popup/spec-popup.vue:1— uniapp/components/spec-popup/spec-popup.vue has 462 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/order-list/order-list.vue · ×1
uniapp/components/order-list/order-list.vue: 457 lines of code uniapp/components/order-list/order-list.vue:1— uniapp/components/order-list/order-list.vue has 457 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/pages/payment/payment.vue · ×1
uniapp/pages/payment/payment.vue: 448 lines of code uniapp/pages/payment/payment.vue:1— uniapp/pages/payment/payment.vue has 448 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/bundle/pages/user_withdraw/user_withdraw.vue · ×1
uniapp/bundle/pages/user_withdraw/user_withdraw.vue: 447 lines of code uniapp/bundle/pages/user_withdraw/user_withdraw.vue:1— uniapp/bundle/pages/user_withdraw/user_withdraw.vue has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/uview-ui/components/u-popup/u-popup.vue · ×1
uniapp/components/uview-ui/components/u-popup/u-popup.vue: 436 lines of code uniapp/components/uview-ui/components/u-popup/u-popup.vue:1— uniapp/components/uview-ui/components/u-popup/u-popup.vue has 436 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
uniapp/utils/tools.js: 428 lines of code uniapp/utils/tools.js:1— uniapp/utils/tools.js has 428 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
uniapp/pages/user/user.vue: 406 lines of code uniapp/pages/user/user.vue:1— uniapp/pages/user/user.vue has 406 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/uview-ui/components/u-form-item/u-form-item.vue · ×1
uniapp/components/uview-ui/components/u-form-item/u-form-item.vue: 405 lines of code uniapp/components/uview-ui/components/u-form-item/u-form-item.vue:1— uniapp/components/uview-ui/components/u-form-item/u-form-item.vue has 405 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/uview-ui/components/u-select/u-select.vue · ×1
uniapp/components/uview-ui/components/u-select/u-select.vue: 403 lines of code uniapp/components/uview-ui/components/u-select/u-select.vue:1— uniapp/components/uview-ui/components/u-select/u-select.vue has 403 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· uniapp/components/after-sales-list/after-sales-list.vue · ×1
uniapp/components/after-sales-list/after-sales-list.vue: 402 lines of code uniapp/components/after-sales-list/after-sales-list.vue:1— uniapp/components/after-sales-list/after-sales-list.vue has 402 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling· No test, lint or typecheck script · ×1
No test, lint or typecheck script — test ✗ · lint ✗ · typecheck ✗ — read from this repository's REDACTED scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
Dead file (~6901 LoC) uniapp/utils/area.js— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~1201 LoC) uniapp/components/tki-qrcode/qrcode.js— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (uniapp/components/tki-qrcode/tki-qrcode.vue) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~817 LoC) uniapp/pages/goods_details/goods_details.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~781 LoC) uniapp/pages/login/login.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~676 LoC) uniapp/bundle/pages/user_profile/user_profile.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~657 LoC) uniapp/pages/order_details/order_details.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~641 LoC) uniapp/js_sdk/xtshadow-axios/axios.js— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (uniapp/utils/request.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~623 LoC) uniapp/components/uview-ui/components/u-parse/u-parse.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~612 LoC) uniapp/pages/confirm_order/confirm_order.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~605 LoC) uniapp/pages/index/index.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~596 LoC) uniapp/components/uview-ui/components/u-picker/u-picker.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~584 LoC) uniapp/bundle/pages/bargain_process/bargain_process.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~580 LoC) uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (uniapp/components/uview-ui/components/u-parse/u-parse.vue) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~571 LoC) uniapp/bundle/pages/user_set/user_set.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~559 LoC) uniapp/components/uview-ui/components/u-upload/u-upload.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~512 LoC) uniapp/components/lime-painter/components/l-painter/l-painter.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~486 LoC) uniapp/components/uview-ui/components/u-calendar/u-calendar.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~441 LoC) uniapp/components/order-list/order-list.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~429 LoC) uniapp/bundle/pages/user_spread/user_spread.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~414 LoC) uniapp/components/lime-painter/components/l-painter/utils.js— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (uniapp/components/lime-painter/components/common/relation.js, uniapp/components/lime-painter/components/l-painter/l-painter.vue) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~405 LoC) uniapp/api/user.js— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (uniapp/components/coupon-list/coupon-list.vue, uniapp/components/my-coupons/my-coupons.vue, uniapp/pages/user_getcoupon/user_getcoupon.vue) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~389 LoC) uniapp/bundle/pages/user_withdraw/user_withdraw.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~385 LoC) uniapp/components/uview-ui/libs/function/md5.js— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~381 LoC) uniapp/components/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~358 LoC) uniapp/components/after-sales-list/after-sales-list.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~349 LoC) uniapp/components/uview-ui/components/u-select/u-select.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~348 LoC) uniapp/utils/permission.js— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~345 LoC) uniapp/components/uview-ui/components/u-form-item/u-form-item.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~336 LoC) uniapp/components/uview-ui/components/u-popup/u-popup.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~335 LoC) uniapp/components/uview-ui/components/u-input/u-input.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~330 LoC) uniapp/pages/shop_cart/shop_cart.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~322 LoC) uniapp/components/uview-ui/components/u-number-box/u-number-box.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~320 LoC) uniapp/bundle/pages/apply_refund/apply_refund.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~306 LoC) uniapp/components/uview-ui/components/u-tabs/u-tabs.vue— no import path from any entry point (50 application, 3 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Unused dependency 'axios' server/public/pctest/package.json:14— Declared in server/public/pctest/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'cookieparser' server/public/pctest/package.json:16— Declared in server/public/pctest/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'js-cookie' server/public/pctest/package.json:19— Declared in server/public/pctest/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'qrcodejs2' server/public/pctest/package.json:21— Declared in server/public/pctest/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'vue-awesome-swiper' server/public/pctest/package.json:23— Declared in server/public/pctest/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'chai' server/public/static/plug/layui-admin/package.json:11— Declared in server/public/static/plug/layui-admin/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'sinon' server/public/static/plug/layui-admin/package.json:23— Declared in server/public/static/plug/layui-admin/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'sinon-chai' server/public/static/plug/layui-admin/package.json:24— Declared in server/public/static/plug/layui-admin/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Weak hash algorithm server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Util/AntCertificationUtil.cs:303— MD5/SHA1 is constructed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ for content integrity, or a KDF (PBKDF2/Argon2/BCrypt) for password storage. If it only derives a non-security identifier (a cache key, a file or mutex name), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as `System.IO.Hashing.XxHash64`/`Crc32` says it in code — since the algorithm alone cannot distinguish the two uses.
S1 · Cryptographic Hygiene· Ciphertext is encrypted but not authenticated · ×1
Ciphertext is encrypted but not authenticated server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Util/AES.cs:35— This type encrypts through `SymmetricAlgorithm`, whose every cipher mode (CBC/ECB/OFB/CFB/CTS) is unauthenticated, and no keyed MAC or AEAD cipher appears anywhere in it — so nothing establishes that the ciphertext it produced is the ciphertext it later reads back. Encryption alone provides confidentiality, not integrity: unauthenticated CBC is MALLEABLE, and an attacker who can modify stored or transmitted ciphertext can flip chosen plaintext bits in the following block by flipping ciphertext bits in the preceding one, without ever knowing the key. Where the decrypt path reports failure differently for a padding error than for a downstream one — a broad `catch` that returns null is the usual spelling — the same construction also answers the attacker's questions, which is the padding-oracle shape that recovers plaintext outright. Prefer an AEAD cipher: `AesGcm` or `ChaCha20Poly1305` authenticate the ciphertext as part of encrypting it, and give you an associated-data slot for the surrounding context. Where the format cannot change, MAC it with encrypt-then-MAC — HMAC-SHA256 over the IV and the ciphertext together, with a key derived separately from the encryption key — and verify that tag with `CryptographicOperations.FixedTimeEquals` BEFORE decrypting anything.
Third-party script without Subresource Integrity pc/assets/fonts/demo_index.html:13— `https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 5 such include(s) across the repository's markup.
`async` Promise executor uniapp/components/lime-painter/components/l-painter/utils.js:367— The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
X2 · Cancellation propagation· Async function without AbortSignal · ×1
Async function without AbortSignal: issue pc/utils/consumeToken.js:40— `issue` awaits `axios.post(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.post(url, { signal })`.
X25 · Inert configuration knob· Option is kept and never read · ×1
Option is kept and never read uniapp/components/lime-painter/components/common/relation.js:44— `children` accepts `options.indexKey` from the caller and keeps it in `indexKey` on line 44, where only it can read the value — but nothing ever reads `indexKey`. Setting `options.indexKey` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `indexKey` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `options.indexKey` from the accepted options so callers stop setting a knob that does nothing.
Duplicated predicate pc/plugins/axios.js:26— `!response || response.code !== 1 || !response.data || !response.data.key` appears character-identically in 2 files — pc/plugins/axios.js, uniapp/utils/request.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate uniapp/components/uview-ui/components/u-parse/libs/CssHandler.js:2— `(c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')` appears character-identically in 2 files — uniapp/components/uview-ui/components/u-parse/libs/CssHandler.js, uniapp/components/uview-ui/components/u-parse/libs/MpHtmlParser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pc/utils/consumeToken.js:58— `Number(result.data && result.data.expires_in) || 30` appears character-identically in 2 files — pc/utils/consumeToken.js, uniapp/utils/consumeToken.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate uniapp/components/uview-ui/libs/mixin/mixin.js:18— `all && Array.isArray(rect) && rect.length` appears character-identically in 2 files — uniapp/components/uview-ui/libs/mixin/mixin.js, uniapp/utils/tools.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pc/utils/consumeToken.js:15— `cachedLoginToken === loginToken && Date.now() < refreshAt` appears character-identically in 2 files — pc/utils/consumeToken.js, uniapp/utils/consumeToken.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pc/utils/consumeToken.js:66— `expectedToken && cachedToken !== expectedToken` appears character-identically in 2 files — pc/utils/consumeToken.js, uniapp/utils/consumeToken.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pc/utils/consumeToken.js:18— `issuingPromise && issuingLoginToken === loginToken` appears character-identically in 2 files — pc/utils/consumeToken.js, uniapp/utils/consumeToken.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pc/plugins/axios.js:42— `response.data.key_id || response.data.keyId` appears character-identically in 2 files — pc/plugins/axios.js, uniapp/utils/request.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pc/plugins/axios.js:34— `typeof data[field] === 'string' && data[field]` appears character-identically in 2 files — pc/plugins/axios.js, uniapp/utils/request.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate server/application/common/server/AliPayServer.php:197— `!$order || $order['pay_status'] >= Pay::ISPAID` appears character-identically in 2 files — server/application/common/server/AliPayServer.php, server/application/common/server/WeChatPayServer.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 server/thinkphp/library/think/debug/Console.php:49— `!empty($contentType) && strpos($contentType, 'html') === false` appears character-identically in 2 files — server/thinkphp/library/think/debug/Console.php, server/thinkphp/library/think/debug/Html.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 server/application/admin/logic/DistributionMemberLogic.php:125— `!empty($distribution) && $distribution['is_distribution'] == 1` appears character-identically in 4 files — server/application/admin/logic/DistributionMemberLogic.php, server/application/admin/model/User.php, server/application/api/controller/Distribution.php, server/application/common/model/User.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate server/application/admin/logic/BargainLogic.php:62— `!empty($get['goods_name']) and $get['goods_name'] !== ''` appears character-identically in 2 files — server/application/admin/logic/BargainLogic.php, server/application/admin/logic/TeamActivityLogic.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 server/application/admin/logic/AfterSaleLogic.php:57— `!empty($get['search_key']) && !empty($get['keyword'])` appears character-identically in 3 files — server/application/admin/logic/AfterSaleLogic.php, server/application/admin/logic/OrderLogic.php, server/application/admin/logic/WithdrawLogic.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 server/application/api/logic/CouponLogic.php:318— `$item['is_member'] == 1 && $level_discount > 0` appears character-identically in 2 files — server/application/api/logic/CouponLogic.php, server/application/api/validate/Order.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 server/application/admin/logic/CommentHelperLogic.php:70— `$item['spec_type'] == 2 && $item['max_price'] !== $item['min_price']` appears character-identically in 2 files — server/application/admin/logic/CommentHelperLogic.php, server/application/admin/logic/GoodsLogic.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 server/thinkphp/library/think/route/RuleGroup.php:306— `$matchRule[0] && 0 !== strncasecmp($rule, $url, strlen($matchRule[0]))` appears character-identically in 2 files — server/thinkphp/library/think/route/RuleGroup.php, server/thinkphp/library/think/route/RuleItem.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 server/application/admin/logic/Hfive.php:76— `$params['is_open'] == 0 && $params['page'] == 1` appears character-identically in 2 files — server/application/admin/logic/Hfive.php, server/application/admin/logic/Pc.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 server/application/admin/logic/Hfive.php:85— `$params['is_open'] == 0 && $params['page'] == 2 && !empty($params['page_url'])` appears character-identically in 2 files — server/application/admin/logic/Hfive.php, server/application/admin/logic/Pc.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 server/application/api/logic/OrderLogic.php:541— `$post['delivery_type'] == CommonOrder::DELIVERY_STATUS_SELF && !Validate::mobile($post['mobile'])` appears character-identically in 2 files — server/application/api/logic/OrderLogic.php, server/application/api/logic/TeamLogic.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 server/application/api/logic/OrderLogic.php:535— `$post['delivery_type'] == CommonOrder::DELIVERY_STATUS_SELF && empty($post['consignee'])` appears character-identically in 2 files — server/application/api/logic/OrderLogic.php, server/application/api/logic/TeamLogic.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 server/application/api/logic/OrderLogic.php:538— `$post['delivery_type'] == CommonOrder::DELIVERY_STATUS_SELF && empty($post['mobile'])` appears character-identically in 2 files — server/application/api/logic/OrderLogic.php, server/application/api/logic/TeamLogic.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 server/application/api/logic/OrderLogic.php:526— `$post['delivery_type'] == CommonOrder::DELIVERY_STATUS_SELF && empty($post['selffetch_shop_id'])` appears character-identically in 2 files — server/application/api/logic/OrderLogic.php, server/application/api/logic/TeamLogic.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 server/application/common/logic/OrderRefundLogic.php:159— `$result['return_code'] == 'SUCCESS' && $result['result_code'] == 'SUCCESS'` appears character-identically in 2 files — server/application/common/logic/OrderRefundLogic.php, server/application/common/server/WeChatPayServer.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 server/thinkphp/library/think/db/builder/Mysql.php:154— `$strict && !preg_match('/^[\w\.\*]+$/', $key)` appears character-identically in 2 files — server/thinkphp/library/think/db/builder/Mysql.php, server/thinkphp/library/think/db/builder/Sqlsrv.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.
Silent fallback default in catch server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Util/AntCertificationUtil.cs:241— `VerifyCert` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch server/vendor/alipaysdk/easysdk/kernel/csharp/EasySDKKernel/Kernel/Util/AntCertificationUtil.cs:289— `VerifyCertChain` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch REDACTED:50— `getMenuTree` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
Silent fallback default in catch server/application/common/server/FileServer.php:305— `lists` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 33 significant file(s) lose their only recent owner: server/application/api/logic/OrderLogic.php, uniapp/pages/login/login.vue, uniapp/bundle/pages/user_profile/user_profile.vue, server/application/admin/logic/OrderLogic.php, uniapp/bundle/pages/user_set/user_set.vue, server/application/common/server/FileServer.php, pc/pages/user/profile.vue, uniapp/pages/register/register.vue (+25 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 8 significant file(s) lose their only recent owner: REDACTED, server/application/common/logic/QrCodeLogic.php, server/application/api/logic/DistributionLogic.php, server/application/api/logic/WithdrawLogic.php, server/application/api/logic/WeChatLogic.php, server/application/api/controller/Distribution.php, server/application/admin/controller/Upgrade.php, server/application/api/validate/Withdraw.php. Pair on, review, or document these before any departure.
D21 · Naming Consistency· `addUserID` spells `ID` where 106 names in the project spell it `Id` · ×1
`addUserID` spells `ID` where 106 names in the project spell it `Id` server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/kms/aliyun/AliyunKMSClient.java:128— 106 of 108 names in project alipay-easysdk spell the token `Id` (106 of 108; unit: names in project alipay-easysdk containing `Id`). Peers: AlipayOfflineMaterialImageUploadResponse.setImageId (server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/base/image/models/AlipayOfflineMaterialImageUploadResponse.java:81); AlipayOfflineMaterialImageUploadResponse.setImageId(imageId) (server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/base/image/models/AlipayOfflineMaterialImageUploadResponse.java:81); AlipayOfflineMaterialImageUploadResponse.getImageId (server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/base/image/models/AlipayOfflineMaterialImageUploadResponse.java:85); AlipaySystemOauthTokenResponse.setUserId (server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/base/oauth/models/AlipaySystemOauthTokenResponse.java:93); AlipaySystemOauthTokenResponse.setUserId(userId) (server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/base/oauth/models/AlipaySystemOauthTokenResponse.java:93). Rename to `addUserId`. [rule N6]
D21 · Naming Consistency· `userID` spells `ID` where 106 names in the project spell it `Id` · ×1
`userID` spells `ID` where 106 names in the project spell it `Id` server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/kms/aliyun/AliyunKMSClient.java:128— 106 of 108 names in project alipay-easysdk spell the token `Id` (106 of 108; unit: names in project alipay-easysdk containing `Id`). Peers: AlipayOfflineMaterialImageUploadResponse.setImageId (server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/base/image/models/AlipayOfflineMaterialImageUploadResponse.java:81); AlipayOfflineMaterialImageUploadResponse.setImageId(imageId) (server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/base/image/models/AlipayOfflineMaterialImageUploadResponse.java:81); AlipayOfflineMaterialImageUploadResponse.getImageId (server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/base/image/models/AlipayOfflineMaterialImageUploadResponse.java:85); AlipaySystemOauthTokenResponse.setUserId (server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/base/oauth/models/AlipaySystemOauthTokenResponse.java:93); AlipaySystemOauthTokenResponse.setUserId(userId) (server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/base/oauth/models/AlipaySystemOauthTokenResponse.java:93). Rename to `userId`. [rule N6]
D21 · Naming Consistency· `AcsURLEncoder` spells `URL` where 56 names in the project spell it `Url` · ×1
`AcsURLEncoder` spells `URL` where 56 names in the project spell it `Url` server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/kms/aliyun/credentials/utils/AcsURLEncoder.java:6— 56 of 57 names in project alipay-easysdk spell the token `Url` (56 of 57; unit: names in project alipay-easysdk containing `Url`). Peers: Client.route(testUrl) (server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/base/image/Client.java:143); AlipayOfflineMaterialImageUploadResponse.setImageUrl (server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/base/image/models/AlipayOfflineMaterialImageUploadResponse.java:89); AlipayOfflineMaterialImageUploadResponse.setImageUrl(imageUrl) (server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/base/image/models/AlipayOfflineMaterialImageUploadResponse.java:89); AlipayOfflineMaterialImageUploadResponse.getImageUrl (server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/base/image/models/AlipayOfflineMaterialImageUploadResponse.java:93); Client.route(testUrl) (server/vendor/alipaysdk/easysdk/java/src/main/java/com/alipay/easysdk/base/oauth/Client.java:226). Rename to `AcsUrlEncoder`. [rule N6]
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/AlipayEasySDK.csproj:1— `AlipayEasySDK(netstandard2.0)` overshoots its size bounds (10207 LoC, 67 public types across 34 namespaces). 1 of 3 project(s) overshoot their size bounds, lowering Project Cohesion to 3.3/10. Review these for cohesion — draw the boundary inside the assembly first (group each responsibility into its own namespace/folder and keep the cross-boundary members internal), since splitting a published assembly moves types between packages and breaks consumers.
Scattered collaborators — 40 % of calls cross a namespace and only 0 % of collaborators are co-located — group each feature's code into a vertical slice so a call's collaborators sit together.
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.
P10 · Library API & versioning· Public type used only inside its own library · ×1
Public type used only inside its own library server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Models/Text.cs:11— `Alipay.EasySDK.Marketing.OpenLife.Models.Text` (server/vendor/alipaysdk/easysdk/csharp/AlipayEasySDK/Marketing/OpenLife/Models/Text.cs:11) is public, and the library's own code uses it, but no other project in this repository uses it (read: `UnitTest`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
P10 · Library API & versioning· No explicit versioning · ×1
No explicit versioning — No explicit version was found by any of the six routes this check reads: a `<Version>` or `<VersionPrefix>` property; a `GitVersion` or `MinVer` reference; the split Arcade spelling (`<MajorVersion>` AND `<MinorVersion>` together); a hand-written `[assembly: AssemblyVersion]` in source, with `bin/` and `obj/` excluded so the SDK's generated AssemblyInfo cannot satisfy it; or a version handed to MSBuild by the pipeline, as `-p:Version=` / `-p:PackageVersion=` on a `dotnet build` or `dotnet pack` line. Only project files, first-party source and CI files are read, so a version computed somewhere none of those can see is invisible here. A published library needs explicit semantic versioning so consumers can reason about breaking changes.
No SAST — No static application security testing detected. For this repository's stack, add phpstan or psalm (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No dependency-update automation REDACTED:11— `REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
P4 · Deployment & Rollback· No rollback/health safety · ×1
No rollback/health safety — Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
X2 · Cancellation propagation· Not all async functions that make a request accept an AbortSignal · ×1
Not all async functions that make a request accept an AbortSignal — Only 0/1 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
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.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 10 file(s) — `server/public/mobile/static/js/chunk-vendors.0caca807.js`, `server/public/pc/_nuxt/6ee2ef1.js`, `server/public/pc/_nuxt/dd1e37e.js`, `server/public/static/plug/Kz-layedit/Content/Layui-KnifeZ/lay/modules/jquery.js`, `server/public/static/plug/Kz-layedit/Content/Layui-KnifeZ/layui.all.js`, … (+5 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1eaad-4adb-7672-b481-40c4ea86506a · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Appendix C — Personal-data map
Every field, property and record parameter whose name is conventional personal data — 2 field(s) across 1 category, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier — the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it — that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational — it feeds no score.
Issues: 83 · Warnings: 1352 · Recommendations: 73 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 18:03 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.