Public report of yiisoft/yii, 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, 16:04 UTC · Survey ID cd_5ecd28baac584b23be87a40cc35c35e7
yiisoft/yii
Measured 17 November 2026, 16:03 UTC, at code version aa3e3b2
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
Up 12.6 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A very large codebase: 787,385 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 4.9 person-years · Weakest lens: Production Readiness, 41.0
Findings by how serious they are
20 critical578 serious318 minor
16 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 16: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.
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 ▸
47of 47 dimensions measured by tools.
912of 916 findings point to an exact file and line, so you can open each one in the code. The other 4 concern the repository as a whole, such as missing documentation.
47dimensions across 6 lenses, read from 787,385 lines of product code in 4 projects.
yiisoft/yii falls short of our standard for production, in part because four passwords or keys sit in the current code. It scores 45.7 out of 100 and is rated Weak, and seven of its 20 critical findings are security problems.
Production Readiness, at 41.0, is the weakest lens and counts most in the score. The best first step is replacing the four exposed passwords or keys and switching the old ones off, worth about 5.2 points. Recording design decisions comes next, worth about 2.3 points. Raising Production Readiness to 70 would lift the score to about 50.0.
Four passwords or keys are open to anyone who can read the repository. Two places in the code run text as code, which an attacker could use, and eight form fields can't be read by a screen reader. Replacing each exposed password or key, replacing text run as code with direct calls and labelling the form fields would close these risks. Pinning each tool to an exact version would fix the pipeline tool referenced by a changeable name. The two pages that don't say their language need their language set.
The product code is 787,385 lines, about €720,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 41.0 to 70, the lowest score rated Strong, the score would rise from 45.7 to about 50.0.
Code composition: what the lines of code are
Product code 98%Tests 2%
New since the last survey: 141 findings
These 141 critical or serious findings weren't in the previous survey, on 5 November 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Code Duplication · Edited copy of a member (41 corresponding lines) framework/db/schema/CDbCommandBuilder.php
Code Duplication · Edited copy of a member (33 corresponding lines) framework/validators/CExistValidator.php
Code Duplication · Edited copy of a member (26 corresponding lines) framework/vendors/TextHighlighter/Text/Highlighter/Generator.php
Code Duplication · Edited copy of a member (39 corresponding lines) framework/zii/widgets/CListView.php
Code Duplication · Edited copy of a member (40 corresponding lines) framework/db/schema/CDbCommandBuilder.php
Code Duplication · Edited copy of a member (33 corresponding lines) framework/logging/CLogger.php
Code Duplication · Edited copy of a member (24 corresponding lines) framework/web/helpers/CHtml.php
Code Duplication · Edited copy of a member (51 corresponding lines) framework/validators/CNumberValidator.php
Code Duplication · Edited copy of a member (23 corresponding lines) framework/base/CComponent.php
Code Duplication · Edited copy of a member (23 corresponding lines) framework/web/auth/CDbAuthManager.php
Code Duplication · Edited copy of a member (32 corresponding lines) framework/cli/commands/MigrateCommand.php
Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) framework/validators/CEmailValidator.php
Code Duplication · Edited copy of a member (19 corresponding lines) framework/base/CApplication.php
Code Duplication · Edited copy of a member (14 corresponding lines) framework/utils/CFileHelper.php
Code Duplication · Edited copy of a member (16 corresponding lines) framework/zii/widgets/CListView.php
Code Duplication · Edited copy of a member (17 corresponding lines) framework/base/CSecurityManager.php
Code Duplication · Edited copy of a member (13 corresponding lines) framework/web/widgets/CActiveForm.php
Code Duplication · Edited copy of a member (19 corresponding lines) framework/cli/commands/MigrateCommand.php
Code Duplication · Edited copy of a member (18 corresponding lines) framework/db/schema/oci/COciSchema.php
Code Duplication · Edited copy of a member (13 corresponding lines) framework/db/ar/CActiveRecord.php
Code Duplication · Edited copy of a member (11 corresponding lines) framework/caching/CCache.php
Code Duplication · Edited copy of a member (12 corresponding lines) framework/zii/widgets/jui/CJuiProgressBar.php
Code Duplication · Edited copy of a member (13 corresponding lines) demos/blog/protected/controllers/SiteController.php
Code Duplication · Edited copy of a member (7 corresponding lines) framework/web/CHttpRequest.php
Code Duplication · Edited copy of a member (17 corresponding lines) framework/db/CDbMigration.php
Code Duplication · Edited copy of a member (13 corresponding lines) framework/db/ar/CActiveRecord.php
Code Duplication · Edited copy of a member (11 corresponding lines) framework/db/ar/CActiveFinder.php
Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) framework/web/auth/CDbAuthManager.php
Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) framework/db/schema/cubrid/CCubridSchema.php
Code Duplication · Edited copy of a member (10 corresponding lines) framework/db/ar/CActiveRecord.php
Code Duplication · Edited copy of a member (10 corresponding lines) framework/db/schema/mysql/CMysqlColumnSchema.php
Code Duplication · Edited copy of a member (11 corresponding lines) framework/base/CSecurityManager.php
Code Duplication · Edited copy of a member (8 corresponding lines) framework/db/CDbCommand.php
Code Duplication · Edited copy of a member (9 corresponding lines) framework/db/CDbTransaction.php
Code Duplication · Edited copy of a member (15 corresponding lines) framework/web/CDataProvider.php
Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) docs/viewer/components/MarkdownParser.php
Code Duplication · Edited copy of a member (12 corresponding lines) docs/viewer/components/MarkdownParser.php
Code Duplication · Edited copy of a member (5 corresponding lines) framework/cli/commands/shell/ModelCommand.php
Code Duplication · Edited copy of a member (9 corresponding lines) framework/caching/dependencies/CCacheDependency.php
Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) framework/validators/CBooleanValidator.php
Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) framework/db/CDbMigration.php
Code Duplication · Edited copy of a member (6 corresponding lines) framework/db/schema/CDbSchema.php
Code Duplication · Edited copy of a member (8 corresponding lines) framework/gii/GiiModule.php
Code Duplication · Edited copy of a member (7 corresponding lines) framework/caching/dependencies/CDbCacheDependency.php
Code Duplication · Edited copy of a member (14 corresponding lines) framework/db/schema/mysql/CMysqlSchema.php
Code Duplication · Edited copy of a member (4 corresponding lines) framework/db/ar/CActiveRecord.php
Code Duplication · Edited copy of a member (12 corresponding lines) framework/db/schema/mssql/CMssqlSchema.php
Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) framework/collections/CList.php
Code Duplication · Edited copy of a member (7 corresponding lines) framework/web/CAssetManager.php
Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) framework/db/ar/CActiveRecord.php
Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) REDACTED
Code Duplication · Edited copy of a member (8 corresponding lines) framework/db/schema/CDbColumnSchema.php
Code Duplication · Edited copy of a member (4 corresponding lines) framework/gii/generators/controller/ControllerCode.php
Code Duplication · Edited copy of a member (4 corresponding lines) docs/viewer/controllers/BlogController.php
Code Duplication · Edited copy of a member (3 corresponding lines) framework/web/CWebApplication.php
Code Duplication · Edited copy of a member (3 corresponding lines) framework/web/CWebApplication.php
Code Duplication · Edited copy of a member (3 corresponding lines) framework/web/CWebApplication.php
Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) framework/db/schema/mssql/CMssqlSchema.php
Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) framework/base/CApplication.php
Code Duplication · Edited copy of a member (5 corresponding lines) framework/collections/CTypedList.php
Code Duplication · Edited copy of a member (10 corresponding lines) framework/db/schema/cubrid/CCubridSchema.php
Code Duplication · Edited copy of a member (3 corresponding lines) framework/web/widgets/CTextHighlighter.php
Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) framework/web/widgets/CAutoComplete.php
Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) demos/blog/protected/models/LoginForm.php
Code Duplication · Edited copy of a member (2 corresponding lines) framework/gii/generators/controller/ControllerCode.php
Code Duplication · Edited copy of a member (1 corresponding lines) framework/base/CModel.php
Code Duplication · Edited copy of a member (3 corresponding lines) framework/cli/commands/shell/ControllerCommand.php
Text alternatives · <embed> without a text alternative framework/web/widgets/views/flexWidget.php
Forms & labels · <input> without a programmatic label framework/web/js/source/jquery.js
Forms & labels · <input> without a programmatic label framework/web/js/source/jquery.js
Page structure · <html> without a lang docs/viewer/views/layouts/main.php
Page structure · Page without a main landmark docs/viewer/views/layouts/main.php
Page structure · <html> without a lang framework/cli/views/webapp/protected/views/layouts/main.php
Page structure · Page without a main landmark framework/cli/views/webapp/protected/views/layouts/main.php
Page structure · Page without a main landmark framework/gii/views/layouts/main.php
Page structure · Page without a main landmark framework/views/ar/error.php
Page structure · Page without a main landmark framework/views/ar/error400.php
Page structure · Page without a main landmark framework/views/ar/error403.php
Page structure · Page without a main landmark framework/views/ar/error404.php
Page structure · Page without a main landmark framework/views/ar/error500.php
Page structure · Page without a main landmark framework/views/ar/error503.php
Page structure · Page without a main landmark framework/views/ar/exception.php
Page structure · Data table has no header cells framework/views/ar/exception.php
Page structure · Page without a main landmark framework/views/bg/error.php
Page structure · Page without a main landmark framework/views/bg/error400.php
Page structure · Page without a main landmark framework/views/bg/error403.php
Page structure · Page without a main landmark framework/views/bg/error404.php
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 41 findings
These 41 critical or serious findings were in the previous survey, on 5 November 2026, and are gone from this one.
Code Duplication · Near-duplicate member pair (36 shared lines) framework/db/CDbCommand.php
Page structure · <iframe> without a title framework/web/js/source/jquery.js
Page structure · Data table has no header cells framework/web/js/source/jquery.js
Visual & motion safety · Focus outline removed in CSS without a :focus replacement framework/web/js/source/jui/css/base/jquery-ui.css
Visual & motion safety · Focus outline removed in CSS without a :focus replacement framework/gii/assets/js/fancybox/jquery.fancybox-1.3.1.css
Visual & motion safety · Focus outline removed in CSS without a :focus replacement framework/gii/assets/js/fancybox/jquery.fancybox-1.3.1.css
Visual & motion safety · Focus outline removed in CSS without a :focus replacement framework/gii/assets/js/fancybox/jquery.fancybox-1.3.1.css
Visual & motion safety · Focus outline removed in CSS without a :focus replacement framework/cli/views/webapp/css/screen.css
Visual & motion safety · Animation without a prefers-reduced-motion guard framework/web/js/source/jquery.treeview.js
Visual & motion safety · Animation without a prefers-reduced-motion guard framework/web/js/source/jquery.treeview.js
A11y enforcement · Accessibility enforcement below the top rung
Rebuild cost: about €720,000 · Estimate
Cost to rebuild
€240,000 to €1,200,000, for 3,980 to 12,627 hours of work, about 4.9 person-years for 2 to 10 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 46. 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
Very large: 787,385 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 4 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED, REDACTED.
Raises the score by about 5.2 points · Low effort · Secret Scanning
2
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with composer.json.
Raises the score by about 2.3 points · Low effort · ADR Quality
3
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Raises the score by about 2.8 points · Medium effort · Text alternatives
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €720,000 to build again, about 4.9 person-years of work. Its weakest lens is Production Readiness, at 41.0 (Weak). 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 4 Leaked secret finding(s) in Secret Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 5.2 points for low effort, because it clears the 4 Secret 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 6.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 7% on every change. The history of the code shows how much it changes: about 513 lines over the last 90 days, which is about 2,080 lines a year. At that pace, the extra work comes to an estimated 0.2 to 0.9 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 — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
At a glance — Code Health · 49.9 · Weak · gated by D2, X5 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
26
High / Critical
A07:2025 — Authentication Failures
4
High / Critical
Roadmap
Top priorities: Resolve the 4 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED, REDACTED; Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video; Give every client an explicit bound: `new Client(['timeout' => 10, 'connect_timeout' => 3])` for Guzzle (whose default is to wait forever), `CURLOPT_TIMEOUT`/`CURLOPT_CONNECTTIMEOUT` before `curl_exec`, `timeout`/`max_duration` on Symfony HttpClient (or `framework.http_client.default_options`), and a stream-context `timeout` or `connection_timeout` for `file_get_contents`/`SoapClient`. In Drupal, use the `http_client` service, which carries core's site-wide timeout, rather than `new Client()`. Add retries with back-off (Guzzle `Middleware::retry`, Symfony `RetryableHttpClient`, Laravel `->retry()`) around dependencies that fail.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 4 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED, REDACTED.
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Give every client an explicit bound: `new Client(['timeout' => 10, 'connect_timeout' => 3])` for Guzzle (whose default is to wait forever), `CURLOPT_TIMEOUT`/`CURLOPT_CONNECTTIMEOUT` before `curl_exec`, `timeout`/`max_duration` on Symfony HttpClient (or `framework.http_client.default_options`), and a stream-context `timeout` or `connection_timeout` for `file_get_contents`/`SoapClient`. In Drupal, use the `http_client` service, which carries core's site-wide timeout, rather than `new Client()`. Add retries with back-off (Guzzle `Middleware::retry`, Symfony `RetryableHttpClient`, Laravel `->retry()`) around dependencies that fail.
Add a SAST step to CI running what this repository's stack ships: phpstan or psalm — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Raise PHPStan to level 8 (`level: 8` in `phpstan.neon.dist`, or `max`) or Psalm to `errorLevel="3"` or stricter, so `?Type` is a type the checker holds you to; generate a baseline for what that surfaces only to pay it down, not to keep it. Then resolve the baselined nullness errors rather than adding to them: each is a call on a value the checker showed could be null — narrow it (`if ($x === null) { … }`, `?->`, an early return), make the property non-nullable and initialise it in the constructor, or change the return type so the null cannot arrive.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 20
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 — 578
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 — 318
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 16
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 47 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 — 47 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, 912 of 916 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.php) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.php) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's dependency manifest (composer.json) was found, but this pass cannot parse it for hygiene, so no package was assessed. Zero packages read is NOT a clean dependency tree, so this is NOT SCORED — a gap in the analyzer, not a verdict about this repository. This row is about dependency HYGIENE — outdated, deprecated or unmaintained direct dependencies; known CVEs in the same dependency graph are a separate question, reported under D30 wherever the manifest is OSV-readable.
D14 License Compliance — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — this repository declares a composer.json but commits no composer.lock this pass can read, so the set of packages it installs is not on disk: its composer.json states version CONSTRAINTS, and Composer's guidance is that a library leaves the lock uncommitted. Producing the graph needs Composer's solver, which this pass does not run, and grading whichever release happens to be newest today would be a verdict about a dependency graph nobody resolved. NOT a finding that this repository's licences are compliant: this dimension asserts nothing about its licensing in either direction.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (118425 LoC, 768 module-visible types across 96 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
D44 Platform End-of-Life — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
AC3 Page structure — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 221 further occurrence(s) are not listed individually; the score already reflects all 261.
AC6 Visual & motion safety — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 7 further occurrence(s) are not listed individually; the score already reflects all 47.
AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: 452 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's , PHP is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's , PHP is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
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 log through no library that carries a message's values as fields (pino, winston, bunyan, tslog, LogTape, roarr; Python's logging, structlog; PHP's PSR-3 loggers), so its log calls cannot be judged, 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.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
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.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
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").
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
+ 57 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 12 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with CDateTimeParser.parse (cyclomatic 72), CJSON.decode (cyclomatic 71), CTimestamp.formatDate (cyclomatic 63). — 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 12 together lifts Cyclomatic Complexity from 6.4 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 163 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 8 bodies over 60 down to 60 or less in Cognitive Complexity — start with Text_Highlighter_Generator.xmltag_Highlight_ (cognitive 124), CDateTimeParser.parse (cognitive 115), CTimestamp.formatDate (cognitive 100). — 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 8 together lifts Cognitive Complexity from 2.5 to about 4.4/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.9 / 10Stronggated by 32 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 14 TooManyMethods finding(s) in God Classes — start with CHtml.php, CActiveRecord.php, CDbCommand.php. — One of this dimension's main actionable groups (14 warning-level).
Resolve the 8 ClassTooLong finding(s) in God Classes — start with CHtml.php, CActiveRecord.php, CActiveFinder.php. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 5 MethodTooLong finding(s) in God Classes — start with CJSON.php (2), Generator.php, CDateTimeParser.php. — One of this dimension's main actionable groups (5 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.
94 duplicated block group(s) detected. 0.4 % of the production lines (3,542 of 787,385) are in a reported copy. A further 74 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 1 of the 168 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.
+ 78 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 9 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with CComponent.php, CDbCommand.php, CActiveRecord.php. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 8 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with ControllerCode.php (2), CDbCommand.php, CActiveFinder.php. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 7 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with CActiveFinder.php (2), CQueue.php, CCubridSchema.php. — One of this dimension's main actionable groups (7 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling0.0 / 10Critical✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
4 production modules (source-import), 1 dependency cycle(s), 0 unstable depended-on module(s). No manifest declares this repository's modules, so the modules are its top-level source directories and the edges the imports between them; 0 module(s) off the main sequence.
Resolve the 1 Circular dependency finding(s) in Coupling — start with ApiCommand.php. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 23 Low cohesion finding(s) in Cohesion (LCOM4) — start with yiilite.php (7), CHttpRequest.php, CApplication.php. — One of this dimension's main actionable groups (23 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
4 secret(s) detected. 4 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 4 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
What it measures: 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.
1 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is framework/web/auth/CPhpAuthManager.php. Counted over 68 of the 860 production source files in this repository: 598 are under the ~2,400-byte size floor this dimension measures over, and the remaining 194 have no attributable history left to measure.
Off-boarding risk: anonymized user #1
✓ 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.
3 deducted task-comment markers across 787385 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 3 TodoComment finding(s) in Explicit Debt — start with CTypeValidatorTest.php, CActiveRecord2Test.php, CStatePersisterTest.php. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with composer.json. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
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.
0 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
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).
27 finding(s): 0 critical, 3 high, 11 medium, 13 low. 1 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 1 file(s) — `framework/web/js/source/jquery.js` — so no absence of findings in them is evidence of anything, and nothing in them was analysed. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-level).
No action in Static Analysis (SAST) — all 1 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (1 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
260 of 262 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is framework/vendors/htmlpurifier/standalone/HTMLPurifier/Lexer/PH5P.php. Counted over 262 of the 860 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Most significant orphaned file · ×3framework/vendors/htmlpurifier/standalone/HTMLPurifier/Lexer/PH5P.php:1
Concentrated knowledge decay
What to do
Resolve the 257 Orphaned file finding(s) in Knowledge Freshness — start with REDACTED (10), exception.php (9), controller.php (2). — One of this dimension's main actionable groups (257 recommendation-level).
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with PH5P.php, IDNA2.php, CActiveRecord.php. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Concentrated knowledge decay finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
A vulnerability-disclosure policy (.github/SECURITY.md) is published with a reporting contact.
✓ On the Gold path — maintain.
Detailed fixes: d37_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives2.7 / 10Weak✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
A <object> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. — framework/web/js/source/jquery.js:4530
An <embed> has no fallback-content mechanism, so it needs an aria-label/aria-labelledby/title to be described. — framework/web/widgets/views/flexWidget.php:83
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels4.9 / 10Weak✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×8) — framework/web/js/source/jquery.js:1224, framework/web/js/source/jquery.js:2684, framework/web/js/source/jquery.js:4465, …
A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. — framework/web/js/source/jquery.js:2671
A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one. — framework/web/js/source/jquery.js:4526
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Do you agree with this assessment?
AC3 · Page structure4.9 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×2) — docs/viewer/views/layouts/main.php:2, framework/cli/views/webapp/protected/views/layouts/main.php:3
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×36) — docs/viewer/views/layouts/main.php:2, framework/cli/views/webapp/protected/views/layouts/main.php:3, framework/gii/views/layouts/main.php:12, …
A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×2) — framework/views/ar/exception.php:175, framework/views/da/exception.php:175
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
`object` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×9) — framework/views/ar/exception.php:11, framework/views/da/exception.php:11, framework/views/exception.php:11, …
`:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×9) — framework/views/ar/exception.php:16, framework/views/da/exception.php:16, framework/views/exception.php:16, …
`.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover` sets color: #fff on background-color: #007fff — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — framework/web/js/source/jui/css/base/jquery-ui.css:7
`div.form.gii pre.results` sets color: white on background-color: gray — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — framework/gii/assets/css/main.css:435
`hr` sets color: #ccc on background-color: #ccc — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×3) — framework/gii/assets/css/print.css:17, framework/cli/views/webapp/css/print.css:17, demos/blog/css/print.css:17
`hr.space` sets color: #fff on background-color: #fff — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×6) — framework/gii/assets/css/print.css:18, framework/gii/assets/css/screen.css:232, framework/cli/views/webapp/css/print.css:18, …
`hr` sets color: #ddd on background-color: #ddd — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×3) — framework/gii/assets/css/screen.css:231, framework/cli/views/webapp/css/screen.css:234, demos/blog/css/screen.css:231
`#mainmenu ul li a:hover, #mainmenu ul li.active a` sets color: #6399cd on background-color: #EFF4FA — 2.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — framework/cli/views/webapp/css/main.css:77, demos/blog/css/main.css:77
`body` sets color: #555 on background-color: #666 — 1.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — docs/css/main.css:2
`.ui-helper-reset` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — framework/web/js/source/jui/css/smoothness/jquery-ui.css:7, framework/web/js/source/jui/css/base/jquery-ui.css:7
`.ui-menu` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — framework/web/js/source/jui/css/smoothness/jquery-ui.css:7, framework/web/js/source/jui/css/base/jquery-ui.css:7
`.ui-dialog` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — framework/web/js/source/jui/css/smoothness/jquery-ui.css:7
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
The projects build → framework → build (one cycle inside a mutually-dependent group of 3 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference. — build/commands/ApiCommand.php:10
What to do
Break project reference cycles by extracting shared abstractions into a separate project; keep the graph a DAG.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`IAuthManager` declares 20 methods: `checkAccess`, `createAuthItem`, `removeAuthItem`, `getAuthItems`, `getAuthItem`, `saveAuthItem`, `addItemChild`, `removeItemChild`, `hasItemChild`, `getItemChildren`, `assign`, `revoke`, `isAssigned`, `getAuthAssignment`, `getAuthAssignments`, `saveAuthAssignment`, `clearAll`, `clearAuthAssignments`, `save`, `executeBizRule`. Counted over its public instance methods, once per name; constants and static methods are not counted. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. (×2) — framework/base/interfaces.php:336, framework/yiilite.php:10814
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
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.
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.
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.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add phpstan or psalm (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 2 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. — .github/workflows/build.yml:5
`.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `pip`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list. — .github/dependabot.yml:2
What to do
Add a SAST step to CI running what this repository's stack ships: phpstan or psalm — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Dependabot is configured but does not watch `pip` — add that `package-ecosystem` entry to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`curl_exec(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — build/commands/CldrCommand.php:92
What to do
Give every client an explicit bound: `new Client(['timeout' => 10, 'connect_timeout' => 3])` for Guzzle (whose default is to wait forever), `CURLOPT_TIMEOUT`/`CURLOPT_CONNECTTIMEOUT` before `curl_exec`, `timeout`/`max_duration` on Symfony HttpClient (or `framework.http_client.default_options`), and a stream-context `timeout` or `connection_timeout` for `file_get_contents`/`SoapClient`. In Drupal, use the `http_client` service, which carries core's site-wide timeout, rather than `new Client()`. Add retries with back-off (Guzzle `Middleware::retry`, Symfony `RetryableHttpClient`, Laravel `->retry()`) around dependencies that fail.
Other · 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.
`opendir()` is called here and hands back a handle the caller must close — and it is held in `$dir`, and every use of `$dir` 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. (×2) — docs/viewer/controllers/BlogController.php:121, docs/viewer/controllers/GuideController.php:121
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.
`unsafeIconv` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the error handler (changed at line 3858, reset at line 3860) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path. — framework/vendors/htmlpurifier/HTMLPurifier.standalone.php:3856
`tokenizeHTML` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the error handler (changed at line 19079, reset at line 19086) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path. — framework/vendors/htmlpurifier/HTMLPurifier.standalone.php:19055
`doValidate` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the error handler (changed at line 22203, reset at line 22205) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path. — framework/vendors/htmlpurifier/HTMLPurifier.standalone.php:22140
`cleanCSS` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the error handler (changed at line 153, reset at line 155) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path. — framework/vendors/htmlpurifier/standalone/HTMLPurifier/Filter/ExtractStyleBlocks.php:135
`getDate` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the default timezone (changed at line 170, put back at line 172) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path. — framework/utils/CTimestamp.php:163
`save` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the process umask (changed at line 72, put back at line 74) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path. — framework/gii/CCodeFile.php:65
What to do
Each finding names the statement that changes the process-global value and the statement that puts it back. Confirm from the two that nothing between them is protected — then prefer removing the mutation over widening the restore: a working directory or an environment variable passed to the operation that needs it (the `cwd` and `env` options of `child_process`, or of `Deno.Command`) is scoped to that operation, which is what the save-and-restore was trying to approximate. Where the global genuinely must move, a `try`/`finally` is the least that makes the restore unconditional. In PHP the same holds for `chdir`, `putenv`, `setlocale`, `date_default_timezone_set`, `ini_set` and the error-handler stack: pass the value to the operation (`Process` with `cwd`/`env`, an explicit `DateTimeZone`) or restore in a `finally`.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated8.0 / 10Strong✓ Tool-verified
Other · Code Health — Whether a `foreach` leaves the array or collection it is walking alone — PHP raises nothing, but the loop's view and the collection part: an array walked by value (and a Doctrine or Laravel collection) is walked as the snapshot taken when the loop began, so an element added in the body is never visited and one removed is visited anyway; an array walked by reference (`as &$v`) and an SPL container (`SplObjectStorage`, `ArrayObject`, `SplQueue`) are walked live, so an added element is walked too and a removal skips the next one; and after an `array_splice`, `array_shift` or sort every later key names a different element.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
line 285 walks `$data` by value, so the walk is the snapshot taken when the loop began, and line 287 changes that same collection with `$data = …` before the next iteration: the loop carries on over the old value while the body now works on the new one. PHP raises nothing, so the loop completes over a different set than the code meant. — framework/zii/widgets/CListView.php:285
line 20453 walks `$this->injectors` by value, so the walk is the snapshot taken when the loop began, and line 20458 changes that same collection with `array_splice($this->injectors, …)` before the next iteration: every later key and position names a different element than the loop began with (keys shift). PHP raises nothing, so the loop completes over a different set than the code meant. — framework/vendors/htmlpurifier/HTMLPurifier.standalone.php:20453
What to do
Each finding names the two lines that cannot both stand — the `foreach` over the collection, and the change to it in the body. Confirm from those two, then pick one: build the result instead of editing the walked collection (`$kept = array_filter($items, $keep)`, `$batch->reject(…)`); for a worklist, loop `while (($next = array_shift($queue)) !== null)` so what is added is visited; walk a copy (`foreach (array_values($items) as …)`, `foreach (clone $storage as …)`) and change the original; remove only the CURRENT element (`unset($items[$key])`), which an array walk tolerates; or — where only the first match was ever meant — `break` straight after the change.
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.
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. (×16) — framework/yiilite.php:9407, framework/web/js/source/jquery.js:891, framework/web/js/source/jquery.js:1466, …
`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) — framework/db/schema/mysql/CMysqlSchema.php:170, framework/db/schema/mssql/CMssqlSchema.php:305, framework/db/schema/cubrid/CCubridSchema.php:148, …
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?
WCAG coverage — what static analysis assessed
Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 32 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X6 Hand-rolled structured-format parsing — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 65 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's PHP imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — Not applicable: PHP builds its object graph per request and shares none of it between requests. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Laravel migration, an Eloquent $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository registers no route (no Laravel Route::…, no Symfony #[Route], no Filament panel, no WordPress REST route or AJAX action). Access control is therefore N/A here — a Composer library is authorized by the application that mounts it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone_number, …) or stored credential in a Laravel migration, an Eloquent model's $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Laravel migration, an Eloquent $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Laravel migration, an Eloquent $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~19544 lines of test source are present (.php) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — no .php test runner
D12 Dependency Hygiene — Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
D14 License Compliance — Composer package licences not graded — this repository commits no composer.lock and this pass does not run Composer's solver
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.
D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
D21 Naming Consistency — Naming consistency does not read PHP, html yet; not measured.
D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed PHP surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (composer.json — not scanned yet).
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D36 Supply-chain Provenance & Signing — The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files).
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (composer.json — not scanned yet).
D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
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 only 1 of the 3 signals this lens looks for (12 PHP aggregate(s) recording domain events (recordThat/apply))
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
M4 Documentation accuracy — Not applicable: the 4 current-state document(s) make no claim of a kind M4 checks.
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for PHPBench subjects (`bench*` methods, or `@Subject`/`#[Subject]` ones) in a file importing PhpBench or carrying its annotations, `bench*` methods in a `*Bench.php` file where PHPBench is installed, or phpbench/phpbench in a composer.json or a phpbench.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
PF3 Async & latency hygiene — Not applicable: PHP has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X12 Unreachable branch — X12 reached only 4% of this repository's production lines — php (113,741 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no C# was loaded; this repository's PHP was read and makes no request a caller can cancel (amphp's HttpClient or connect) — synchronous PHP offers its callers no cancellation to take
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — X24 reached only 4% of this repository's production lines — php (113,741 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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.
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
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Critical — 20 finding(s)
AC2 · Forms & labels· <input> without a programmatic label · ×5
<input> without a programmatic label framework/web/js/source/jquery.js:2684— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label framework/web/js/source/jquery.js:4465— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label framework/web/js/source/jquery.js:8136— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label framework/web/js/source/jquery.js:4500— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label framework/web/js/source/jquery.js:4462— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels· <select> without a programmatic label · ×2
<select> without a programmatic label framework/web/js/source/jquery.js:1224— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label framework/web/js/source/jquery.js:4525— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<html> without a lang docs/viewer/views/layouts/main.php:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang framework/cli/views/webapp/protected/views/layouts/main.php:3— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC2 · Forms & labels· Link with no accessible name · ×1
Link with no accessible name framework/web/js/source/jquery.js:2671— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
AC2 · Forms & labels· <textarea> without a programmatic label · ×1
<textarea> without a programmatic label framework/web/js/source/jquery.js:4492— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
Project dependency cycle build/commands/ApiCommand.php:10— The projects build → framework → build (one cycle inside a mutually-dependent group of 3 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
Circular dependency build/commands/ApiCommand.php:10— build → framework → build (one cycle inside a mutually-dependent group of 3 modules)
Serious — 578 finding(s)
AC3 · Page structure· Page without a main landmark · ×36
Page without a main landmark docs/viewer/views/layouts/main.php:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/cli/views/webapp/protected/views/layouts/main.php:3— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/gii/views/layouts/main.php:12— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/ar/error.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/ar/error400.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/ar/error403.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/ar/error404.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/ar/error500.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/ar/error503.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/ar/exception.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/bg/error.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/bg/error400.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/bg/error403.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/bg/error404.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/bg/error500.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/bg/error503.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/ca/error.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/ca/error400.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/ca/error403.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/ca/error404.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/ca/error500.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/ca/error503.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/da/error.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/da/error400.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark framework/views/da/error403.php:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
+ 11 more in this group — see findings.md.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×23
Focus outline removed in CSS without a :focus replacement framework/views/ar/exception.php:11— `object` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/ar/exception.php:16— `:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/da/exception.php:11— `object` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/da/exception.php:16— `:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/exception.php:11— `object` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/exception.php:16— `:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/fi/exception.php:10— `object` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/fi/exception.php:15— `:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/ja/exception.php:11— `object` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/ja/exception.php:16— `:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/ko/exception.php:11— `object` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/ko/exception.php:16— `:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/lt/exception.php:11— `object` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/lt/exception.php:16— `:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/sv/exception.php:11— `object` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/sv/exception.php:16— `:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/uk/exception.php:11— `object` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/views/uk/exception.php:16— `:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/web/js/source/jui/css/smoothness/jquery-ui.css:7— `.ui-helper-reset` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/web/js/source/jui/css/smoothness/jquery-ui.css:7— `.ui-menu` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/web/js/source/jui/css/smoothness/jquery-ui.css:7— `.ui-dialog` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/web/js/source/jui/css/base/jquery-ui.css:7— `.ui-helper-reset` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement framework/web/js/source/jui/css/base/jquery-ui.css:7— `.ui-menu` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Low cohesion: CHttpRequest (LCOM4 9) framework/web/CHttpRequest.php:64— CHttpRequest's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CHttpRequest (LCOM4 9) framework/yiilite.php:2310— CHttpRequest's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CApplication (LCOM4 8) framework/base/CApplication.php:86— CApplication'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: CCodeModel (LCOM4 8) framework/gii/CCodeModel.php:37— CCodeModel'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: CApplication (LCOM4 8) framework/yiilite.php:1181— CApplication'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: CrudCode (LCOM4 7) framework/gii/generators/crud/CrudCode.php:3— CrudCode'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: CFormatter (LCOM4 7) framework/utils/CFormatter.php:51— CFormatter'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: CHttpSession (LCOM4 7) framework/web/CHttpSession.php:72— CHttpSession'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: CHttpSession (LCOM4 7) framework/yiilite.php:4643— CHttpSession'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: CModule (LCOM4 6) framework/base/CModule.php:38— CModule'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: CController (LCOM4 6) framework/web/CController.php:76— CController'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: CWebApplication (LCOM4 6) framework/web/CWebApplication.php:58— CWebApplication'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: CModule (LCOM4 6) framework/yiilite.php:922— CModule'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: CWebApplication (LCOM4 6) framework/yiilite.php:1699— CWebApplication'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: CController (LCOM4 6) framework/yiilite.php:3691— CController'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: BlogController (LCOM4 5) docs/viewer/controllers/BlogController.php:3— BlogController'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: GuideController (LCOM4 5) docs/viewer/controllers/GuideController.php:3— GuideController'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: ApiModel (LCOM4 4) build/commands/api/ApiModel.php:17— ApiModel'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: MarkdownHtml2Tex (LCOM4 4) build/commands/markdown/MarkdownHtml2Tex.php:71— MarkdownHtml2Tex'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: CDbConnection (LCOM4 4) framework/db/CDbConnection.php:121— CDbConnection'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: CDataProvider (LCOM4 4) framework/web/CDataProvider.php:21— CDataProvider'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: CWebModule (LCOM4 4) framework/web/CWebModule.php:32— CWebModule'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: CDbConnection (LCOM4 4) framework/yiilite.php:8754— CDbConnection'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.
Swallowed exception (empty catch) framework/yiilite.php:9407— 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) framework/web/js/source/jquery.js:891— 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) framework/web/js/source/jquery.js:1466— 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) framework/web/js/source/jquery.js:3660— 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) framework/web/js/source/jquery.js:3799— 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) framework/web/js/source/jquery.js:4772— 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) framework/web/js/source/jquery.js:5169— 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) framework/web/js/source/jquery.js:5417— 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) framework/web/js/source/jquery.js:6371— 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) framework/web/js/source/jquery.js:7136— 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) framework/web/js/source/jquery.js:8666— 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) framework/web/js/source/jquery.js:10349— 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) framework/web/js/source/jquery.js:10355— 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) framework/web/js/source/jquery.multifile.js:521— 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) framework/web/js/source/jquery.rating.js:15— 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) framework/db/schema/sqlite/CSqliteSchema.php:69— 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.
TooManyMethods: CHtml framework/web/helpers/CHtml.php:24— TooManyMethods — 101 methods. The bar is 30 methods; this is 71 over it, 3.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: CActiveRecord framework/db/ar/CActiveRecord.php:40— TooManyMethods — 92 methods. The bar is 30 methods; this is 62 over it, 3.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: CDbCommand framework/db/CDbCommand.php:64— TooManyMethods — 81 methods. The bar is 30 methods; this is 51 over it, 2.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: CHttpRequest framework/web/CHttpRequest.php:64— TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.10× 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: CController framework/web/CController.php:76— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CApplication framework/base/CApplication.php:86— TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CHttpSession framework/web/CHttpSession.php:72— TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CDbConnection framework/db/CDbConnection.php:121— 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: CWebUser framework/web/auth/CWebUser.php:58— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.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: CModel framework/base/CModel.php:29— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Text_Highlighter_Generator framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:68— 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: CDbSchema framework/db/schema/CDbSchema.php:25— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CForm framework/web/form/CForm.php:82— 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.
TooManyMethods: CActiveForm framework/web/widgets/CActiveForm.php:147— 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.
Low contrast colour pair in CSS (1.0:1) framework/gii/assets/css/print.css:17— `hr` sets color: #ccc on background-color: #ccc — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.0:1) framework/gii/assets/css/print.css:18— `hr.space` sets color: #fff on background-color: #fff — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.0:1) framework/gii/assets/css/screen.css:231— `hr` sets color: #ddd on background-color: #ddd — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.0:1) framework/gii/assets/css/screen.css:232— `hr.space` sets color: #fff on background-color: #fff — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.0:1) framework/cli/views/webapp/css/print.css:17— `hr` sets color: #ccc on background-color: #ccc — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.0:1) framework/cli/views/webapp/css/print.css:18— `hr.space` sets color: #fff on background-color: #fff — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.0:1) framework/cli/views/webapp/css/screen.css:234— `hr` sets color: #ddd on background-color: #ddd — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.0:1) framework/cli/views/webapp/css/screen.css:235— `hr.space` sets color: #fff on background-color: #fff — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.0:1) demos/blog/css/print.css:17— `hr` sets color: #ccc on background-color: #ccc — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.0:1) demos/blog/css/print.css:18— `hr.space` sets color: #fff on background-color: #fff — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.0:1) demos/blog/css/screen.css:231— `hr` sets color: #ddd on background-color: #ddd — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.0:1) demos/blog/css/screen.css:232— `hr.space` sets color: #fff on background-color: #fff — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Duplicated block (6 lines × 2) framework/base/CComponent.php:112— framework/base/CComponent.php:112-117 | framework/base/CComponent.php:152-157 — 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 `framework/base/CComponent.php:112` 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) framework/db/CDbCommand.php:355— framework/db/CDbCommand.php:355-360 | framework/db/CDbCommand.php:540-545 — 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 `framework/db/CDbCommand.php:355` 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 (6 lines × 2) framework/db/ar/CActiveRecord.php:1555— framework/db/ar/CActiveRecord.php:1555-1560 | framework/db/ar/CActiveRecord.php:1578-1583 — 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 `framework/db/ar/CActiveRecord.php:1555` 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) framework/validators/CUrlValidator.php:182— framework/validators/CUrlValidator.php:182-187 | framework/validators/CUrlValidator.php:215-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 `framework/validators/CUrlValidator.php:182` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) framework/web/services/CWsdlGenerator.php:591— framework/web/services/CWsdlGenerator.php:591-596 | framework/web/services/CWsdlGenerator.php:601-606 — 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. 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) framework/caching/CDbCache.php:109— framework/caching/CDbCache.php:109-114 | framework/caching/CFileCache.php:103-108 — 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) REDACTED:129— REDACTED:129-134 | framework/web/CExtController.php:38-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `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) framework/gii/generators/controller/ControllerCode.php:106— framework/gii/generators/controller/ControllerCode.php:106-111 | framework/gii/generators/crud/CrudCode.php:142-147 — 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 (6 lines × 2) framework/vendors/TextHighlighter/Text/Highlighter/Renderer/Array.php:173— framework/vendors/TextHighlighter/Text/Highlighter/Renderer/Array.php:173-178 | framework/vendors/TextHighlighter/Text/Highlighter/Renderer/Html.php:279-284 — 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.
ClassTooLong: CHtml framework/web/helpers/CHtml.php:24— ClassTooLong — 944 significant lines (blank, comment-only and punctuation-only lines excluded), 101 methods. The bar is 400 significant lines; this is 544 over it, 2.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CActiveRecord framework/db/ar/CActiveRecord.php:40— ClassTooLong — 624 significant lines (blank, comment-only and punctuation-only lines excluded), 92 methods. The bar is 400 significant lines; this is 224 over it, 1.56× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CJoinElement framework/db/ar/CActiveFinder.php:315— ClassTooLong — 513 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 113 over it, 1.28× 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: CHttpRequest framework/web/CHttpRequest.php:64— ClassTooLong — 498 significant lines (blank, comment-only and punctuation-only lines excluded), 63 methods. The bar is 400 significant lines; this is 98 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: Text_Highlighter_Generator framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:68— ClassTooLong — 493 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 93 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.
ClassTooLong: CDbCommand framework/db/CDbCommand.php:64— ClassTooLong — 489 significant lines (blank, comment-only and punctuation-only lines excluded), 81 methods. The bar is 400 significant lines; this is 89 over it, 1.22× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CDbCommandBuilder framework/db/schema/CDbCommandBuilder.php:21— ClassTooLong — 425 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 25 over it, 1.06× 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: CWsdlGenerator framework/web/services/CWsdlGenerator.php:154— ClassTooLong — 425 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 25 over it, 1.06× 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.
Duplicated block (7 lines × 2) framework/db/CDbCommand.php:802— framework/db/CDbCommand.php:802-808 | framework/db/CDbCommand.php:826-832 — 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) framework/db/ar/CActiveFinder.php:590— framework/db/ar/CActiveFinder.php:590-596 | framework/db/ar/CActiveFinder.php:1176-1182 — 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 `framework/db/ar/CActiveFinder.php:590` 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, `framework/db/ar/CActiveFinder.php:588` calls `array` and `framework/db/ar/CActiveFinder.php:1175` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) framework/gii/generators/controller/ControllerCode.php:82— framework/gii/generators/controller/ControllerCode.php:82-88 | framework/gii/generators/crud/CrudCode.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.
Duplicated block (7 lines × 2) framework/gii/generators/controller/ControllerCode.php:116— framework/gii/generators/controller/ControllerCode.php:116-122 | framework/gii/generators/crud/CrudCode.php:152-158 — 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) framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:509— framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:509-515 | framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:551-557 — 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) framework/web/auth/CDbAuthManager.php:95— framework/web/auth/CDbAuthManager.php:95-101 | framework/web/auth/CPhpAuthManager.php:71-77 — 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 `framework/web/auth/CDbAuthManager.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. 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) framework/base/CSecurityManager.php:246— framework/base/CSecurityManager.php:246-252 | framework/base/CSecurityManager.php:589-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. 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) framework/db/schema/cubrid/CCubridSchema.php:168— framework/db/schema/cubrid/CCubridSchema.php:168-174 | framework/db/schema/mysql/CMysqlSchema.php:201-207 — before extracting anything, compare `framework/db/schema/cubrid/CCubridSchema.php` and `framework/db/schema/mysql/CMysqlSchema.php` as WHOLE FILES: this scan already matched 4 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. 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 `framework/db/schema/cubrid/CCubridSchema.php:168` 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, `framework/db/schema/mysql/CMysqlSchema.php:208` calls `isset` and `framework/db/schema/cubrid/CCubridSchema.php:176` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) framework/collections/CQueue.php:73— framework/collections/CQueue.php:73-83 | framework/collections/CStack.php:73-83 — 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) framework/db/ar/CActiveFinder.php:654— framework/db/ar/CActiveFinder.php:654-664 | framework/db/ar/CActiveFinder.php:667-677 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) framework/db/schema/cubrid/CCubridSchema.php:122— framework/db/schema/cubrid/CCubridSchema.php:122-132 | framework/db/schema/mysql/CMysqlSchema.php:145-155 — before extracting anything, compare `framework/db/schema/cubrid/CCubridSchema.php` and `framework/db/schema/mysql/CMysqlSchema.php` as WHOLE FILES: this scan already matched 4 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. 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) framework/logging/CLogger.php:304— framework/logging/CLogger.php:304-314 | framework/logging/CProfileLogRoute.php:146-156 — 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 `framework/logging/CLogger.php:304` 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) framework/web/helpers/CHtml.php:1176— framework/web/helpers/CHtml.php:1176-1186 | framework/web/helpers/CHtml.php:1287-1297 — 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 `framework/web/helpers/CHtml.php:1176` 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 (11 lines × 2) framework/db/ar/CActiveFinder.php:601— framework/db/ar/CActiveFinder.php:601-611 | framework/db/ar/CActiveFinder.php:1185-1195 — 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 `framework/db/ar/CActiveFinder.php:601` 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) demos/blog/protected/controllers/CommentController.php:69— demos/blog/protected/controllers/CommentController.php:69-79 | REDACTED:101-111 — 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) framework/utils/CFileHelper.php:306— framework/utils/CFileHelper.php:306-310 | framework/utils/CFileHelper.php:333-337 — 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 `framework/utils/CFileHelper.php:306` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) framework/db/ar/CActiveFinder.php:546— framework/db/ar/CActiveFinder.php:546-550 | framework/db/ar/CActiveFinder.php:1039-1043 — 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) framework/db/ar/CActiveFinder.php:1466— framework/db/ar/CActiveFinder.php:1466-1470 | framework/db/ar/CActiveFinder.php:1632-1636 — 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 `framework/db/ar/CActiveFinder.php:1466` 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) framework/db/schema/CDbCommandBuilder.php:92— framework/db/schema/CDbCommandBuilder.php:92-96 | framework/db/schema/CDbCommandBuilder.php:123-127 — 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) framework/web/auth/CDbAuthManager.php:235— framework/web/auth/CDbAuthManager.php:235-239 | framework/web/auth/CDbAuthManager.php:413-417 — 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 `framework/web/auth/CDbAuthManager.php:235` 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 (5 lines × 2) framework/web/widgets/captcha/CCaptchaAction.php:269— framework/web/widgets/captcha/CCaptchaAction.php:269-273 | framework/web/widgets/captcha/CCaptchaAction.php:315-319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `framework/web/widgets/captcha/CCaptchaAction.php:269` 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) framework/zii/widgets/grid/CCheckBoxColumn.php:240— framework/zii/widgets/grid/CCheckBoxColumn.php:240-244 | framework/zii/widgets/grid/CDataColumn.php:146-150 — 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) demos/blog/protected/models/LoginForm.php:62— demos/blog/protected/models/LoginForm.php:62-74 | framework/cli/views/webapp/protected/models/LoginForm.php:65-77 — before extracting anything, compare `demos/blog/protected/models/LoginForm.php` and `framework/cli/views/webapp/protected/models/LoginForm.php` as WHOLE FILES: 100% 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.
Duplicated block (13 lines × 2) framework/db/schema/cubrid/CCubridSchema.php:143— framework/db/schema/cubrid/CCubridSchema.php:143-155 | framework/db/schema/mysql/CMysqlSchema.php:165-177 — before extracting anything, compare `framework/db/schema/cubrid/CCubridSchema.php` and `framework/db/schema/mysql/CMysqlSchema.php` as WHOLE FILES: this scan already matched 4 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. 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 `framework/db/schema/cubrid/CCubridSchema.php:143` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) framework/validators/CEmailValidator.php:200— framework/validators/CEmailValidator.php:200-212 | framework/validators/CUrlValidator.php:169-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 `framework/validators/CEmailValidator.php:200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) framework/zii/widgets/CListView.php:236— framework/zii/widgets/CListView.php:236-248 | framework/zii/widgets/grid/CGridView.php:448-463 — before extracting anything, compare `framework/zii/widgets/CListView.php` and `framework/zii/widgets/grid/CGridView.php` as WHOLE FILES: this scan already matched 3 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. 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 `framework/zii/widgets/CListView.php:236` 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 (13 lines × 2) framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:915— framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:915-927 | framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:929-941 — 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 `framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:915` 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) framework/console/CConsoleCommand.php:484— framework/console/CConsoleCommand.php:484-496 | framework/web/CBaseController.php:118-130 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) framework/caching/CCache.php:175— framework/caching/CCache.php:175-183 | framework/caching/CCache.php:199-207 — 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) framework/db/ar/CActiveRecord.php:1606— framework/db/ar/CActiveRecord.php:1606-1614 | framework/db/ar/CActiveRecord.php:1634-1642 — 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) framework/db/schema/cubrid/CCubridSchema.php:219— framework/db/schema/cubrid/CCubridSchema.php:219-227 | framework/db/schema/mysql/CMysqlSchema.php:180-188 — before extracting anything, compare `framework/db/schema/cubrid/CCubridSchema.php` and `framework/db/schema/mysql/CMysqlSchema.php` as WHOLE FILES: this scan already matched 4 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. 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 `framework/db/schema/cubrid/CCubridSchema.php:219` 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 (9 lines × 2) framework/gii/generators/controller/ControllerCode.php:93— framework/gii/generators/controller/ControllerCode.php:93-101 | framework/gii/generators/crud/CrudCode.php:129-137 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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) framework/web/widgets/CInputWidget.php:63— framework/web/widgets/CInputWidget.php:63-71 | framework/zii/widgets/jui/CJuiInputWidget.php:62-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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) framework/db/schema/CDbCommandBuilder.php:93— framework/db/schema/CDbCommandBuilder.php:93-101 | framework/db/schema/CDbCommandBuilder.php:191-199 — 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.
X19 · Unrestored process-global state· Process-global state is restored only on the happy path · ×6
Process-global state is restored only on the happy path framework/vendors/htmlpurifier/HTMLPurifier.standalone.php:3856— `unsafeIconv` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the error handler (changed at line 3858, reset at line 3860) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path.
Process-global state is restored only on the happy path framework/vendors/htmlpurifier/HTMLPurifier.standalone.php:19055— `tokenizeHTML` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the error handler (changed at line 19079, reset at line 19086) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path.
Process-global state is restored only on the happy path framework/vendors/htmlpurifier/HTMLPurifier.standalone.php:22140— `doValidate` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the error handler (changed at line 22203, reset at line 22205) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path.
Process-global state is restored only on the happy path framework/vendors/htmlpurifier/standalone/HTMLPurifier/Filter/ExtractStyleBlocks.php:135— `cleanCSS` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the error handler (changed at line 153, reset at line 155) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path.
Process-global state is restored only on the happy path framework/utils/CTimestamp.php:163— `getDate` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the default timezone (changed at line 170, put back at line 172) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path.
Process-global state is restored only on the happy path framework/gii/CCodeFile.php:65— `save` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the process umask (changed at line 72, put back at line 74) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: PHP then keeps the overwritten value for the rest of the request — and in a CLI command, a queue worker or a long-running server (Octane, Swoole, RoadRunner, FrankenPHP) for the rest of the process's life — and every later relative path, child-process launch, date, number format, XML parse or error report in ANY class reads it. That failure is silent and remote from its cause: the function that breaks is not the function that moved the value. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — `cwd` and `env` to Symfony `Process` (`new Process($command, $cwd, $env)`) or `proc_open($command, $spec, $pipes, $cwd, $env)`, absolute paths instead of `chdir`, an explicit `DateTimeZone` or locale to `DateTimeImmutable`/`IntlDateFormatter`/`NumberFormatter`, an explicit encoding to the `mb_*` call, `LIBXML_NOERROR`/`libxml_get_errors` handling in one place. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path.
MethodTooLong: Text_Highlighter_Generator.xmltag_Highlight_ framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:865— MethodTooLong — xmltag_Highlight_ runs 236 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 136 over it, 2.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: CJSON.decode framework/web/helpers/CJSON.php:331— MethodTooLong — decode runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CDateTimeParser.parse framework/utils/CDateTimeParser.php:81— MethodTooLong — parse runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CJSON.encode framework/web/helpers/CJSON.php:95— MethodTooLong — encode runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CJoinElement.applyLazyCondition framework/db/ar/CActiveFinder.php:537— MethodTooLong — applyLazyCondition runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FileTooLong: helpers/CHtml.php framework/web/helpers/CHtml.php— FileTooLong — 945 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: CHtml (24-2874). The bar is 500 significant lines; this is 445 over it, 1.89× 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: ar/CActiveFinder.php framework/db/ar/CActiveFinder.php— FileTooLong — 911 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 411 over it, 1.82× 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: ar/CActiveRecord.php framework/db/ar/CActiveRecord.php— FileTooLong — 793 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: CActiveRecord (40-1934). The bar is 500 significant lines; this is 293 over it, 1.59× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: web/CHttpRequest.php framework/web/CHttpRequest.php— FileTooLong — 559 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: CHttpRequest (64-1422). The bar is 500 significant lines; this is 59 over it, 1.12× 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: Highlighter/Generator.php framework/vendors/TextHighlighter/Text/Highlighter/Generator.php— FileTooLong — 507 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Text_Highlighter_Generator (68-1243). The bar is 500 significant lines; this is 7 over it, 1.01× 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.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×5
Edited copy of a member (3 corresponding lines) framework/web/CWebApplication.php:421— framework/web/CWebApplication.php:421-423 | framework/web/CWebModule.php:114-116 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) framework/web/CWebApplication.php:443— framework/web/CWebApplication.php:443-445 | framework/web/CWebModule.php:137-139 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) framework/web/CWebApplication.php:487— framework/web/CWebApplication.php:487-489 | framework/web/CWebModule.php:160-162 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) framework/web/widgets/CTextHighlighter.php:120— framework/web/widgets/CTextHighlighter.php:120-122 | framework/web/widgets/pagers/CLinkPager.php:235-237 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) framework/cli/commands/shell/ControllerCommand.php:171— framework/cli/commands/shell/ControllerCommand.php:171-173 | framework/cli/commands/shell/FormCommand.php:110-113 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (4 members, 50+ identical tokens) demos/blog/protected/controllers/CommentController.php:45— demos/blog/protected/controllers/CommentController.php:45-60 | REDACTED:198-214 | demos/blog/protected/controllers/SiteController.php:65-86 | framework/cli/views/webapp/protected/controllers/SiteController.php:80-98 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) framework/cli/commands/shell/CrudCommand.php:244— framework/cli/commands/shell/CrudCommand.php:244-263 | framework/cli/commands/shell/CrudCommand.php:273-292 | framework/gii/generators/crud/CrudCode.php:178-197 | framework/gii/generators/crud/CrudCode.php:207-226 — 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) framework/db/CDbCommand.php:606— framework/db/CDbCommand.php:606-629 | framework/db/CDbCommand.php:698-716 | framework/db/CDbCommand.php:1002-1017 | framework/db/CDbCommand.php:1096-1116 — 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) framework/web/helpers/CHtml.php:1900— framework/web/helpers/CHtml.php:1900-1921 | framework/web/helpers/CHtml.php:1944-1964 | framework/web/helpers/CHtml.php:2118-2138 | framework/web/helpers/CHtml.php:2180-2200 — 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 (13 corresponding lines) · ×4
Edited copy of a member (13 corresponding lines) framework/web/widgets/CActiveForm.php:980— framework/web/widgets/CActiveForm.php:980-992 | framework/web/widgets/CActiveForm.php:1009-1021 — 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) framework/db/ar/CActiveRecord.php:1555— framework/db/ar/CActiveRecord.php:1555-1567 | framework/db/ar/CActiveRecord.php:1578-1590 — 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) demos/blog/protected/controllers/SiteController.php:45— demos/blog/protected/controllers/SiteController.php:45-57 | framework/cli/views/webapp/protected/controllers/SiteController.php:54-72 — 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) framework/db/ar/CActiveRecord.php:1602— framework/db/ar/CActiveRecord.php:1602-1614 | framework/db/ar/CActiveRecord.php:1629-1642 — 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.
Duplicated block (8 lines × 2) docs/viewer/controllers/BlogController.php:64— docs/viewer/controllers/BlogController.php:64-71 | docs/viewer/controllers/GuideController.php:64-71 — before extracting anything, compare `docs/viewer/controllers/BlogController.php` and `docs/viewer/controllers/GuideController.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 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 (8 lines × 2) framework/db/ar/CActiveFinder.php:1143— framework/db/ar/CActiveFinder.php:1143-1150 | framework/db/ar/CActiveFinder.php:1557-1564 — 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 `framework/db/ar/CActiveFinder.php:1143` 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) framework/gii/generators/crud/CrudCode.php:57— framework/gii/generators/crud/CrudCode.php:57-64 | framework/gii/generators/form/FormCode.php:56-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 `framework/gii/generators/crud/CrudCode.php:57` 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 (8 lines × 2) docs/viewer/controllers/BlogController.php:106— docs/viewer/controllers/BlogController.php:106-113 | docs/viewer/controllers/GuideController.php:106-113 — before extracting anything, compare `docs/viewer/controllers/BlogController.php` and `docs/viewer/controllers/GuideController.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 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.
Swallowed exception (caught, then discarded) framework/db/schema/mysql/CMysqlSchema.php:170— `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) framework/db/schema/mssql/CMssqlSchema.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) framework/db/schema/cubrid/CCubridSchema.php:148— `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) framework/caching/CDbCache.php:275— `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.
TodoComment tests/framework/validators/CTypeValidatorTest.php:116— // TODO: the following three should be tested for actual pattern matching — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/framework/db/ar/CActiveRecord2Test.php:390— // TODO: when joining, need to replace both placeholders for the two joinin tables — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/framework/base/CStatePersisterTest.php:19— // TODO: test with cache on — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×3
Edited copy of a member (11 corresponding lines) framework/caching/CCache.php:175— framework/caching/CCache.php:175-185 | framework/caching/CCache.php:199-209 — 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) framework/db/ar/CActiveFinder.php:100— framework/db/ar/CActiveFinder.php:100-110 | framework/db/ar/CActiveFinder.php:121-134 — 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) framework/base/CSecurityManager.php:220— framework/base/CSecurityManager.php:220-230 | framework/base/CSecurityManager.php:242-252 — 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 (12 corresponding lines) · ×3
Edited copy of a member (12 corresponding lines) framework/zii/widgets/jui/CJuiProgressBar.php:61— framework/zii/widgets/jui/CJuiProgressBar.php:61-72 | framework/zii/widgets/jui/CJuiSlider.php:62-74 — 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) docs/viewer/components/MarkdownParser.php:45— docs/viewer/components/MarkdownParser.php:45-60 | framework/vendors/markdown/markdown.php:1124-1135 — 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) framework/db/schema/mssql/CMssqlSchema.php:95— framework/db/schema/mssql/CMssqlSchema.php:95-106 | framework/db/schema/sqlite/CSqliteSchema.php:54-71 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×3
Edited copy of a member (7 corresponding lines) framework/web/CHttpRequest.php:1548— framework/web/CHttpRequest.php:1548-1556 | framework/web/CHttpRequest.php:1565-1571 — 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) framework/caching/dependencies/CDbCacheDependency.php:101— framework/caching/dependencies/CDbCacheDependency.php:101-110 | framework/web/auth/CDbAuthManager.php:587-593 — 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) framework/web/CAssetManager.php:274— framework/web/CAssetManager.php:274-280 | framework/web/CAssetManager.php:296-304 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×3
Edited copy of a member (10 corresponding lines) framework/db/ar/CActiveRecord.php:136— framework/db/ar/CActiveRecord.php:136-145 | framework/db/ar/CActiveRecord.php:175-184 — 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) framework/db/schema/mysql/CMysqlColumnSchema.php:26— framework/db/schema/mysql/CMysqlColumnSchema.php:26-35 | framework/db/schema/pgsql/CPgsqlColumnSchema.php:26-35 — 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) framework/db/schema/cubrid/CCubridSchema.php:101— framework/db/schema/cubrid/CCubridSchema.php:101-111 | framework/db/schema/mysql/CMysqlSchema.php:125-134 — 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 (8 corresponding lines) · ×3
Edited copy of a member (8 corresponding lines) framework/db/CDbCommand.php:801— framework/db/CDbCommand.php:801-808 | framework/db/CDbCommand.php:825-832 — 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) framework/gii/GiiModule.php:191— framework/gii/GiiModule.php:191-198 | framework/web/auth/CAccessControlFilter.php:365-372 — 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) framework/db/schema/CDbColumnSchema.php:98— framework/db/schema/CDbColumnSchema.php:98-105 | framework/db/schema/cubrid/CCubridColumnSchema.php:26-35 — 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 (3 members, 4+ corresponding lines) · ×3
Edited copies of one member (3 members, 4+ corresponding lines) framework/db/CDbMigration.php:363— framework/db/CDbMigration.php:363-367 | framework/db/CDbMigration.php:393-396 | framework/db/CDbMigration.php:435-438 — 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.
Edited copies of one member (3 members, 4+ corresponding lines) framework/db/schema/mssql/CMssqlSchema.php:435— framework/db/schema/mssql/CMssqlSchema.php:435-439 | framework/db/schema/oci/COciSchema.php:336-340 | framework/db/schema/pgsql/CPgsqlSchema.php:418-421 — 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.
Edited copies of one member (3 members, 4+ corresponding lines) framework/web/widgets/CAutoComplete.php:256— framework/web/widgets/CAutoComplete.php:256-259 | framework/web/widgets/CStarRating.php:141-144 | framework/web/widgets/CTabView.php:173-176 — 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 copy of a member (4 corresponding lines) · ×3
Edited copy of a member (4 corresponding lines) framework/db/ar/CActiveRecord.php:1507— framework/db/ar/CActiveRecord.php:1507-1510 | framework/db/ar/CActiveRecord.php:1541-1544 — 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) framework/gii/generators/controller/ControllerCode.php:74— framework/gii/generators/controller/ControllerCode.php:74-77 | framework/gii/generators/crud/CrudCode.php:110-113 — 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) docs/viewer/controllers/BlogController.php:76— docs/viewer/controllers/BlogController.php:76-79 | docs/viewer/controllers/GuideController.php:76-79 — 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 (14 lines × 2) framework/db/schema/mysql/CMysqlSchema.php:91— framework/db/schema/mysql/CMysqlSchema.php:91-104 | framework/db/schema/oci/COciSchema.php:371-385 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `framework/db/schema/oci/COciSchema.php:386` calls `getDbConnection`, `createCommand`, `execute` and `framework/db/schema/mysql/CMysqlSchema.php:105` 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 × 2) framework/web/helpers/CHtml.php:2118— framework/web/helpers/CHtml.php:2118-2131 | framework/web/helpers/CHtml.php:2180-2193 — 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) framework/web/helpers/CHtml.php:1900— framework/web/helpers/CHtml.php:1900-1913 | framework/web/helpers/CHtml.php:1944-1957 — 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 `framework/web/helpers/CHtml.php:1900` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) framework/db/CDbMigration.php:55— framework/db/CDbMigration.php:55-66 | framework/db/CDbMigration.php:81-92 — 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 `framework/db/CDbMigration.php:55` 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 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) framework/db/schema/mysql/CMysqlSchema.php:174— framework/db/schema/mysql/CMysqlSchema.php:174-185 | framework/db/schema/sqlite/CSqliteSchema.php:138-149 — 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 `framework/db/schema/mysql/CMysqlSchema.php:174` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) framework/vendors/TextHighlighter/Text/Highlighter/Renderer/BB.php:180— framework/vendors/TextHighlighter/Text/Highlighter/Renderer/BB.php:180-191 | framework/vendors/TextHighlighter/Text/Highlighter/Renderer/HtmlTags.php:146-157 — 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 `framework/vendors/TextHighlighter/Text/Highlighter/Renderer/BB.php:180` 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.
AC3 · Page structure· Data table has no header cells · ×2
Data table has no header cells framework/views/ar/exception.php:175— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells framework/views/da/exception.php:175— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Low contrast colour pair in CSS (2.7:1) framework/cli/views/webapp/css/main.css:77— `#mainmenu ul li a:hover, #mainmenu ul li.active a` sets color: #6399cd on background-color: #EFF4FA — 2.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.7:1) demos/blog/css/main.css:77— `#mainmenu ul li a:hover, #mainmenu ul li.active a` sets color: #6399cd on background-color: #EFF4FA — 2.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (6 members, 50+ identical tokens) framework/web/widgets/CAutoComplete.php:203— framework/web/widgets/CAutoComplete.php:203-222 | framework/web/widgets/CMaskedTextField.php:58-74 | framework/web/widgets/CStarRating.php:103-115 | framework/zii/widgets/jui/CJuiAutoComplete.php:75-95 | framework/zii/widgets/jui/CJuiButton.php:104-172 | framework/zii/widgets/jui/CJuiDatePicker.php:72-126 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) framework/zii/widgets/jui/CJuiDialog.php:64— framework/zii/widgets/jui/CJuiDialog.php:64-75 | framework/zii/widgets/jui/CJuiDraggable.php:57-68 | framework/zii/widgets/jui/CJuiDroppable.php:57-68 | framework/zii/widgets/jui/CJuiResizable.php:57-68 | framework/zii/widgets/jui/CJuiSelectable.php:68-80 | framework/zii/widgets/jui/CJuiSortable.php:72-84 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×2
Edited copy of a member (33 corresponding lines) framework/validators/CExistValidator.php:72— framework/validators/CExistValidator.php:72-104 | framework/validators/CUniqueValidator.php:82-135 — 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) framework/logging/CLogger.php:296— framework/logging/CLogger.php:296-328 | framework/logging/CProfileLogRoute.php:96-129 — 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) framework/web/helpers/CHtml.php:1034— framework/web/helpers/CHtml.php:1034-1060 | framework/web/helpers/CHtml.php:2007-2030 — 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) framework/db/schema/CDbCriteria.php:286— framework/db/schema/CDbCriteria.php:286-309 | framework/db/schema/CDbCriteria.php:327-350 — 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 copy of a member (23 corresponding lines) · ×2
Edited copy of a member (23 corresponding lines) framework/base/CComponent.php:109— framework/base/CComponent.php:109-131 | framework/base/CComponent.php:149-173 — 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.
Edited copy of a member (23 corresponding lines) framework/web/auth/CDbAuthManager.php:93— framework/web/auth/CDbAuthManager.php:93-119 | framework/web/auth/CPhpAuthManager.php:68-90 — 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 (19 corresponding lines) · ×2
Edited copy of a member (19 corresponding lines) framework/base/CApplication.php:901— framework/base/CApplication.php:901-931 | framework/console/CConsoleApplication.php:117-135 — 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) framework/cli/commands/MigrateCommand.php:409— framework/cli/commands/MigrateCommand.php:409-429 | framework/cli/commands/MigrateCommand.php:434-452 — 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 (14 corresponding lines) · ×2
Edited copy of a member (14 corresponding lines) framework/utils/CFileHelper.php:306— framework/utils/CFileHelper.php:306-319 | framework/utils/CFileHelper.php:333-346 — 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) framework/db/schema/mysql/CMysqlSchema.php:91— framework/db/schema/mysql/CMysqlSchema.php:91-104 | framework/db/schema/oci/COciSchema.php:371-388 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×2
Edited copy of a member (17 corresponding lines) framework/base/CSecurityManager.php:122— framework/base/CSecurityManager.php:122-138 | framework/base/CSecurityManager.php:160-176 — 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) framework/db/CDbMigration.php:50— framework/db/CDbMigration.php:50-66 | framework/db/CDbMigration.php:76-92 — 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 (9 corresponding lines) · ×2
Edited copy of a member (9 corresponding lines) framework/db/CDbTransaction.php:61— framework/db/CDbTransaction.php:61-69 | framework/db/CDbTransaction.php:78-86 — 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) framework/caching/dependencies/CCacheDependency.php:53— framework/caching/dependencies/CCacheDependency.php:53-61 | framework/caching/dependencies/CCacheDependency.php:69-77 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×2
Edited copy of a member (5 corresponding lines) framework/cli/commands/shell/ModelCommand.php:115— framework/cli/commands/shell/ModelCommand.php:115-119 | framework/gii/generators/model/ModelCode.php:370-375 — 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) framework/collections/CTypedList.php:45— framework/collections/CTypedList.php:45-49 | framework/collections/CTypedMap.php:45-49 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 3+ corresponding lines) · ×2
Edited copies of one member (3 members, 3+ corresponding lines) framework/base/CApplication.php:266— framework/base/CApplication.php:266-268 | framework/base/CModule.php:163-165 | framework/web/CThemeManager.php:108-110 — 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) demos/blog/protected/models/LoginForm.php:51— demos/blog/protected/models/LoginForm.php:51-53 | framework/cli/views/webapp/protected/models/LoginForm.php:51-56 | framework/gii/models/LoginForm.php:27-29 — 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 (26 lines × 2) framework/cli/commands/shell/ModelCommand.php:402— framework/cli/commands/shell/ModelCommand.php:402-427 | framework/gii/generators/model/ModelCode.php:231-256 — 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 `framework/cli/commands/shell/ModelCommand.php:402` 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 (26 lines × 2) framework/console/CConsoleCommand.php:506— framework/console/CConsoleCommand.php:506-531 | framework/gii/CCodeModel.php:408-433 — 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 lines × 2) demos/blog/protected/controllers/SiteController.php:68— demos/blog/protected/controllers/SiteController.php:68-86 | framework/cli/views/webapp/protected/controllers/SiteController.php:80-98 — before extracting anything, compare `demos/blog/protected/controllers/SiteController.php` and `framework/cli/views/webapp/protected/controllers/SiteController.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `demos/blog/protected/controllers/SiteController.php:65` calls `defined`, `CHttpException` and `framework/cli/views/webapp/protected/controllers/SiteController.php:79` 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 (19 lines × 2) framework/db/ar/CActiveFinder.php:570— framework/db/ar/CActiveFinder.php:570-588 | framework/db/ar/CActiveFinder.php:1158-1176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `framework/db/ar/CActiveFinder.php:570` 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, `framework/db/ar/CActiveFinder.php:590` calls `array` and `framework/db/ar/CActiveFinder.php:1177` 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 (17 lines × 2) framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:1120— framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:1120-1136 | framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:1181-1197 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) framework/zii/widgets/CListView.php:254— framework/zii/widgets/CListView.php:254-270 | framework/zii/widgets/grid/CGridView.php:476-492 — before extracting anything, compare `framework/zii/widgets/CListView.php` and `framework/zii/widgets/grid/CGridView.php` as WHOLE FILES: this scan already matched 3 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. 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 `framework/zii/widgets/CListView.php:254` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) docs/viewer/controllers/BlogController.php:118— docs/viewer/controllers/BlogController.php:118-132 | docs/viewer/controllers/GuideController.php:118-132 — before extracting anything, compare `docs/viewer/controllers/BlogController.php` and `docs/viewer/controllers/GuideController.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) framework/base/CApplication.php:755— framework/base/CApplication.php:755-769 | framework/base/CApplication.php:837-851 — 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 `framework/base/CApplication.php:755` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) framework/base/CErrorHandler.php:186— framework/base/CErrorHandler.php:186-195 | framework/base/CErrorHandler.php:235-244 — 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 `framework/base/CErrorHandler.php:186` 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) framework/web/widgets/CAutoComplete.php:204— framework/web/widgets/CAutoComplete.php:204-213 | framework/web/widgets/CMaskedTextField.php:62-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.
Duplicated block (9 lines × 3) framework/cli/commands/MigrateCommand.php:99— framework/cli/commands/MigrateCommand.php:99-108 | framework/cli/commands/MigrateCommand.php:136-144 | framework/cli/commands/MigrateCommand.php:172-180 — 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 `framework/cli/commands/MigrateCommand.php:99` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) framework/zii/widgets/CDetailView.php:156— framework/zii/widgets/CDetailView.php:156-164 | framework/zii/widgets/CListView.php:216-224 | framework/zii/widgets/grid/CGridView.php:365-373 — before extracting anything, compare `framework/zii/widgets/CListView.php` and `framework/zii/widgets/grid/CGridView.php` as WHOLE FILES: this scan already matched 3 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. 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 `framework/zii/widgets/CDetailView.php:156` 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) framework/validators/CBooleanValidator.php:56— framework/validators/CBooleanValidator.php:56-62 | framework/validators/CEmailValidator.php:76-82 | framework/validators/CTypeValidator.php:92-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 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `framework/validators/CBooleanValidator.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. 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 (7 lines × 3) demos/blog/protected/controllers/SiteController.php:31— demos/blog/protected/controllers/SiteController.php:31-37 | framework/cli/views/webapp/protected/controllers/SiteController.php:40-46 | framework/gii/controllers/DefaultController.php:22-28 — before extracting anything, compare `demos/blog/protected/controllers/SiteController.php` and `framework/cli/views/webapp/protected/controllers/SiteController.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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.
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 docs/viewer/controllers/BlogController.php:121— `opendir()` is called here and hands back a handle the caller must close — and it is held in `$dir`, and every use of `$dir` 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.
Disposable created and abandoned in the function that made it docs/viewer/controllers/GuideController.php:121— `opendir()` is called here and hands back a handle the caller must close — and it is held in `$dir`, and every use of `$dir` 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.
X27 · Collection changed while being enumerated· Collection is structurally changed while it is being enumerated · ×2
Collection is structurally changed while it is being enumerated framework/zii/widgets/CListView.php:285— line 285 walks `$data` by value, so the walk is the snapshot taken when the loop began, and line 287 changes that same collection with `$data = …` before the next iteration: the loop carries on over the old value while the body now works on the new one. PHP raises nothing, so the loop completes over a different set than the code meant.
Collection is structurally changed while it is being enumerated framework/vendors/htmlpurifier/HTMLPurifier.standalone.php:20453— line 20453 walks `$this->injectors` by value, so the walk is the snapshot taken when the loop began, and line 20458 changes that same collection with `array_splice($this->injectors, …)` before the next iteration: every later key and position names a different element than the loop began with (keys shift). PHP raises nothing, so the loop completes over a different set than the code meant.
AC1 · Text alternatives· <object> without a text alternative · ×1
<object> without a text alternative framework/web/js/source/jquery.js:4530— A <object> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC1 · Text alternatives· <embed> without a text alternative · ×1
<embed> without a text alternative framework/web/widgets/views/flexWidget.php:83— An <embed> has no fallback-content mechanism, so it needs an aria-label/aria-labelledby/title to be described.
AC2 · Forms & labels· <fieldset> without a <legend> · ×1
<fieldset> without a <legend> framework/web/js/source/jquery.js:4526— A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
Low contrast colour pair in CSS (3.8:1) framework/web/js/source/jui/css/base/jquery-ui.css:7— `.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover` sets color: #fff on background-color: #007fff — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
Low contrast colour pair in CSS (3.9:1) framework/gii/assets/css/main.css:435— `div.form.gii pre.results` sets color: white on background-color: gray — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.3:1) docs/css/main.css:2— `body` sets color: #555 on background-color: #666 — 1.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
CDateTimeParser.parse (cyclomatic 72) framework/utils/CDateTimeParser.php:81— CDateTimeParser.parse has cyclomatic complexity 72 (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.
CJSON.decode (cyclomatic 71) framework/web/helpers/CJSON.php:331— CJSON.decode has cyclomatic complexity 71 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
CTimestamp.formatDate (cyclomatic 63) framework/utils/CTimestamp.php:216— CTimestamp.formatDate has cyclomatic complexity 63 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
Text_Highlighter_Generator.xmltag_Highlight_ (cyclomatic 60) framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:865— Text_Highlighter_Generator.xmltag_Highlight_ has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CDbCriteria.mergeWith (cyclomatic 53) framework/db/schema/CDbCriteria.php:504— CDbCriteria.mergeWith 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.
CStatElement.queryManyMany (cyclomatic 35) framework/db/ar/CActiveFinder.php:1535— CStatElement.queryManyMany has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CJSON.encode (cyclomatic 35) framework/web/helpers/CJSON.php:95— CJSON.encode has cyclomatic complexity 35 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
CJoinElement.applyLazyCondition (cyclomatic 33) framework/db/ar/CActiveFinder.php:537— CJoinElement.applyLazyCondition 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.
CBaseActiveRelation.mergeWith (cyclomatic 32) framework/db/ar/CActiveRecord.php:2023— CBaseActiveRelation.mergeWith has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CFileValidator.validateFile (cyclomatic 32) framework/validators/CFileValidator.php:192— CFileValidator.validateFile has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CCompareValidator.validateAttribute (cyclomatic 31) framework/validators/CCompareValidator.php:82— CCompareValidator.validateAttribute 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.
tooltip.Tooltip (cyclomatic 31) framework/gii/assets/js/tooltip.js:135— tooltip.Tooltip has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 9 of the 31 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 193, 283, 162, …). 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.
CDbCommand.processConditions (cyclomatic 28) framework/db/CDbCommand.php:1511— CDbCommand.processConditions 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.
Text_Highlighter._getToken (cyclomatic 27) framework/vendors/TextHighlighter/Text/Highlighter.php:246— Text_Highlighter._getToken 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.
CUrlRule.createUrl (cyclomatic 27) framework/web/CUrlManager.php:728— CUrlRule.createUrl 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.
CWsdlGenerator.addTypes (cyclomatic 27) framework/web/services/CWsdlGenerator.php:533— CWsdlGenerator.addTypes 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.
CActiveFinder.buildJoinTree (cyclomatic 25) framework/db/ar/CActiveFinder.php:201— CActiveFinder.buildJoinTree 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.
CJoinElement.joinManyMany (cyclomatic 25) framework/db/ar/CActiveFinder.php:1139— CJoinElement.joinManyMany 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.
YiiBase.import (cyclomatic 24) framework/YiiBase.php:270— YiiBase.import 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.
YiiBase.autoload (cyclomatic 24) framework/YiiBase.php:407— YiiBase.autoload 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.
ModelCommand.generateModel (cyclomatic 24) framework/cli/commands/shell/ModelCommand.php:381— ModelCommand.generateModel 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.
CStatElement.queryOneMany (cyclomatic 24) framework/db/ar/CActiveFinder.php:1422— CStatElement.queryOneMany 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.
CHtml.activeInputField (cyclomatic 24) framework/web/helpers/CHtml.php:2482— CHtml.activeInputField has cyclomatic complexity 24 (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.
CActiveForm.error (cyclomatic 24) framework/web/widgets/CActiveForm.php:445— CActiveForm.error 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.
jquery.yiilistview.$.fn.yiiListView.update (cyclomatic 24) framework/zii/widgets/assets/listview/jquery.yiilistview.js:108— jquery.yiilistview.$.fn.yiiListView.update has cyclomatic complexity 24 (threshold 15). Of this number, 13 points are the body's own statements and 11 belong to 2 function literals 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.
Utf8Command.run (cyclomatic 23) build/commands/Utf8Command.php:44— Utf8Command.run 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.
CDetailView.run (cyclomatic 23) framework/zii/widgets/CDetailView.php:171— CDetailView.run 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.
CHtml.listOptions (cyclomatic 22) framework/web/helpers/CHtml.php:2542— CHtml.listOptions 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.
CUrlRule.parseUrl (cyclomatic 21) framework/web/CUrlManager.php:814— CUrlRule.parseUrl 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.
ModelCommand.run (cyclomatic 20) framework/cli/commands/shell/ModelCommand.php:248— ModelCommand.run 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.
CConsoleCommand.run (cyclomatic 20) framework/console/CConsoleCommand.php:117— CConsoleCommand.run 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.
CActiveRecord.getRelated (cyclomatic 20) framework/db/ar/CActiveRecord.php:252— CActiveRecord.getRelated 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.
CDbCommandBuilder.createInCondition (cyclomatic 20) framework/db/schema/CDbCommandBuilder.php:763— CDbCommandBuilder.createInCondition 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.
CHtml.clientChange (cyclomatic 20) framework/web/helpers/CHtml.php:2631— CHtml.clientChange 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.
CSecurityManager.generateRandomBytes (cyclomatic 19) framework/base/CSecurityManager.php:391— CSecurityManager.generateRandomBytes 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.
CDbCommand.queryInternal (cyclomatic 19) framework/db/CDbCommand.php:470— CDbCommand.queryInternal 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.
CJoinElement.populateRecord (cyclomatic 19) framework/db/ar/CActiveFinder.php:820— CJoinElement.populateRecord 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.
CDbCommandBuilder.createCountCommand (cyclomatic 19) framework/db/schema/CDbCommandBuilder.php:111— CDbCommandBuilder.createCountCommand 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.
CHttpRequest.getHostInfo (cyclomatic 19) framework/web/CHttpRequest.php:343— CHttpRequest.getHostInfo 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.
CUrlRule.__construct (cyclomatic 19) framework/web/CUrlManager.php:657— CUrlRule.__construct 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.
MessageCommand.generateMessageFile (cyclomatic 18) framework/cli/commands/MessageCommand.php:164— MessageCommand.generateMessageFile 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.
CJoinElement.getColumnSelect (cyclomatic 18) framework/db/ar/CActiveFinder.php:912— CJoinElement.getColumnSelect 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.
CJavaScript.encode (cyclomatic 18) framework/web/helpers/CJavaScript.php:63— CJavaScript.encode 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.
CMenu.renderMenuRecursive (cyclomatic 18) framework/zii/widgets/CMenu.php:191— CMenu.renderMenuRecursive 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.
ApiModel.checkSource (cyclomatic 17) build/commands/api/ApiModel.php:617— ApiModel.checkSource 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.
MessageCommand.run (cyclomatic 17) framework/cli/commands/MessageCommand.php:75— MessageCommand.run 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.
ModelCode.generateRules (cyclomatic 17) framework/gii/generators/model/ModelCode.php:220— ModelCode.generateRules 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.
CVarDumper.dumpInternal (cyclomatic 17) framework/utils/CVarDumper.php:72— CVarDumper.dumpInternal 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.
CCompareValidator.clientValidateAttribute (cyclomatic 17) framework/validators/CCompareValidator.php:139— CCompareValidator.clientValidateAttribute 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.
CUniqueValidator.validateAttribute (cyclomatic 17) framework/validators/CUniqueValidator.php:80— CUniqueValidator.validateAttribute 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.
CAssetManager.publish (cyclomatic 17) framework/web/CAssetManager.php:206— CAssetManager.publish 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.
CSort.getOrderBy (cyclomatic 17) framework/web/CSort.php:232— CSort.getOrderBy 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.
CWebApplication.createController (cyclomatic 17) framework/web/CWebApplication.php:310— CWebApplication.createController 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.
CHtml.checkBoxList (cyclomatic 17) framework/web/helpers/CHtml.php:1143— CHtml.checkBoxList 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.
CMenu.normalizeItems (cyclomatic 17) framework/zii/widgets/CMenu.php:263— CMenu.normalizeItems 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.
ApiModel.processClass (cyclomatic 16) build/commands/api/ApiModel.php:75— ApiModel.processClass 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.
CErrorHandler.handleError (cyclomatic 16) framework/base/CErrorHandler.php:228— CErrorHandler.handleError 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.
CDbCommand.buildQuery (cyclomatic 16) framework/db/CDbCommand.php:558— CDbCommand.buildQuery 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.
CNumberValidator.validateAttribute (cyclomatic 16) framework/validators/CNumberValidator.php:76— CNumberValidator.validateAttribute 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.
CStringValidator.validateAttribute (cyclomatic 16) framework/validators/CStringValidator.php:77— CStringValidator.validateAttribute 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.
Text_Highlighter_Renderer_Html.finalize (cyclomatic 16) framework/vendors/TextHighlighter/Text/Highlighter/Renderer/Html.php:292— Text_Highlighter_Renderer_Html.finalize 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.
CWebService.run (cyclomatic 16) framework/web/services/CWebService.php:161— CWebService.run 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.
Text_Highlighter_Generator.xmltag_Highlight_ (cognitive 124) framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:865— Text_Highlighter_Generator.xmltag_Highlight_ has cognitive complexity 124 (threshold 15). Drivers by points: if/else 33 (80 pts), loops 22 (39 pts), boolean chains 5 (nesting depth added 64). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CDateTimeParser.parse (cognitive 115) framework/utils/CDateTimeParser.php:81— CDateTimeParser.parse has cognitive complexity 115 (threshold 15). Drivers by points: if/else 33 (74 pts), ternaries 11 (28 pts), boolean chains 10, match/switch 1 (2 pts), loops 1 (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CTimestamp.formatDate (cognitive 100) framework/utils/CTimestamp.php:216— CTimestamp.formatDate has cognitive complexity 100 (threshold 15). Drivers by points: if/else 36 (73 pts), ternaries 8 (23 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 53). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
CJSON.decode (cognitive 100) framework/web/helpers/CJSON.php:331— CJSON.decode has cognitive complexity 100 (threshold 15). Drivers by points: if/else 19 (61 pts), boolean chains 20, loops 3 (11 pts), match/switch 2 (5 pts), ternaries 1 (3 pts) (nesting depth added 55). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
CJoinElement.applyLazyCondition (cognitive 92) framework/db/ar/CActiveFinder.php:537— CJoinElement.applyLazyCondition has cognitive complexity 92 (threshold 15). Drivers by points: if/else 25 (60 pts), ternaries 4 (15 pts), loops 6 (14 pts), boolean chains 3 (nesting depth added 54). 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.
Text_Highlighter._getToken (cognitive 91) framework/vendors/TextHighlighter/Text/Highlighter.php:246— Text_Highlighter._getToken has cognitive complexity 91 (threshold 15). Drivers by points: if/else 22 (72 pts), loops 4 (16 pts), boolean chains 3 (nesting depth added 62). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CDbCriteria.mergeWith (cognitive 82) framework/db/schema/CDbCriteria.php:504— CDbCriteria.mergeWith has cognitive complexity 82 (threshold 15). Drivers by points: if/else 32 (55 pts), ternaries 4 (14 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CWsdlGenerator.addTypes (cognitive 77) framework/web/services/CWsdlGenerator.php:533— CWsdlGenerator.addTypes has cognitive complexity 77 (threshold 15). Drivers by points: if/else 17 (50 pts), loops 5 (13 pts), ternaries 3 (11 pts), boolean chains 3 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Utf8Command.run (cognitive 59) build/commands/Utf8Command.php:44— Utf8Command.run has cognitive complexity 59 (threshold 15). Drivers by points: if/else 25 (49 pts), loops 3 (9 pts), boolean chains 1 (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.
CStatElement.queryManyMany (cognitive 57) framework/db/ar/CActiveFinder.php:1535— CStatElement.queryManyMany has cognitive complexity 57 (threshold 15). Drivers by points: if/else 15 (22 pts), ternaries 11 (18 pts), loops 8 (14 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CSort.getOrderBy (cognitive 57) framework/web/CSort.php:232— CSort.getOrderBy has cognitive complexity 57 (threshold 15). Drivers by points: ternaries 7 (32 pts), if/else 9 (22 pts), loops 1 (2 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.
YiiBase.import (cognitive 53) framework/YiiBase.php:270— YiiBase.import has cognitive complexity 53 (threshold 15). Drivers by points: if/else 25 (47 pts), boolean chains 6 (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.
CDbCommandBuilder.createInCondition (cognitive 47) framework/db/schema/CDbCommandBuilder.php:763— CDbCommandBuilder.createInCondition has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (29 pts), loops 4 (10 pts), ternaries 2 (7 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.
CActiveFinder.buildJoinTree (cognitive 46) framework/db/ar/CActiveFinder.php:201— CActiveFinder.buildJoinTree has cognitive complexity 46 (threshold 15). Drivers by points: if/else 22 (43 pts), boolean chains 2, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CFileValidator.validateFile (cognitive 46) framework/validators/CFileValidator.php:192— CFileValidator.validateFile has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (25 pts), ternaries 6 (14 pts), boolean chains 7 (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.
CDbCommand.processConditions (cognitive 45) framework/db/CDbCommand.php:1511— CDbCommand.processConditions has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 4 (11 pts), boolean chains 7, loops 3 (6 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.
CJoinElement.populateRecord (cognitive 44) framework/db/ar/CActiveFinder.php:820— CJoinElement.populateRecord has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (34 pts), loops 4 (7 pts), boolean chains 3 (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.
CStatElement.queryOneMany (cognitive 44) framework/db/ar/CActiveFinder.php:1422— CStatElement.queryOneMany has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 8 (16 pts), ternaries 7 (8 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.
CCompareValidator.validateAttribute (cognitive 44) framework/validators/CCompareValidator.php:82— CCompareValidator.validateAttribute has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 7 (20 pts), if/else 10 (16 pts), boolean chains 7, match/switch 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.
CJoinElement.getColumnSelect (cognitive 43) framework/db/ar/CActiveFinder.php:912— CJoinElement.getColumnSelect has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 4 (11 pts), boolean chains 2 (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.
CJoinElement.joinManyMany (cognitive 43) framework/db/ar/CActiveFinder.php:1139— CJoinElement.joinManyMany has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (22 pts), ternaries 3 (10 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CUrlRule.createUrl (cognitive 43) framework/web/CUrlManager.php:728— CUrlRule.createUrl has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (27 pts), loops 5 (8 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CDetailView.run (cognitive 42) framework/zii/widgets/CDetailView.php:171— CDetailView.run has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (25 pts), ternaries 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YiiBase.autoload (cognitive 41) framework/YiiBase.php:407— YiiBase.autoload has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 10, loops 2 (5 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CTreeView.saveDataAsHtml (cognitive 39) framework/web/widgets/CTreeView.php:183— CTreeView.saveDataAsHtml has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (29 pts), ternaries 2 (7 pts), loops 1 (2 pts), boolean chains 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.
ModelCommand.generateModel (cognitive 38) framework/cli/commands/shell/ModelCommand.php:381— ModelCommand.generateModel has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 5, loops 2 (5 pts), ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CHtml.listOptions (cognitive 38) framework/web/helpers/CHtml.php:2542— CHtml.listOptions has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 3 (7 pts), loops 3 (5 pts), boolean chains 4 (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.
tooltip.Tooltip (cognitive 38) framework/gii/assets/js/tooltip.js:135— tooltip.Tooltip has cognitive complexity 38 (threshold 15). Drivers by points: if/else 24 (32 pts), boolean chains 5, ternaries 1 (nesting depth added 8). Most of this is not in the body itself: 6 of the 38 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 193, 283, 162, …). 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.
ApiModel.checkSource (cognitive 37) build/commands/api/ApiModel.php:617— ApiModel.checkSource has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 3 (7 pts), boolean chains 5 (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.
CFileValidator.validateAttribute (cognitive 37) framework/validators/CFileValidator.php:142— CFileValidator.validateAttribute has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 3 (11 pts), loops 1 (3 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.
CWebApplication.createController (cognitive 36) framework/web/CWebApplication.php:310— CWebApplication.createController has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (25 pts), ternaries 2 (8 pts), boolean chains 2, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CActiveForm.error (cognitive 36) framework/web/widgets/CActiveForm.php:445— CActiveForm.error has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 4, loops 2 (3 pts), ternaries 2 (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.
CConsoleCommand.run (cognitive 34) framework/console/CConsoleCommand.php:117— CConsoleCommand.run has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 2 (6 pts), boolean chains 3, loops 2 (3 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.
CBaseActiveRelation.mergeWith (cognitive 34) framework/db/ar/CActiveRecord.php:2023— CBaseActiveRelation.mergeWith has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 8, ternaries 2 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageCommand.generateMessageFile (cognitive 33) framework/cli/commands/MessageCommand.php:164— MessageCommand.generateMessageFile has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 4 (8 pts), boolean chains 4 (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.
ModelCommand.run (cognitive 33) framework/cli/commands/shell/ModelCommand.php:248— ModelCommand.run has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (23 pts), ternaries 4 (6 pts), loops 3 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CMenu.renderMenuRecursive (cognitive 33) framework/zii/widgets/CMenu.php:191— CMenu.renderMenuRecursive has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 3 (8 pts), boolean chains 5, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CDbCommandBuilder.createCountCommand (cognitive 32) framework/db/schema/CDbCommandBuilder.php:111— CDbCommandBuilder.createCountCommand has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 3 (8 pts), ternaries 3 (6 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CHttpRequest.parseAcceptHeader (cognitive 32) framework/web/CHttpRequest.php:941— CHttpRequest.parseAcceptHeader has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 2 (5 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.
CUrlRule.parseUrl (cognitive 32) framework/web/CUrlManager.php:814— CUrlRule.parseUrl has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 5, loops 2 (4 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.
CHtml.clientChange (cognitive 32) framework/web/helpers/CHtml.php:2631— CHtml.clientChange has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21 (25 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
GiiModule.findGenerators (cognitive 31) framework/gii/GiiModule.php:205— GiiModule.findGenerators has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 3 (8 pts), boolean chains 4 (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.
CHttpRequest.getHostInfo (cognitive 31) framework/web/CHttpRequest.php:343— CHttpRequest.getHostInfo has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 9, ternaries 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.
MigrateCommand.actionMark (cognitive 30) framework/cli/commands/MigrateCommand.php:273— MigrateCommand.actionMark has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 4 (11 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.
CUrlRule.__construct (cognitive 30) framework/web/CUrlManager.php:657— CUrlRule.__construct has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (21 pts), loops 3 (6 pts), boolean chains 3 (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.
YiiBase.t (cognitive 29) framework/YiiBase.php:613— YiiBase.t has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 1 (5 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CrudCommand.run (cognitive 29) framework/cli/commands/shell/CrudCommand.php:87— CrudCommand.run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 5 (11 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.
ModelCode.validateTableName (cognitive 29) framework/gii/generators/model/ModelCode.php:117— ModelCode.validateTableName has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (25 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.
CSort.getDirections (cognitive 29) framework/web/CSort.php:341— CSort.getDirections has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 1 (3 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.
CHtml.errorSummary (cognitive 29) framework/web/helpers/CHtml.php:2222— CHtml.errorSummary has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CWsdlGenerator.processType (cognitive 29) framework/web/services/CWsdlGenerator.php:367— CWsdlGenerator.processType has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 1 (2 pts), ternaries 1 (2 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.
CMenu.normalizeItems (cognitive 29) framework/zii/widgets/CMenu.php:263— CMenu.normalizeItems has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 5, ternaries 1 (2 pts), loops 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.
CApplication.handleError (cognitive 28) framework/base/CApplication.php:795— CApplication.handleError has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), error handling 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CMssqlCommandBuilder.findOrdering (cognitive 28) framework/db/schema/mssql/CMssqlCommandBuilder.php:266— CMssqlCommandBuilder.findOrdering has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CHttpRequest.compareAcceptTypes (cognitive 28) framework/web/CHttpRequest.php:1004— CHttpRequest.compareAcceptTypes has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 4 (14 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CWsdlGenerator.getWsdlElementAttributes (cognitive 28) framework/web/services/CWsdlGenerator.php:450— CWsdlGenerator.getWsdlElementAttributes has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (13 pts), ternaries 2 (11 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CldrCommand.parseMonthNames (cognitive 27) build/commands/CldrCommand.php:293— CldrCommand.parseMonthNames has cognitive complexity 27 (threshold 15). Drivers by points: loops 6 (18 pts), if/else 5 (9 pts) (nesting depth added 16). 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.
CActiveRecord.getRelated (cognitive 27) framework/db/ar/CActiveRecord.php:252— CActiveRecord.getRelated has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 7, 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.
CDbCommandBuilder.composeMultipleInsertCommand (cognitive 27) framework/db/schema/CDbCommandBuilder.php:278— CDbCommandBuilder.composeMultipleInsertCommand has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 7 (12 pts), ternaries 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Text_Highlighter_Renderer_Html.finalize (cognitive 27) framework/vendors/TextHighlighter/Text/Highlighter/Renderer/Html.php:292— Text_Highlighter_Renderer_Html.finalize has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, 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.
CHtml.activeInputField (cognitive 27) framework/web/helpers/CHtml.php:2482— CHtml.activeInputField has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 15, if/else 5 (9 pts), loops 1 (3 pts) (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CDbCommand.queryInternal (cognitive 26) framework/db/CDbCommand.php:470— CDbCommand.queryInternal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (2 pts), error handling 1 (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.
CFilterChain.create (cognitive 26) framework/web/filters/CFilterChain.php:57— CFilterChain.create has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (23 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CWsdlGenerator.buildHtmlDocs (cognitive 26) framework/web/services/CWsdlGenerator.php:830— CWsdlGenerator.buildHtmlDocs has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 3 (12 pts), if/else 4 (6 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CConsoleCommand.copyFiles (cognitive 25) framework/console/CConsoleCommand.php:369— CConsoleCommand.copyFiles has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 2 (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.
CDbSchema.getTable (cognitive 25) framework/db/schema/CDbSchema.php:72— CDbSchema.getTable has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 6 (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.
CProfileLogRoute.displaySummary (cognitive 25) framework/logging/CProfileLogRoute.php:137— CProfileLogRoute.displaySummary has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CNumberValidator.validateAttribute (cognitive 25) framework/validators/CNumberValidator.php:76— CNumberValidator.validateAttribute has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (12 pts), if/else 8 (10 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.
CClientScript.remapScripts (cognitive 25) framework/web/CClientScript.php:259— CClientScript.remapScripts has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (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.
CWebService.run (cognitive 25) framework/web/services/CWebService.php:161— CWebService.run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 4, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CConsoleCommand.getOptionHelp (cognitive 24) framework/console/CConsoleCommand.php:302— CConsoleCommand.getOptionHelp has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (4 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CValidator.createValidator (cognitive 24) framework/validators/CValidator.php:129— CValidator.createValidator has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (20 pts), loops 1 (2 pts), ternaries 2 (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.
CHttpRequest.sendFile (cognitive 24) framework/web/CHttpRequest.php:1137— CHttpRequest.sendFile has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 3 (4 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.
CPhpAuthManager.saveAuthItem (cognitive 24) framework/web/auth/CPhpAuthManager.php:329— CPhpAuthManager.saveAuthItem has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CJSON.encode (cognitive 24) framework/web/helpers/CJSON.php:95— CJSON.encode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (5 pts), boolean chains 4, match/switch 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 10). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
CWsdlGenerator.processMethod (cognitive 24) framework/web/services/CWsdlGenerator.php:265— CWsdlGenerator.processMethod has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (18 pts), loops 3 (5 pts), ternaries 1 (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.
COutputCache.getCacheKey (cognitive 24) framework/web/widgets/COutputCache.php:276— COutputCache.getCacheKey has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CComponent.raiseEvent (cognitive 23) framework/base/CComponent.php:541— CComponent.raiseEvent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CCache.mget (cognitive 23) framework/caching/CCache.php:130— CCache.mget has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (7 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CActiveRecord.insert (cognitive 23) framework/db/ar/CActiveRecord.php:1073— CActiveRecord.insert has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 1 (5 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.
ModelCode.generateRelations (cognitive 23) framework/gii/generators/model/ModelCode.php:294— ModelCode.generateRelations has cognitive complexity 23 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 5 (7 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CUniqueValidator.validateAttribute (cognitive 23) framework/validators/CUniqueValidator.php:80— CUniqueValidator.validateAttribute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 5 (6 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CClientScript.renderBodyEnd (cognitive 23) framework/web/CClientScript.php:457— CClientScript.renderBodyEnd has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (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.
ApiModel.processClass (cognitive 22) build/commands/api/ApiModel.php:75— ApiModel.processClass has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 5, boolean chains 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CJoinElement.joinOneMany (cognitive 22) framework/db/ar/CActiveFinder.php:1088— CJoinElement.joinOneMany has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 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.
CDbCriteria.__wakeup (cognitive 22) framework/db/schema/CDbCriteria.php:167— CDbCriteria.__wakeup has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (8 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.
CJuiButton.run (cognitive 22) framework/zii/widgets/jui/CJuiButton.php:102— CJuiButton.run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (20 pts), match/switch 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.
CldrCommand.run (cognitive 21) build/commands/CldrCommand.php:65— CldrCommand.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 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.
CErrorHandler.handle (cognitive 21) framework/base/CErrorHandler.php:94— CErrorHandler.handle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (4 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.
CJoinElement.lazyFind (cognitive 21) framework/db/ar/CActiveFinder.php:463— CJoinElement.lazyFind has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 5 (7 pts), boolean chains 1 (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.
CRangeValidator.validateAttribute (cognitive 21) framework/validators/CRangeValidator.php:62— CRangeValidator.validateAttribute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (7 pts), boolean chains 4, 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.
CClientScript.renderCoreScripts (cognitive 21) framework/web/CClientScript.php:341— CClientScript.renderCoreScripts has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 6 (9 pts) (nesting depth added 10). 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.
CClientScript.renderHead (cognitive 21) framework/web/CClientScript.php:383— CClientScript.renderHead has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 5 (7 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.
CUrlManager.createUrlDefault (cognitive 21) framework/web/CUrlManager.php:320— CUrlManager.createUrlDefault has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 2 (6 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.
CFormElementCollection.add (cognitive 21) framework/web/form/CFormElementCollection.php:57— CFormElementCollection.add has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CJavaScript.encode (cognitive 21) framework/web/helpers/CJavaScript.php:63— CJavaScript.encode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (6 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CErrorHandler.handleException (cognitive 20) framework/base/CErrorHandler.php:168— CErrorHandler.handleException has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CStringValidator.validateAttribute (cognitive 20) framework/validators/CStringValidator.php:77— CStringValidator.validateAttribute has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 7, boolean chains 5 (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.
CUrlManager.parsePathInfo (cognitive 20) framework/web/CUrlManager.php:393— CUrlManager.parsePathInfo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 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.
CFormButtonElement.render (cognitive 20) framework/web/form/CFormButtonElement.php:96— CFormButtonElement.render has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (9 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.
CButtonColumn.initDefaultButtons (cognitive 20) framework/zii/widgets/grid/CButtonColumn.php:233— CButtonColumn.initDefaultButtons has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (19 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.
Tooltip::show (cognitive 20) framework/gii/assets/js/tooltip.js:193— Tooltip::show 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.
CldrCommand.parseWeekDayNames (cognitive 19) build/commands/CldrCommand.php:327— CldrCommand.parseWeekDayNames has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 5 (9 pts) (nesting depth added 10). 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.
CApplication.displayError (cognitive 19) framework/base/CApplication.php:899— CApplication.displayError has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CSecurityManager.generateRandomBytes (cognitive 19) framework/base/CSecurityManager.php:391— CSecurityManager.generateRandomBytes has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (7 pts), loops 2 (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.
CDirectoryCacheDependency.generateTimestamps (cognitive 19) framework/caching/dependencies/CDirectoryCacheDependency.php:82— CDirectoryCacheDependency.generateTimestamps has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, 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.
CDbCommandBuilder.createInsertCommand (cognitive 19) framework/db/schema/CDbCommandBuilder.php:208— CDbCommandBuilder.createInsertCommand has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 4 (7 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CDbCommandBuilder.createColumnCriteria (cognitive 19) framework/db/schema/CDbCommandBuilder.php:661— CDbCommandBuilder.createColumnCriteria has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 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.
CMssqlCommandBuilder.createUpdateCommand (cognitive 19) framework/db/schema/mssql/CMssqlCommandBuilder.php:61— CMssqlCommandBuilder.createUpdateCommand has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CAssetManager.publish (cognitive 19) framework/web/CAssetManager.php:206— CAssetManager.publish has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 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.
CWidgetFactory.createWidget (cognitive 19) framework/web/CWidgetFactory.php:144— CWidgetFactory.createWidget has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 4 (7 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CHtml.checkBoxList (cognitive 19) framework/web/helpers/CHtml.php:1143— CHtml.checkBoxList has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, ternaries 5, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CWsdlGenerator.createOperationElement (cognitive 19) framework/web/services/CWsdlGenerator.php:735— CWsdlGenerator.createOperationElement has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CGridView.initColumns (cognitive 19) framework/zii/widgets/grid/CGridView.php:381— CGridView.initColumns has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2, 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.
CldrCommand.parseEraNames (cognitive 18) build/commands/CldrCommand.php:378— CldrCommand.parseEraNames has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 3 (6 pts), boolean chains 3 (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.
Utf8Command.is_utf8 (cognitive 18) build/commands/Utf8Command.php:171— Utf8Command.is_utf8 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApiModel.processMethod (cognitive 18) build/commands/api/ApiModel.php:252— ApiModel.processMethod has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (8 pts), loops 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.
ApiModel.tagParam (cognitive 18) build/commands/api/ApiModel.php:402— ApiModel.tagParam has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (18 pts) (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CErrorHandler.argumentsToString (cognitive 18) framework/base/CErrorHandler.php:452— CErrorHandler.argumentsToString has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 1 (3 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.
MessageCommand.run (cognitive 18) framework/cli/commands/MessageCommand.php:75— MessageCommand.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (14 pts), loops 3 (4 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CMap.mergeWith (cognitive 18) framework/collections/CMap.php:240— CMap.mergeWith has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CConsoleCommand.resolveRequest (cognitive 18) framework/console/CConsoleCommand.php:226— CConsoleCommand.resolveRequest has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 1 (3 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.
CConsoleCommandRunner.createCommand (cognitive 18) framework/console/CConsoleCommandRunner.php:144— CConsoleCommandRunner.createCommand has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 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.
CActiveRecordMetaData.__construct (cognitive 18) framework/db/ar/CActiveRecord.php:2385— CActiveRecordMetaData.__construct has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 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.
COciCommandBuilder.createInsertCommand (cognitive 18) framework/db/schema/oci/COciCommandBuilder.php:79— COciCommandBuilder.createInsertCommand has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (6 pts), boolean chains 4 (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.
ModelCode.prepare (cognitive 18) framework/gii/generators/model/ModelCode.php:66— ModelCode.prepare has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), ternaries 2 (4 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.
CDateTimeParser.parseMonth (cognitive 18) framework/utils/CDateTimeParser.php:326— CDateTimeParser.parseMonth has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 2 (3 pts), loops 3, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CCompareValidator.clientValidateAttribute (cognitive 18) framework/validators/CCompareValidator.php:139— CCompareValidator.clientValidateAttribute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 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.
CDateValidator.validateAttribute (cognitive 18) framework/validators/CDateValidator.php:49— CDateValidator.validateAttribute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (4 pts), boolean chains 2, 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.
CHttpRequest.getPreferredLanguages (cognitive 18) framework/web/CHttpRequest.php:1074— CHttpRequest.getPreferredLanguages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (6 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.
CUrlManager.createUrl (cognitive 18) framework/web/CUrlManager.php:283— CUrlManager.createUrl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 1 (4 pts), loops 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.
CHtml.resolveValue (cognitive 18) framework/web/helpers/CHtml.php:2761— CHtml.resolveValue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, 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.
CJSON.utf8ToUnicode (cognitive 18) framework/web/helpers/CJSON.php:623— CJSON.utf8ToUnicode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (8 pts), loops 1 (nesting depth added 11). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
CPradoViewRenderer.generateViewFile (cognitive 18) framework/web/renderers/CPradoViewRenderer.php:80— CPradoViewRenderer.generateViewFile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 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.
TranslationsCommand.actionReport (cognitive 17) build/commands/TranslationsCommand.php:53— TranslationsCommand.actionReport has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 1 (3 pts), boolean chains 2, loops 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.
ApiModel.tagReturn (cognitive 17) build/commands/api/ApiModel.php:431— ApiModel.tagReturn has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
BlogController.getTopics (cognitive 17) docs/viewer/controllers/BlogController.php:82— BlogController.getTopics has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (2 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.
GuideController.getTopics (cognitive 17) docs/viewer/controllers/GuideController.php:82— GuideController.getTopics has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (2 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.
CComponent.__unset (cognitive 17) framework/base/CComponent.php:213— CComponent.__unset has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CErrorHandler.handleError (cognitive 17) framework/base/CErrorHandler.php:228— CErrorHandler.handleError has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 1 (2 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.
MigrateCommand.actionUp (cognitive 17) framework/cli/commands/MigrateCommand.php:82— MigrateCommand.actionUp has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4 (6 pts), 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.
MigrateCommand.actionRedo (cognitive 17) framework/cli/commands/MigrateCommand.php:155— MigrateCommand.actionRedo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (5 pts), ternaries 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.
CDbCommand.buildQuery (cognitive 17) framework/db/CDbCommand.php:558— CDbCommand.buildQuery has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, ternaries 6 (8 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CJoinQuery.createCommand (cognitive 17) framework/db/ar/CActiveFinder.php:1340— CJoinQuery.createCommand has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4, ternaries 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.
CActiveRecord.applyScopes (cognitive 17) framework/db/ar/CActiveRecord.php:1374— CActiveRecord.applyScopes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ModelCode.generateRules (cognitive 17) framework/gii/generators/model/ModelCode.php:220— ModelCode.generateRules has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, loops 2 (3 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.
CFileHelper.removeDirectory (cognitive 17) framework/utils/CFileHelper.php:78— CFileHelper.removeDirectory has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 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.
CFileHelper.copyDirectoryRecursive (cognitive 17) framework/utils/CFileHelper.php:161— CFileHelper.copyDirectoryRecursive has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CHttpRequest.normalizeRequest (cognitive 17) framework/web/CHttpRequest.php:127— CHttpRequest.normalizeRequest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 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.
CUrlManager.parseUrl (cognitive 17) framework/web/CUrlManager.php:362— CUrlManager.parseUrl has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 1 (4 pts), loops 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.
CAction.runWithParamsInternal (cognitive 17) framework/web/actions/CAction.php:89— CAction.runWithParamsInternal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 1 (4 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.
CHtml.value (cognitive 17) framework/web/helpers/CHtml.php:2370— CHtml.value has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CHtml.renderAttributes (cognitive 17) framework/web/helpers/CHtml.php:2810— CHtml.renderAttributes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CJuiSliderInput.run (cognitive 17) framework/zii/widgets/jui/CJuiSliderInput.php:109— CJuiSliderInput.run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, ternaries 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.
jquery.yiilistview.$.fn.yiiListView (cognitive 17) framework/zii/widgets/assets/listview/jquery.yiilistview.js:24— jquery.yiilistview.$.fn.yiiListView has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4 (nesting depth added 6). None of this is in the body itself: all 17 points belong to 3 function literals inside it that branch (lines 25, 36, 55). 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.
ShellCommand.runShell (cognitive 16) framework/cli/commands/ShellCommand.php:102— ShellCommand.runShell has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebAppCommand.run (cognitive 16) framework/cli/commands/WebAppCommand.php:47— WebAppCommand.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
ControllerCommand.run (cognitive 16) framework/cli/commands/shell/ControllerCommand.php:80— ControllerCommand.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4 (7 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CDbCommand.execute (cognitive 16) framework/db/CDbCommand.php:316— CDbCommand.execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 1 (2 pts), ternaries 1 (2 pts), boolean chains 1, 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.
CDbCommand.select (cognitive 16) framework/db/CDbCommand.php:604— CDbCommand.select has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 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.
CActiveRecord.getAttributes (cognitive 16) framework/db/ar/CActiveRecord.php:759— CActiveRecord.getAttributes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CActiveRelation.mergeWith (cognitive 16) framework/db/ar/CActiveRecord.php:2190— CActiveRelation.mergeWith 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.
CController.createActionFromMap (cognitive 16) framework/web/CController.php:438— CController.createActionFromMap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CPhpAuthManager.checkAccess (cognitive 16) framework/web/auth/CPhpAuthManager.php:66— CPhpAuthManager.checkAccess has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 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.
CPhpAuthManager.load (cognitive 16) framework/web/auth/CPhpAuthManager.php:415— CPhpAuthManager.load has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 4 (8 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.
CGridView.registerClientScript (cognitive 16) framework/zii/widgets/grid/CGridView.php:442— CGridView.registerClientScript has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CJuiDatePicker.run (cognitive 16) framework/zii/widgets/jui/CJuiDatePicker.php:70— CJuiDatePicker.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 1 (2 pts), boolean chains 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.
index.getPreferredLanguage (cognitive 16) requirements/index.php:250— index.getPreferredLanguage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (4 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.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) framework/db/schema/CDbCommandBuilder.php:366— framework/db/schema/CDbCommandBuilder.php:366-406 | framework/db/schema/mssql/CMssqlCommandBuilder.php:63-106 — These two members are one piece of code written twice and then edited apart: 41 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 (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:502— framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:502-533 | framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:544-569 — These two members are one piece of code written twice and then edited apart: 26 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 (39 corresponding lines) · ×1
Edited copy of a member (39 corresponding lines) framework/zii/widgets/CListView.php:232— framework/zii/widgets/CListView.php:232-270 | framework/zii/widgets/grid/CGridView.php:444-492 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) framework/db/schema/CDbCommandBuilder.php:210— framework/db/schema/CDbCommandBuilder.php:210-249 | framework/db/schema/oci/COciCommandBuilder.php:81-121 — These two members are one piece of code written twice and then edited apart: 40 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 (51 corresponding lines) · ×1
Edited copy of a member (51 corresponding lines) framework/validators/CNumberValidator.php:127— framework/validators/CNumberValidator.php:127-177 | framework/validators/CStringValidator.php:122-176 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) framework/cli/commands/MigrateCommand.php:121— framework/cli/commands/MigrateCommand.php:121-152 | framework/cli/commands/MigrateCommand.php:157-196 — 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 copies of one member (3 members, 22+ corresponding lines) · ×1
Edited copies of one member (3 members, 22+ corresponding lines) framework/validators/CEmailValidator.php:200— framework/validators/CEmailValidator.php:200-221 | framework/validators/CUrlValidator.php:169-191 | framework/validators/CUrlValidator.php:202-224 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 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 (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) framework/zii/widgets/CListView.php:209— framework/zii/widgets/CListView.php:209-224 | framework/zii/widgets/grid/CGridView.php:355-375 — 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 (18 corresponding lines) · ×1
Edited copy of a member (18 corresponding lines) framework/db/schema/oci/COciSchema.php:137— framework/db/schema/oci/COciSchema.php:137-154 | framework/db/schema/pgsql/CPgsqlSchema.php:141-158 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×1
Edited copies of one member (3 members, 13+ corresponding lines) framework/web/auth/CDbAuthManager.php:308— framework/web/auth/CDbAuthManager.php:308-322 | framework/web/auth/CDbAuthManager.php:333-345 | framework/web/auth/CDbAuthManager.php:481-494 — 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 (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) framework/db/schema/cubrid/CCubridSchema.php:167— framework/db/schema/cubrid/CCubridSchema.php:167-176 | framework/db/schema/mysql/CMysqlSchema.php:200-211 | framework/db/schema/oci/COciSchema.php:230-239 — 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 copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) framework/web/CDataProvider.php:95— framework/web/CDataProvider.php:95-109 | framework/web/CDataProvider.php:143-157 — 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 copies of one member (3 members, 6+ corresponding lines) · ×1
Edited copies of one member (3 members, 6+ corresponding lines) docs/viewer/components/MarkdownParser.php:25— docs/viewer/components/MarkdownParser.php:25-31 | framework/vendors/markdown/markdown.php:732-737 | framework/vendors/markdown/markdown.php:2064-2069 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 9+ corresponding lines) · ×1
Edited copies of one member (4 members, 9+ corresponding lines) framework/validators/CBooleanValidator.php:56— framework/validators/CBooleanValidator.php:56-67 | framework/validators/CCaptchaValidator.php:46-54 | framework/validators/CEmailValidator.php:76-84 | framework/validators/CTypeValidator.php:92-100 — 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 copy of a member (6 corresponding lines) · ×1
Edited copy of a member (6 corresponding lines) framework/db/schema/CDbSchema.php:580— framework/db/schema/CDbSchema.php:580-586 | framework/db/schema/mysql/CMysqlSchema.php:356-361 — 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, 9+ corresponding lines) · ×1
Edited copies of one member (3 members, 9+ corresponding lines) framework/collections/CList.php:265— framework/collections/CList.php:265-275 | framework/collections/CList.php:286-294 | framework/collections/CMap.php:210-220 — 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 copies of one member (3 members, 5+ corresponding lines) · ×1
Edited copies of one member (3 members, 5+ corresponding lines) framework/db/ar/CActiveRecord.php:1751— framework/db/ar/CActiveRecord.php:1751-1756 | framework/db/ar/CActiveRecord.php:1806-1810 | framework/db/ar/CActiveRecord.php:1840-1845 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) REDACTED:63— REDACTED:63-73 | REDACTED:82-92 | framework/gii/controllers/DefaultController.php:36-47 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (2 corresponding lines) · ×1
Edited copy of a member (2 corresponding lines) framework/gii/generators/controller/ControllerCode.php:41— framework/gii/generators/controller/ControllerCode.php:41-42 | framework/gii/generators/crud/CrudCode.php:51-52 — 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) framework/base/CModel.php:429— framework/base/CModel.php:429-429 | framework/cli/commands/shell/CrudCommand.php:322-324 — 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 (31 lines × 2) framework/web/helpers/CHtml.php:913— framework/web/helpers/CHtml.php:913-943 | framework/web/helpers/CHtml.php:962-992 — 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 `framework/web/helpers/CHtml.php:913` 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 (30 lines × 2) framework/cli/commands/MigrateCommand.php:121— framework/cli/commands/MigrateCommand.php:121-150 | framework/cli/commands/MigrateCommand.php:157-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. Read the line range as the matched WINDOW rather than a finished unit: at `framework/cli/commands/MigrateCommand.php:121` 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) docs/viewer/controllers/BlogController.php:35— docs/viewer/controllers/BlogController.php:35-59 | docs/viewer/controllers/GuideController.php:35-59 — before extracting anything, compare `docs/viewer/controllers/BlogController.php` and `docs/viewer/controllers/GuideController.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 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 (4–25 lines × 3) framework/db/schema/CDbCommandBuilder.php:375— framework/db/schema/CDbCommandBuilder.php:375-399 | framework/db/schema/CDbCommandBuilder.php:434-437 | framework/db/schema/mssql/CMssqlCommandBuilder.php:75-99 — 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 `framework/db/schema/CDbCommandBuilder.php:375` 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, `framework/db/schema/CDbCommandBuilder.php:399` calls `applyCondition` and `framework/db/schema/CDbCommandBuilder.php:437` 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 (27 lines × 2) framework/validators/CExistValidator.php:72— framework/validators/CExistValidator.php:72-98 | framework/validators/CUniqueValidator.php:82-108 — before extracting anything, compare `framework/validators/CExistValidator.php` and `framework/validators/CUniqueValidator.php` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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 (24 lines × 2) framework/db/schema/CDbCommandBuilder.php:210— framework/db/schema/CDbCommandBuilder.php:210-233 | framework/db/schema/oci/COciCommandBuilder.php:81-104 — 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 (22 lines × 2) framework/cli/commands/shell/ControllerCommand.php:90— framework/cli/commands/shell/ControllerCommand.php:90-111 | framework/cli/commands/shell/CrudCommand.php:109-130 — 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 `framework/cli/commands/shell/ControllerCommand.php:90` 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 lines × 4) framework/cli/commands/shell/CrudCommand.php:244— framework/cli/commands/shell/CrudCommand.php:244-263 | framework/cli/commands/shell/CrudCommand.php:273-292 | framework/gii/generators/crud/CrudCode.php:178-197 | framework/gii/generators/crud/CrudCode.php:207-226 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18–19 lines × 2) framework/base/CApplication.php:905— framework/base/CApplication.php:905-923 | framework/console/CConsoleApplication.php:118-135 — 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 `framework/base/CApplication.php:905` 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) docs/viewer/controllers/BlogController.php:84— docs/viewer/controllers/BlogController.php:84-101 | docs/viewer/controllers/GuideController.php:84-101 — before extracting anything, compare `docs/viewer/controllers/BlogController.php` and `docs/viewer/controllers/GuideController.php` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 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 `docs/viewer/controllers/BlogController.php:84` 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 (16–18 lines × 2) framework/web/helpers/CHtml.php:1043— framework/web/helpers/CHtml.php:1043-1060 | framework/web/helpers/CHtml.php:2015-2030 — 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 `framework/web/helpers/CHtml.php:1043` 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) framework/console/CConsoleCommand.php:125— framework/console/CConsoleCommand.php:125-141 | framework/web/actions/CAction.php:91-106 — 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 `framework/console/CConsoleCommand.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 (16 lines × 2) framework/cli/commands/shell/CrudCommand.php:297— framework/cli/commands/shell/CrudCommand.php:297-312 | framework/gii/generators/crud/CrudCode.php:231-246 — 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 × 3) framework/caching/CDbCache.php:148— framework/caching/CDbCache.php:148-162 | framework/logging/CDbLogRoute.php:105-119 | framework/web/CDbHttpSession.php:171-185 — 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 (13 lines × 3) framework/utils/CDateTimeParser.php:127— framework/utils/CDateTimeParser.php:127-139 | framework/utils/CDateTimeParser.php:164-176 | framework/utils/CDateTimeParser.php:178-190 — 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 `framework/utils/CDateTimeParser.php:127` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 5) framework/utils/CDateTimeParser.php:97— framework/utils/CDateTimeParser.php:97-108 | framework/utils/CDateTimeParser.php:127-138 | framework/utils/CDateTimeParser.php:141-152 | framework/utils/CDateTimeParser.php:164-175 | framework/utils/CDateTimeParser.php:178-189 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `framework/utils/CDateTimeParser.php:97` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 4) framework/web/helpers/CHtml.php:1907— framework/web/helpers/CHtml.php:1907-1917 | framework/web/helpers/CHtml.php:1951-1961 | framework/web/helpers/CHtml.php:2125-2135 | framework/web/helpers/CHtml.php:2187-2197 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10–11 lines × 3) framework/db/CDbCommand.php:607— framework/db/CDbCommand.php:607-617 | framework/db/CDbCommand.php:1003-1012 | framework/db/CDbCommand.php:1097-1106 — 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 `framework/db/CDbCommand.php:607` 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–11 lines × 2) framework/db/CDbCommand.php:318— framework/db/CDbCommand.php:318-327 | framework/db/CDbCommand.php:474-484 — 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 × 6) framework/zii/widgets/jui/CJuiDialog.php:66— framework/zii/widgets/jui/CJuiDialog.php:66-75 | framework/zii/widgets/jui/CJuiDraggable.php:59-68 | framework/zii/widgets/jui/CJuiDroppable.php:59-68 | framework/zii/widgets/jui/CJuiResizable.php:59-68 | framework/zii/widgets/jui/CJuiSelectable.php:68-77 | framework/zii/widgets/jui/CJuiSortable.php:72-81 — 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 (10 lines × 4) framework/web/helpers/CJSON.php:163— framework/web/helpers/CJSON.php:163-172 | framework/web/helpers/CJSON.php:174-183 | framework/web/helpers/CJSON.php:186-195 | framework/web/helpers/CJSON.php:199-208 — 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 `framework/web/helpers/CJSON.php:163` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `framework/web/helpers/CJSON.php:184` calls `ord` and `framework/web/helpers/CJSON.php:173` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7–10 lines × 2) framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:502— framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:502-508 | framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:631-640 — 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–9 lines × 4) framework/db/CDbCommand.php:606— framework/db/CDbCommand.php:606-614 | framework/db/CDbCommand.php:698-705 | framework/db/CDbCommand.php:1002-1009 | framework/db/CDbCommand.php:1096-1103 — 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 `framework/db/CDbCommand.php:606` 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–8 lines × 6) framework/web/widgets/CAutoComplete.php:203— framework/web/widgets/CAutoComplete.php:203-209 | framework/web/widgets/CMaskedTextField.php:61-67 | framework/web/widgets/CStarRating.php:103-109 | framework/zii/widgets/jui/CJuiAutoComplete.php:75-82 | framework/zii/widgets/jui/CJuiButton.php:105-112 | framework/zii/widgets/jui/CJuiDatePicker.php:72-79 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `framework/web/widgets/CMaskedTextField.php:59` calls `CException`, `t` and `framework/web/widgets/CStarRating.php:102` 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 × 4) demos/blog/protected/controllers/CommentController.php:46— demos/blog/protected/controllers/CommentController.php:46-53 | REDACTED:199-206 | demos/blog/protected/controllers/SiteController.php:71-80 | framework/cli/views/webapp/protected/controllers/SiteController.php:83-92 — before extracting anything, compare `demos/blog/protected/controllers/SiteController.php` and `framework/cli/views/webapp/protected/controllers/SiteController.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 `demos/blog/protected/controllers/CommentController.php:46` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `demos/blog/protected/controllers/SiteController.php:65` calls `defined`, `CHttpException` and `framework/cli/views/webapp/protected/controllers/SiteController.php:79` 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) framework/base/CApplication.php:806— framework/base/CApplication.php:806-813 | framework/base/CApplication.php:911-918 | framework/console/CConsoleApplication.php:123-130 — 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 `framework/base/CApplication.php:806` 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 (56 lines × 2) framework/collections/CQueueIterator.php:41— framework/collections/CQueueIterator.php:41-96 | framework/collections/CStackIterator.php:41-96 — before extracting anything, compare `framework/collections/CQueueIterator.php` and `framework/collections/CStackIterator.php` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `framework/collections/CQueueIterator.php:41` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Outbound HTTP without resilience build/commands/CldrCommand.php:92— `curl_exec(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Orphaned file framework/web/helpers/CHtml.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/vendors/markdown/markdown.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/db/CDbCommand.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/web/CHttpRequest.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/db/ar/CActiveFinder.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/web/CController.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/web/widgets/CActiveForm.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/vendors/TextHighlighter/Text/Highlighter/Generator.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/YiiBase.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/base/CApplication.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/db/schema/CDbCommandBuilder.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/web/services/CWsdlGenerator.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/db/CDbConnection.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/web/CClientScript.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/web/CUrlManager.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/web/auth/CWebUser.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/zii/widgets/grid/CGridView.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/base/CSecurityManager.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/db/schema/CDbSchema.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/db/schema/CDbCriteria.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/base/interfaces.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/web/helpers/CJSON.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/base/CComponent.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/web/form/CForm.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file framework/base/CModel.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate framework/zii/widgets/assets/gridview/jquery.yiigridview.js:288— `XHR.readyState === 0 || XHR.status === 0` appears character-identically in 2 files — framework/zii/widgets/assets/gridview/jquery.yiigridview.js, framework/zii/widgets/assets/listview/jquery.yiilistview.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 framework/zii/widgets/assets/gridview/jquery.yiigridview.js:310— `XHR.responseText && !/^\s*$/.test(XHR.responseText)` appears character-identically in 2 files — framework/zii/widgets/assets/gridview/jquery.yiigridview.js, framework/zii/widgets/assets/listview/jquery.yiilistview.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 framework/zii/widgets/assets/gridview/jquery.yiigridview.js:93— `settings.enableHistory && window.History.enabled` appears character-identically in 2 files — framework/zii/widgets/assets/gridview/jquery.yiigridview.js, framework/zii/widgets/assets/listview/jquery.yiilistview.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 framework/db/ar/CActiveFinder.php:739— `!empty($criteria->group) || !empty($criteria->having)` appears character-identically in 2 files — framework/db/ar/CActiveFinder.php, framework/db/schema/CDbCommandBuilder.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 docs/viewer/controllers/BlogController.php:125— `!is_dir($basePath.DIRECTORY_SEPARATOR.$file) || $file==='.' || $file==='..' || $file==='source'` appears character-identically in 2 files — docs/viewer/controllers/BlogController.php, docs/viewer/controllers/GuideController.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 docs/viewer/controllers/BlogController.php:76— `!isset($_GET['page']) || empty($_GET['page'])` appears character-identically in 2 files — docs/viewer/controllers/BlogController.php, docs/viewer/controllers/GuideController.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 framework/cli/commands/shell/HelpCommand.php:33— `!isset($args[0]) || !isset($commands[$name])` appears character-identically in 2 files — framework/cli/commands/shell/HelpCommand.php, framework/console/CHelpCommand.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 docs/viewer/controllers/BlogController.php:41— `!strcasecmp($topic,'toc') || !is_file($file)` appears character-identically in 2 files — docs/viewer/controllers/BlogController.php, docs/viewer/controllers/GuideController.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 framework/web/CController.php:716— `$extension!=='.php' && is_file($viewFile.'.php')` appears character-identically in 2 files — framework/web/CController.php, framework/web/widgets/CWidget.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 docs/viewer/controllers/BlogController.php:97— `$line[0]==='-' && preg_match('/\[(.*?)\]\((.*?)\)/',$line,$matches)` appears character-identically in 2 files — docs/viewer/controllers/BlogController.php, docs/viewer/controllers/GuideController.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 docs/viewer/components/MarkdownParser.php:25— `$matches[3] == '-' && preg_match('{^- }', $matches[1])` appears character-identically in 2 files — docs/viewer/components/MarkdownParser.php, framework/vendors/markdown/markdown.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 docs/viewer/controllers/BlogController.php:56— `$topic!=='index' && preg_match('/<h1[^>]*>(.*?)</',$content,$matches)` appears character-identically in 2 files — docs/viewer/controllers/BlogController.php, docs/viewer/controllers/GuideController.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 framework/views/ar/exception.php:184— `$trace['file']!=='unknown' && is_file($trace['file'])` appears character-identically in 9 files — framework/views/ar/exception.php, framework/views/da/exception.php, framework/views/exception.php, framework/views/fi/exception.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 framework/db/schema/CDbCommandBuilder.php:217— `($column=$table->getColumn($name))!==null && ($value!==null || $column->allowNull)` appears character-identically in 2 files — framework/db/schema/CDbCommandBuilder.php, framework/db/schema/oci/COciCommandBuilder.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 framework/logging/CLogger.php:312— `($last=array_pop($stack))!==null && $last[0]===$token` appears character-identically in 2 files — framework/logging/CLogger.php, framework/logging/CProfileLogRoute.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 framework/web/helpers/CHtml.php:2736— `($pos=strrpos($attribute,']'))!==false && $pos!==strlen($attribute)-1` appears character-identically in 2 files — framework/web/helpers/CHtml.php, framework/web/widgets/CActiveForm.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 framework/base/CApplication.php:266— `($this->_basePath=realpath($path))===false || !is_dir($this->_basePath)` appears character-identically in 2 files — framework/base/CApplication.php, framework/base/CModule.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 framework/web/CWebApplication.php:421— `($this->_controllerPath=realpath($value))===false || !is_dir($this->_controllerPath)` appears character-identically in 2 files — framework/web/CWebApplication.php, framework/web/CWebModule.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 framework/web/CWebApplication.php:487— `($this->_layoutPath=realpath($path))===false || !is_dir($this->_layoutPath)` appears character-identically in 2 files — framework/web/CWebApplication.php, framework/web/CWebModule.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 framework/web/CWebApplication.php:443— `($this->_viewPath=realpath($path))===false || !is_dir($this->_viewPath)` appears character-identically in 2 files — framework/web/CWebApplication.php, framework/web/CWebModule.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 framework/base/CStatePersister.php:79— `cacheID!==false && ($cache=Yii::app()->getComponent($this->cacheID))!==null` appears character-identically in 6 files — framework/base/CStatePersister.php, framework/i18n/CDbMessageSource.php, framework/i18n/CGettextMessageSource.php, framework/i18n/CPhpMessageSource.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 framework/i18n/CDateFormatter.php:93— `ctype_digit($time) || ($time[0]=='-' && ctype_digit(substr($time, 1)))` appears character-identically in 2 files — framework/i18n/CDateFormatter.php, framework/utils/CFormatter.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 framework/validators/CEmailValidator.php:205— `defined('IDNA_NONTRANSITIONAL_TO_ASCII') && defined('INTL_IDNA_VARIANT_UTS46')` appears character-identically in 2 files — framework/validators/CEmailValidator.php, framework/validators/CUrlValidator.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 framework/cli/views/webapp/index.php:8— `defined('YII_DEBUG') or define('YII_DEBUG',true)` appears character-identically in 2 files — framework/cli/views/webapp/index.php, framework/yiic.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 framework/web/form/CFormButtonElement.php:136— `empty($this->_on) || in_array($this->getParent()->getModel()->getScenario(),$this->_on)` appears character-identically in 2 files — framework/web/form/CFormButtonElement.php, framework/web/form/CFormStringElement.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.
D34 · Knowledge Freshness· Most significant orphaned file · ×3
Most significant orphaned file framework/vendors/htmlpurifier/standalone/HTMLPurifier/Lexer/PH5P.php:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file framework/vendors/Net_IDNA2/Net/IDNA2.php:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file framework/db/ar/CActiveRecord.php:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Fat interface: IAuthManager (20 methods) framework/base/interfaces.php:336— `IAuthManager` declares 20 methods: `checkAccess`, `createAuthItem`, `removeAuthItem`, `getAuthItems`, `getAuthItem`, `saveAuthItem`, `addItemChild`, `removeItemChild`, `hasItemChild`, `getItemChildren`, `assign`, `revoke`, `isAssigned`, `getAuthAssignment`, `getAuthAssignments`, `saveAuthAssignment`, `clearAll`, `clearAuthAssignments`, `save`, `executeBizRule`. Counted over its public instance methods, once per name; constants and static methods are not counted. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IAuthManager (20 methods) framework/yiilite.php:10814— `IAuthManager` declares 20 methods: `checkAccess`, `createAuthItem`, `removeAuthItem`, `getAuthItems`, `getAuthItem`, `saveAuthItem`, `addItemChild`, `removeItemChild`, `hasItemChild`, `getItemChildren`, `assign`, `revoke`, `isAssigned`, `getAuthAssignment`, `getAuthAssignments`, `saveAuthAssignment`, `clearAll`, `clearAuthAssignments`, `save`, `executeBizRule`. Counted over its public instance methods, once per name; constants and static methods are not counted. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Hand-rolled JSON/XML parsing via regex framework/vendors/markdown/markdown.php:2528— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This PHP code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex framework/vendors/htmlpurifier/HTMLPurifier.standalone.php:7963— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This PHP code already uses a real parser in the same package; use it here too.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 1 significant file(s) lose their only recent owner: framework/web/auth/CPhpAuthManager.php. Pair on, review, or document these before any departure.
No ADRs found composer.json:67— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `composer.json` makes this repository a deployable product (line 67).
Concentrated knowledge decay — 260 of 262 significant files have no living knowledge, while the repository is still being changed at a low rate (20 commit(s) in the last 90 days) — so this is one repo-wide knowledge-decay state, not 260 separate risks. Counted over 262 of the 860 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. The code moved on without the people who understood these files: document them or schedule a read-through before the next change lands in them.
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.
No SAST .github/workflows/build.yml:5— No static application security testing detected. For this repository's stack, add phpstan or psalm (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 2 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.
P3 · Security & performance tooling· Dependabot does not watch pip · ×1
Dependabot does not watch pip .github/dependabot.yml:2— `.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `pip`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list.
X5 · Nullable reference types· PHP static analysis does not check null everywhere · ×1
PHP static analysis does not check null everywhere — This repository commits no PHPStan or Psalm configuration (`phpstan.neon[.dist]`, `phpstan.dist.neon`, `psalm.xml[.dist]`, or one a composer.json script names with `--configuration`), so nothing checks null: a `?Customer` reaches `->name()` silently and throws `Error: Call to a member function name() on null` the first time it is null. If the build passes a level on a command line instead, put it in a committed configuration — this check reads configuration, and configuration is all it can read.
Silent fallback default on parse failure framework/utils/CPropertyValue.php:120— `ensureArray` returns `array()` when `ParseError` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
doc comments repeat the names framework/web/js/source/punycode.js:5— 0 of 14 documented parameters and 1 of 16 summaries in `.` only repeat the member or parameter name (e.g. "The `punycode` object." for `punycode`). Delete the restating tags, or add what the name does not say.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (composer.json — not scanned yet).
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
provenance: not applicable — The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files).
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.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (composer.json — not scanned yet).
0
—
Run 01a1ea3f-ebed-7be1-9ad0-da70f2bd866c · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 20 · Warnings: 578 · Recommendations: 317 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 16: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.