Public report — PHP_CodeSniffer, published 26 Sep 2026.
Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches,
dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase surveyMeasured under the Code Assurance Index · rubric rubric-2026.09.15 (frozen) · verify this surveyFiledcd_292339a867424b75b47315d4ec6f156d
Filed 26 September 2026, 02:52 UTC
Public
Medium · 55,587 LoC · rebuild ~0.6 person-years · weakest lens: Maturity (50%)
Findings by grade
24 critical773 serious12 minor46 could not be resolved — could be critical — see Limitations
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
26 September 2026, 02:42 UTC
A measurement, not a certificate. The Code Assurance Index does not certify,
approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The
standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said
here so the number is checked rather than believed.
Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸
800findings with an exact file:lineof 809 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
23/115dimensions across the health lenses55587 LoC — wide & deep
The system holds an adequate standing with a health score of 59%, indicating a workable asset carrying real risk. While the architecture is robust, the overall maturity is weak, creating a fragile foundation for future growth. This balance means the business can operate today, but scaling will be costly and slow without intervention.
The codebase is medium-sized, representing a rebuild effort of roughly 0.6 person-years at an estimated cost of €93,000. Most of the value lies in core logic rather than boilerplate, meaning changes directly impact business capabilities. However, the lack of documented decision history and dormant knowledge creates a significant dependency on tribal memory, increasing the risk of errors when new engineers join or existing staff leave.
The primary risk is a velocity tax on every change. Poor code quality in weaker areas imposes a 12–27% cost premium on modifications, which compounds as the system grows. This drag on delivery speed translates directly into higher operational costs and slower time-to-market for new features. The second major theme is a maturity gap. With a maturity score of 50%, the system lacks the operational safeguards and documentation needed for safe, independent operation. This exposes the business to reliability issues and makes onboarding new teams difficult and expensive.
On the positive side, the architecture is strong at 96%, ensuring that changes do not ripple unpredictably through the system. This structural integrity provides a solid base for remediation efforts. The security posture is also adequate, with no confirmed critical exposures, allowing the team to focus on internal quality without immediate external threats.
The highest-leverage action is to record significant decisions in a centralized, discoverable format. This single step addresses the maturity gap and reduces the velocity tax by clarifying context for future changes. It pays for itself quickly by reducing the annual drag on engineering time. Resolving orphaned files should follow immediately to clean up the knowledge base. This approach offers the best return on effort, stabilizing the system without requiring a costly rebuild. The picture is partial, as several key lenses were not measured, but the current risks are clear enough to act on now.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
794 finding(s) are new versus the previous scan (2026-08-07) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
0.8× (at 59% quality) — the last 20% of quality is most of the work
Size & shape
Medium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~0.6 person-years of build effort (about ~€93,000 to rebuild). Its weakest lens is Maturity at 50% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.8× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with PHP.php, File.php, Tokenizer.php.
The code-quality signals (complexity, duplication, cohesion) average 3.2/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 12–27% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 3.2/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 0.4–2.5 engineer-days every year, paid as drag on the ~1,375 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 5–88 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 12–27% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 339 line(s) changed over a 90-day window ⇒ ~1,375/year · D1/D2/D4 code quality: averaging 3.2/10 ⇒ a 12–27% drag on each change · top-ranked remediation: Low effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 88 months.
Value concentrated against a weak lens · Medium · Value at risk
This is a Medium asset (~0.6 person-years to rebuild), and its weakest lens is Maturity at 50%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Maturity first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form). The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
Architecture — module dependency matrix
Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
158 modules, 149 dependencies. 1 dependency cycle across 2 modules, marked above the diagonal.
Showing the 40 most-connected modules; 118 more are not drawn.
Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
Standards.PEAR.Sniffs.WhiteSpace uses Standards.Generic.Sniffs.WhiteSpace. Changing Standards.Generic.Sniffs.WhiteSpace can break Standards.PEAR.Sniffs.WhiteSpace, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→1 Standards.PSR2.Sniffs.Classes depends on Files✕
Type pairs
2 distinct (type in Standards.PSR2.Sniffs.Classes → type in Files) references.
Standards.PSR2.Sniffs.Classes uses Standards.PEAR.Sniffs.Classes. Changing Standards.PEAR.Sniffs.Classes can break Standards.PSR2.Sniffs.Classes, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→1 Standards.PSR2.Sniffs.Methods depends on Files✕
Type pairs
3 distinct (type in Standards.PSR2.Sniffs.Methods → type in Files) references.
Standards.PSR2.Sniffs.Methods uses Standards.PEAR.Sniffs.Functions. Changing Standards.PEAR.Sniffs.Functions can break Standards.PSR2.Sniffs.Methods, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→1 Standards.Squiz.Sniffs.Commenting depends on Files✕
Type pairs
12 distinct (type in Standards.Squiz.Sniffs.Commenting → type in Files) references.
Standards.Squiz.Sniffs.Commenting uses Standards.PEAR.Sniffs.Commenting. Changing Standards.PEAR.Sniffs.Commenting can break Standards.Squiz.Sniffs.Commenting, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
35→1 Standards.Squiz.Sniffs.Functions depends on Files✕
Type pairs
4 distinct (type in Standards.Squiz.Sniffs.Functions → type in Files) references.
Standards.Squiz.Sniffs.Functions uses Standards.PEAR.Sniffs.Functions. Changing Standards.PEAR.Sniffs.Functions can break Standards.Squiz.Sniffs.Functions, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→1 Standards.Squiz.Sniffs.NamingConventions depends on Files✕
Type pairs
2 distinct (type in Standards.Squiz.Sniffs.NamingConventions → type in Files) references.
Standards.Squiz.Sniffs.NamingConventions uses Standards.PEAR.Sniffs.NamingConventions. Changing Standards.PEAR.Sniffs.NamingConventions can break Standards.Squiz.Sniffs.NamingConventions, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
Standards.Squiz.Sniffs.PHP uses Standards.Generic.Sniffs.PHP. Changing Standards.Generic.Sniffs.PHP can break Standards.Squiz.Sniffs.PHP, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
38→1 Standards.MySource.Sniffs.Commenting depends on Files✕
Type pairs
1 distinct (type in Standards.MySource.Sniffs.Commenting → type in Files) reference.
Standards.MySource.Sniffs.Commenting uses Standards.Squiz.Sniffs.Commenting. Changing Standards.Squiz.Sniffs.Commenting can break Standards.MySource.Sniffs.Commenting, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
39→1 Standards.PSR12.Sniffs.Classes depends on Files✕
Type pairs
4 distinct (type in Standards.PSR12.Sniffs.Classes → type in Files) references.
Standards.PSR12.Sniffs.Classes uses Standards.PSR2.Sniffs.Classes. Changing Standards.PSR2.Sniffs.Classes can break Standards.PSR12.Sniffs.Classes, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
40→1 Standards.Squiz.Sniffs.Classes depends on Files✕
Type pairs
6 distinct (type in Standards.Squiz.Sniffs.Classes → type in Files) references.
Standards.Squiz.Sniffs.Classes uses Standards.PSR2.Sniffs.Classes. Changing Standards.PSR2.Sniffs.Classes can break Standards.Squiz.Sniffs.Classes, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
At a glance — Code Health · 64% · Adequate · gated by D1, D2 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2021 — Injection
26
High / Critical
Roadmap
Begin by establishing architectural clarity through comprehensive documentation, specifically creating dated decision records in a standard directory and adding a high-level 'How it works' section to the root README. Simultaneously, address knowledge freshness by resolving the three most significant orphaned file findings, prioritizing PHP.php, File.php, and Tokenizer.php. Finally, improve overall documentation quality by fixing the identified issues in the README to ensure the codebase remains accessible and well-understood.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with PHP.php, File.php, Tokenizer.php.
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
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 — 24
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 — 773
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 — 12
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 46
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 20 of 23 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.7 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 23 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, 800 of 809 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.php) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (Clover XML — with Xdebug (`XDEBUG_MODE=coverage`) or PCOV installed, `vendor/bin/phpunit --coverage-clover coverage.xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (Clover XML — with Xdebug (`XDEBUG_MODE=coverage`) or PCOV installed, `vendor/bin/phpunit --coverage-clover coverage.xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.php) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (composer.json), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. All 223 significant source file(s) were last meaningfully changed so long ago that no living knowledge remains — nothing since has been substantial enough to re-establish ownership (a broad, mechanical sweep that touches many files shallowly does not count, and neither does no activity at all). There is no concentration to measure, so the bus factor is not scored. This is not a clean bill: nobody currently holds working knowledge of this code (see D34 Knowledge Freshness). Counted over 136 of the 308 production source files in this repository: 85 are under the ~2,400-byte size floor this dimension measures over, and the remaining 87 have no attributable history left to measure.
D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This 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, 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 (go.mod, a Gemfile's ruby directive, a Dockerfile) is simply not read here yet.
AX3 Project dependency cycles — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which project references which. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj files only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. Its modules are declared as: Composer packages (composer.json). A reader for that graph is the collector this check is missing. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
AX4 Dependency direction — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the direction each project reference points. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj files only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. Its modules are declared as: Composer packages (composer.json). A reader for that graph is the collector this check is missing. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AX8 Test isolation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which projects are test projects, and what they reference. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj files only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. Its modules are declared as: Composer packages (composer.json). A reader for that graph is the collector this check is missing. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data 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 personal data controls.
C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization 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 authorization controls.
C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit 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 audit controls.
C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention 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 retention controls.
C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights 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 data-subject rights controls.
ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X32 Type resolved by simple name across every loaded assembly — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
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.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
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.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
150 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was PHP.tokenize at 494. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being PHP.resolveSimpleToken at 27 — they are counted neither in the figure above nor in this dimension's score.
+ 144 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 UseDeclarationSniff.process (cyclomatic 52) finding(s) in Cyclomatic Complexity — start with UseDeclarationSniff.php (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 PHP.tokenize (cyclomatic 494) finding(s) in Cyclomatic Complexity — start with PHP.php. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 ScopeIndentSniff.process (cyclomatic 323) finding(s) in Cyclomatic Complexity — start with ScopeIndentSniff.php. — One of this dimension's main actionable groups (1 warning-level).
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 220 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 PHP.tokenize (cognitive 1203) finding(s) in Cognitive Complexity — start with PHP.php. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Config.processLongArgument (cognitive 1063) finding(s) in Cognitive Complexity — start with Config.php. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 PHP.processAdditional (cognitive 974) finding(s) in Cognitive Complexity — start with PHP.php. — One of this dimension's main actionable groups (1 warning-level).
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes5.8 / 10Adequate✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 58 MethodTooLong finding(s) in God Classes — start with File.php (5), Tokenizer.php (4), UseDeclarationSniff.php (3). — One of this dimension's main actionable groups (58 warning-level).
Resolve the 11 ClassTooLong finding(s) in God Classes — start with File.php, Tokenizer.php, Config.php. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 8 FileTooLong finding(s) in God Classes — start with PHP.php, File.php, Tokenizer.php. — One of this dimension's main actionable groups (8 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
268 duplicated block group(s) detected. A further 10 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 101 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 13 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with FunctionCommentSniff.php (2), Code.php, Gitblame.php. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 13 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with ConcatenationSpacingSniff.php (2), PHP.php (2), Config.php. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 12 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with PHP.php (2), Checkstyle.php, Ruleset.php. — One of this dimension's main actionable groups (12 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
37 deducted task-comment markers across 55587 LoC (0.1/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 37 TodoComment finding(s) in Explicit Debt — start with ErrorSuppressionTest.php (37). — One of this dimension's main actionable groups (37 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The single README is a warning that the repository has been abandoned and links to its successor (PHPCSStandards/PHP_CodeSniffer), with no real documentation of what PHP_CodeSniffer does or how to use it. The body begins with a non-constructive warning rather than an About section, then Requirements, and Installation; after clipping the document reveals that it is itself a complete installation guide covering all the outline sections (About; Requirements; Installation; Download using curl; Or download using wget; Then test the downloaded PHARs; Composer; Phive; PEAR; Git Clone; Getting Started; Documentation; Issues; Contributing; Versioning), so the visible content is an install/doc guide that is itself a single document rather than a repository-wide overview. The README is a self-contradictory warning plus a clipped installation doc.
Documentation: no project overview · ×2README.md
What to do
Resolve the 2 Documentation finding(s) in Documentation Quality — start with README.md (2). — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d19_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: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
0 naming inconsistencies across 0 sampled symbols.
✓ On the Gold path — maintain.
Detailed fixes: d21_recommendation.md.
Do you agree with this assessment?
D27 · Navigability5.3 / 10Adequate✓ Tool-verified
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
95 % of calls cross a namespace and 0 % go through an interface, but 1 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.
Scattered collaborators
What to do
Resolve the 1 Scattered collaborators finding(s) in Navigability. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d27_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: 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).
26 finding(s): 0 critical, 23 high, 3 medium, 0 low. 19 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 19 file(s) — `src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.js` (line 3, line 6, line 7, …), `src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.1.js` (lines 2–3), `src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.2.js` (line 2), `src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.js` (lines 2–3), `src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.js` (line 2), … (+14 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 19 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 (19 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.
223 of 223 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/Tokenizers/PHP.php. Counted over 223 of the 308 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Most significant orphaned file · ×3src/Tokenizers/PHP.php
Dormant codebase
What to do
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with PHP.php, File.php, Tokenizer.php. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Dormant codebase 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.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
This repository declares its own end of life: `README.md` line 2 reads “> This repository has been abandoned. Its successor is [PHPCSStandards/PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer/)”. That is a first-party statement of intent, not an inference — the Maturity and Knowledge lenses otherwise approximate the same fact from decayed commit history (D16 reports a dormant codebase, D34 orphaned files), and this row says the maintainer already told you. It does NOT change any score: an honest end-of-life notice is the README doing its job, and every dimension below still measures the code as it stands. Read the whole report as an assessment of software the author has stopped working on. — README.md:2
What to do
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
What to do
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Not evidenced — 5 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit 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 audit 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.
C4 Data Retention — Not assessed: these retention 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 retention 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.
C5 Data-Subject Rights — Not assessed: these data-subject rights 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 data-subject rights 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.
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 — 87 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — no DI registrations detected
AX2 Stateful singletons — no singleton implementations detected
AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data 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 personal data 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.
C2 Access Controls — Not assessed: these authorization 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 authorization 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.
D10 Test Quality — ~31256 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 — Package manifest not parsed for licence data — analyzer language-coverage gap
D16 Bus Factor — dormant codebase — no living knowledge left to concentrate
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — Production source is present (.php) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, 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 builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
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
D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a CS/VB/GO/SCALA/SWIFT/DART class graph, and this repository's production source is .php, which this pass does not read — so no class could be assessed. Not scored — this is a gap in the analyzer, not a finding about this repository.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
D9 Test Distribution — Test source is present (.php) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
DM1 Domain Modelling — 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 — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
P8 Schema migrations — not assessed — schema-migration practice is read from 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
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (Clover XML — with Xdebug (`XDEBUG_MODE=coverage`) or PCOV installed, `vendor/bin/phpunit --coverage-clover coverage.xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
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 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
X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X2 Cancellation propagation — 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
X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X3 Exception handling — 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
X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, 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
X5 Nullable reference types — 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.
MethodTooLong: ScopeIndentSniff.process src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:127— MethodTooLong — process runs 869 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 769 over it, 8.69× 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: JS.tokenize src/Tokenizers/JS.php:279— MethodTooLong — tokenize runs 373 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 273 over it, 3.73× 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: Config.processLongArgument src/Config.php:715— MethodTooLong — processLongArgument runs 364 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 264 over it, 3.64× 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: ArrayDeclarationSniff.processMultiLineArray src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:318— MethodTooLong — processMultiLineArray runs 359 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 259 over it, 3.59× 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: Tokenizer.recurseScopeMap src/Tokenizers/Tokenizer.php:933— MethodTooLong — recurseScopeMap runs 325 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 225 over it, 3.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CSS.tokenize src/Tokenizers/CSS.php:52— MethodTooLong — tokenize runs 288 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 188 over it, 2.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ClassDeclarationSniff.processOpen src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:62— MethodTooLong — processOpen runs 269 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 169 over it, 2.69× 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: UseDeclarationSniff.processUseGroup src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:283— MethodTooLong — processUseGroup runs 256 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 156 over it, 2.56× 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: AbstractPatternSniff.processPattern src/Sniffs/AbstractPatternSniff.php:255— MethodTooLong — processPattern runs 253 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 153 over it, 2.53× 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: Tokenizer.createPositionMap src/Tokenizers/Tokenizer.php:170— MethodTooLong — createPositionMap runs 249 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 149 over it, 2.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FunctionCommentSniff.processParams src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:281— MethodTooLong — processParams runs 234 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 134 over it, 2.34× 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: BlockCommentSniff.process src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:51— MethodTooLong — process runs 227 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 127 over it, 2.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MultipleStatementAlignmentSniff.checkAlignment src/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php:100— MethodTooLong — checkAlignment runs 200 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× 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: FunctionDeclarationArgumentSpacingSniff.processBracket src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:104— MethodTooLong — processBracket runs 200 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× 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: FunctionCommentSniff.processParams src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:265— MethodTooLong — processParams runs 188 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 88 over it, 1.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DocCommentSniff.process src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:50— MethodTooLong — process runs 185 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 85 over it, 1.85× 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: ControlStructureSpacingSniff.process src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php:64— MethodTooLong — process runs 185 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 85 over it, 1.85× 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: File.getMethodParameters src/Files/File.php:1333— MethodTooLong — getMethodParameters runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× 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: InlineCommentSniff.process src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php:54— MethodTooLong — process runs 182 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 82 over it, 1.82× 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: Ruleset.processRuleset src/Ruleset.php:317— MethodTooLong — processRuleset runs 181 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 81 over it, 1.81× 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: InlineControlStructureSniff.process src/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php:67— MethodTooLong — process runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× 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: Code.generateFileReport src/Reports/Code.php:33— MethodTooLong — generateFileReport runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FunctionCallSignatureSniff.processMultiLineCall src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:337— MethodTooLong — processMultiLineCall runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FunctionSpacingSniff.process src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php:69— MethodTooLong — process runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× 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: ControlSignatureSniff.process src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php:71— MethodTooLong — process runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
TodoComment tests/Core/ErrorSuppressionTest.php:275— //TODO: write some code. — 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/Core/ErrorSuppressionTest.php:701— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:798— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:933— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:943— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:945— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:954— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:956— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:965— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:975— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:985— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:995— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:1005— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:1015— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:1025— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:1027— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:1029— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:1039— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:1041— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:1044— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:1084— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:1085— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:1199— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:1208— //TODO: write some code — 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/Core/ErrorSuppressionTest.php:1229— //TODO: write some code — 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.
Duplicated block (13 lines × 2) src/Reports/Code.php:121— src/Reports/Code.php:121-133 | src/Reports/Full.php:63-75 — before extracting anything, compare `src/Reports/Code.php` and `src/Reports/Full.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) src/Reports/Gitblame.php:74— src/Reports/Gitblame.php:74-86 | src/Reports/Hgblame.php:93-105 — before extracting anything, compare `src/Reports/Gitblame.php` and `src/Reports/Hgblame.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13 lines × 2) src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php:100— src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php:100-112 | src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:174-186 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php:100` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:205— src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:205-217 | src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:293-305 — 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 `src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:205` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:307— src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:307-319 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:738-750 — 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 `src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:307` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 2) src/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php:62— src/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php:62-74 | src/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php:68-80 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php:62` 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) src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:364— src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:364-376 | src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:417-429 — 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 `src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:364` 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) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:369— src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:369-381 | src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:440-452 — 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 `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:369` 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) src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php:70— src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php:70-82 | src/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php:90-102 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php:91— src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php:91-103 | src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php:105-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:656— src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:656-668 | src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:715-727 — 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 `src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:656` 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) src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:87— src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:87-99 | src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:314-326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:87` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13 lines × 2) src/Tokenizers/JS.php:488— src/Tokenizers/JS.php:488-500 | src/Tokenizers/JS.php:579-591 — 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 `src/Tokenizers/JS.php:488` 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) src/Config.php:770— src/Config.php:770-780 | src/Config.php:828-838 — 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 `src/Config.php:770` 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) src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php:126— src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php:126-136 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:677-687 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php:126` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php:163— src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php:163-173 | src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:269-279 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.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.
Duplicated block (11 lines × 2) src/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php:108— src/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php:108-118 | src/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php:165-175 — 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 `src/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php:108` 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) src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php:304— src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php:304-314 | src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php:344-354 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:193— src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:193-203 | src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:216-226 — 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 `src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:193` 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) src/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php:73— src/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php:73-83 | src/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php:54-64 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) src/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php:86— src/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php:86-96 | src/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php:73-83 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php:204— src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php:204-214 | src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php:351-361 — 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 `src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php:204` 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) src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php:61— src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php:61-71 | src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php:181-191 — 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 `src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php:61` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/Tokenizers/CSS.php:342— src/Tokenizers/CSS.php:342-352 | src/Tokenizers/CSS.php:465-475 — 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 `src/Tokenizers/CSS.php:342` 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) src/Tokenizers/PHP.php:1045— src/Tokenizers/PHP.php:1045-1055 | src/Tokenizers/PHP.php:1263-1273 — 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 `src/Tokenizers/PHP.php:1045` 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) src/Tokenizers/PHP.php:2198— src/Tokenizers/PHP.php:2198-2208 | src/Tokenizers/PHP.php:3234-3244 — 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 `src/Tokenizers/PHP.php:2198` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/Reports/Checkstyle.php:45— src/Reports/Checkstyle.php:45-53 | src/Reports/Xml.php:50-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Reports/Checkstyle.php:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Reports/Xml.php:47` calls `writeAttribute` and `src/Reports/Checkstyle.php:44` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) src/Ruleset.php:1016— src/Ruleset.php:1016-1024 | src/Ruleset.php:1388-1396 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Ruleset.php:1016` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:123— src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:123-131 | src/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php:85-93 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:123` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php:73— src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php:73-81 | src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php:240-248 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php:73` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) src/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php:99— src/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php:99-107 | src/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php:120-128 — 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) src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php:146— src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php:146-154 | src/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php:86-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php:92— src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php:92-101 | src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php:88-96 — before extracting anything, compare `src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php` and `src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php:92` 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 (9 lines × 2) src/Tokenizers/PHP.php:1048— src/Tokenizers/PHP.php:1048-1056 | src/Tokenizers/PHP.php:1729-1738 — 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 `src/Tokenizers/PHP.php:1048` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/Tokenizers/PHP.php:1356— src/Tokenizers/PHP.php:1356-1364 | src/Tokenizers/PHP.php:1391-1399 — 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 `src/Tokenizers/PHP.php:1356` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/Tokenizers/Tokenizer.php:336— src/Tokenizers/Tokenizer.php:336-344 | src/Tokenizers/Tokenizer.php:374-382 — 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) src/Reports/Code.php:349— src/Reports/Code.php:349-357 | src/Reports/Full.php:218-226 — before extracting anything, compare `src/Reports/Code.php` and `src/Reports/Full.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) src/Standards/Generic/Sniffs/NamingConventions/InterfaceNameSuffixSniff.php:41— src/Standards/Generic/Sniffs/NamingConventions/InterfaceNameSuffixSniff.php:41-49 | src/Standards/Generic/Sniffs/NamingConventions/TraitNameSuffixSniff.php:41-49 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) src/Generators/HTML.php:238— src/Generators/HTML.php:238-243 | src/Generators/Markdown.php:129-134 — before extracting anything, compare `src/Generators/HTML.php` and `src/Generators/Markdown.php` as WHOLE FILES: this scan already matched 4 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) src/Reports/Checkstyle.php:50— src/Reports/Checkstyle.php:50-55 | src/Reports/Junit.php:62-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php:99— src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php:99-104 | src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:303-308 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.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 (6 lines × 2) src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:130— src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:130-137 | src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php:58-63 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php` and `src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:130` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:142— src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:142-147 | src/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php:73-79 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:142` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/Standards/PSR12/Sniffs/Operators/OperatorSpacingSniff.php:101— src/Standards/PSR12/Sniffs/Operators/OperatorSpacingSniff.php:101-107 | src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:321-326 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR12/Sniffs/Operators/OperatorSpacingSniff.php:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:357— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:357-362 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:618-623 — 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 `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:357` 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) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:358— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:358-363 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:82-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:358` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php:44— src/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php:44-49 | src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:60-65 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) src/Standards/PSR2/Sniffs/Methods/FunctionClosingBraceSniff.php:66— src/Standards/PSR2/Sniffs/Methods/FunctionClosingBraceSniff.php:66-72 | src/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php:77-82 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR2/Sniffs/Methods/FunctionClosingBraceSniff.php:66` 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) src/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php:130— src/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php:130-135 | src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php:95-100 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php:130` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/Tokenizers/PHP.php:3127— src/Tokenizers/PHP.php:3127-3133 | src/Tokenizers/PHP.php:3162-3167 — 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 `src/Tokenizers/PHP.php:3127` 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.
ClassTooLong: File src/Files/File.php:19— ClassTooLong — 1357 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 957 over it, 3.39× 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: Tokenizer src/Tokenizers/Tokenizer.php:15— ClassTooLong — 982 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 582 over it, 2.46× 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: Config src/Config.php:75— ClassTooLong — 964 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 564 over it, 2.41× 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: ScopeIndentSniff src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:17— ClassTooLong — 934 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 534 over it, 2.34× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Ruleset src/Ruleset.php:18— ClassTooLong — 722 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 322 over it, 1.81× 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: JS src/Tokenizers/JS.php:16— ClassTooLong — 684 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 284 over it, 1.71× 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: ArrayDeclarationSniff src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:16— ClassTooLong — 530 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 130 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Runner src/Runner.php:24— ClassTooLong — 490 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 90 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: FunctionCommentSniff src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:17— ClassTooLong — 451 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 51 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: UseDeclarationSniff src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:16— ClassTooLong — 434 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 34 over it, 1.09× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AbstractPatternSniff src/Sniffs/AbstractPatternSniff.php:17— ClassTooLong — 430 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 30 over it, 1.08× 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) src/Generators/HTML.php:244— src/Generators/HTML.php:244-250 | src/Generators/Markdown.php:133-139 — before extracting anything, compare `src/Generators/HTML.php` and `src/Generators/Markdown.php` as WHOLE FILES: this scan already matched 4 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) src/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php:289— src/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php:289-295 | src/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php:351-357 — 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) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:309— src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:309-315 | src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php:206-212 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php` and `src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:309` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:182— src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:182-188 | src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:382-388 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php:204— src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php:204-210 | src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php:234-240 — 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 `src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php:204` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php:77— src/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php:77-83 | src/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php:78-84 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php:77` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php:108— src/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php:108-114 | src/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php:195-201 — 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 `src/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php:108` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:210— src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:210-216 | src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php:345-351 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:210` 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, `src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php:352` calls `addContentBefore`, `str_repeat` and `src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:217` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) src/Tokenizers/PHP.php:2433— src/Tokenizers/PHP.php:2433-2439 | src/Tokenizers/PHP.php:2520-2527 — 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) src/Tokenizers/Tokenizer.php:1542— src/Tokenizers/Tokenizer.php:1542-1548 | src/Tokenizers/Tokenizer.php:1633-1639 — 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) src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:144— src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:144-150 | src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:179-185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) src/Generators/Text.php:204— src/Generators/Text.php:204-219 | src/Generators/Text.php:226-241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Generators/Text.php:204` 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) src/Reports/Cbf.php:180— src/Reports/Cbf.php:180-195 | src/Reports/Summary.php:119-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Reports/Cbf.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.
Duplicated block (16 lines × 2) src/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php:57— src/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php:57-72 | src/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php:121-136 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) src/Standards/Generic/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php:126— src/Standards/Generic/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php:126-141 | src/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php:69-84 — before extracting anything, compare `src/Standards/Generic/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php` and `src/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php:126` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:655— src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:655-670 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1195-1210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:391— src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:391-406 | src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:462-477 — 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 `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:391` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:110— src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:110-125 | src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:130-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:655— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:655-670 | src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php:76-91 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:655` 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) src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:119— src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:119-134 | src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:153-168 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) src/Tokenizers/PHP.php:3254— src/Tokenizers/PHP.php:3254-3269 | src/Tokenizers/PHP.php:3313-3328 — 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 `src/Tokenizers/PHP.php:3254` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) src/Reports/Code.php:60— src/Reports/Code.php:60-71 | src/Reports/Diff.php:51-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (12 lines × 2) src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php:81— src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php:81-92 | src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php:172-183 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php:108— src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php:108-119 | src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php:168-179 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:523— src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:523-534 | src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:627-638 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php` and `src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:127— src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:127-138 | src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:145-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:127` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:237— src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:237-248 | src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:373-384 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:237` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:256— src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:256-267 | src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php:161-172 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php` and `src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php:50— src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php:50-61 | src/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php:60-71 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:203— src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:203-214 | src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:365-376 — 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 `src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:203` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/Util/Standards.php:103— src/Util/Standards.php:103-114 | src/Util/Standards.php:195-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Util/Standards.php:103` 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) src/Files/File.php:1655— src/Files/File.php:1655-1664 | src/Files/File.php:1989-1998 — 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 `src/Files/File.php:1655` 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) src/Generators/HTML.php:252— src/Generators/HTML.php:252-261 | src/Generators/Markdown.php:139-148 — before extracting anything, compare `src/Generators/HTML.php` and `src/Generators/Markdown.php` as WHOLE FILES: this scan already matched 4 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) src/Ruleset.php:1072— src/Ruleset.php:1072-1081 | src/Ruleset.php:1098-1107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php:63— src/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php:63-72 | src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:53-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1213— src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1213-1222 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1280-1289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php:112— src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php:112-121 | src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php:255-264 — 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 `src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:128— src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:128-137 | src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:124-133 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:128` 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) src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:333— src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:333-342 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:766-775 — 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 `src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:333` 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) src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:313— src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:313-322 | src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:357-366 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:313` 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) src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:56— src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:56-65 | src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:74-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) src/Files/File.php:1660— src/Files/File.php:1660-1676 | src/Files/File.php:1870-1886 — 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 `src/Files/File.php:1660` 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 (17 lines × 2) src/Files/File.php:2772— src/Files/File.php:2772-2788 | src/Files/File.php:2824-2840 — 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 `src/Files/File.php:2824` 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 (17 lines × 2) src/Standards/Generic/Sniffs/Commenting/FixmeSniff.php:54— src/Standards/Generic/Sniffs/Commenting/FixmeSniff.php:54-70 | src/Standards/Generic/Sniffs/Commenting/TodoSniff.php:53-69 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/Commenting/FixmeSniff.php:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:385— src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:385-401 | src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:430-446 — 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 `src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:385` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:421— src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:421-437 | src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:593-609 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php` and `src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:421` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:453— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:453-469 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:531-547 — 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 `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:453` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php:87— src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php:87-103 | src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php:155-171 — before extracting anything, compare `src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php` and `src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php:87` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:112— src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:112-128 | src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:351-367 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.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 (17 lines × 2) src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:126— src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:126-142 | src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:269-285 — 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 `src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:126` 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.
FileTooLong: Tokenizers/PHP.php src/Tokenizers/PHP.php— FileTooLong — 2182 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1682 over it, 4.36× 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: Files/File.php src/Files/File.php— FileTooLong — 1365 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: File (19-2850). The bar is 500 significant lines; this is 865 over it, 2.73× 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: Tokenizers/Tokenizer.php src/Tokenizers/Tokenizer.php— FileTooLong — 986 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: Tokenizer (15-1734). The bar is 500 significant lines; this is 486 over it, 1.97× 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: src/Config.php src/Config.php— FileTooLong — 969 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Config (75-1718). The bar is 500 significant lines; this is 469 over it, 1.94× 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: WhiteSpace/ScopeIndentSniff.php src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php— FileTooLong — 940 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: ScopeIndentSniff (17-1588). The bar is 500 significant lines; this is 440 over it, 1.88× 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: src/Ruleset.php src/Ruleset.php— FileTooLong — 727 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Ruleset (18-1458). The bar is 500 significant lines; this is 227 over it, 1.45× 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: Tokenizers/JS.php src/Tokenizers/JS.php— FileTooLong — 689 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: JS (16-1256). The bar is 500 significant lines; this is 189 over it, 1.38× 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: Arrays/ArrayDeclarationSniff.php src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php— FileTooLong — 535 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: ArrayDeclarationSniff (16-908). The bar is 500 significant lines; this is 35 over it, 1.07× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
Duplicated block (15 lines × 2) src/Files/File.php:2231— src/Files/File.php:2231-2245 | src/Files/File.php:2312-2326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php:193— src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php:193-207 | src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php:191-205 — before extracting anything, compare `src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php` and `src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php:193` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php:189` calls `ltrim` and `src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php:191` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15 lines × 2) src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php:175— src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php:175-189 | src/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php:149-163 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15 lines × 2) src/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php:32— src/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php:32-46 | src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php:41-55 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:288— src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:288-302 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:889-903 — 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 `src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:288` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:335— src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:335-349 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:680-694 — 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 `src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:335` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php:70— src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php:70-84 | src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php:138-152 — before extracting anything, compare `src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php` and `src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php:155— src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php:155-169 | src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php:305-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 `src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php:155` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:202— src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:202-206 | src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:72-76 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php` and `src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:202` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:69` calls `getDeclarationName`, `in_array` and `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:200` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:226— src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:226-230 | src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:76-80 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php:216— src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php:216-220 | src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:93-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 both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php:216` 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) src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:232— src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:232-236 | src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:242-246 — 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 `src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:232` 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) src/Tokenizers/PHP.php:2672— src/Tokenizers/PHP.php:2672-2676 | src/Tokenizers/PHP.php:2681-2686 — 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) src/Tokenizers/CSS.php:34— src/Tokenizers/CSS.php:34-38 | src/Tokenizers/JS.php:263-267 — 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) src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:236— src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:236-240 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1048-1052 — 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 `src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:236` 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) src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:202— src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:202-206 | src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:245-249 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:202` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/Standards/Generic/Sniffs/Formatting/SpaceBeforeCastSniff.php:49— src/Standards/Generic/Sniffs/Formatting/SpaceBeforeCastSniff.php:49-56 | src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:141-148 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/Formatting/SpaceBeforeCastSniff.php:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:355— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:355-362 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:594-601 — 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 `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:355` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:383— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:383-390 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:583-590 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php:155— src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php:155-162 | src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php:210-217 — 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 `src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php:155` 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) src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:156— src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:156-163 | src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:191-198 — 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 `src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.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 (8 lines × 2) src/Tokenizers/PHP.php:692— src/Tokenizers/PHP.php:692-699 | src/Tokenizers/PHP.php:2166-2173 — 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 `src/Tokenizers/PHP.php:692` 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) src/Tokenizers/PHP.php:2869— src/Tokenizers/PHP.php:2869-2878 | src/Tokenizers/PHP.php:2924-2931 — 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 `src/Tokenizers/PHP.php:2869` 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 (10 lines × 3) src/Reports/Gitblame.php:74— src/Reports/Gitblame.php:74-83 | src/Reports/Hgblame.php:93-102 | src/Reports/Svnblame.php:57-66 — before extracting anything, compare `src/Reports/Gitblame.php` and `src/Reports/Hgblame.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Reports/Gitblame.php:84` calls `chdir` and `src/Reports/Svnblame.php:68` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 3) src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:305— src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:305-314 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:736-745 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1388-1397 — 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 `src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:305` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:303` calls `isset` and `src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:735` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 3) src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1190— src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1190-1199 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1437-1446 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1453-1462 — 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 `src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1190` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php:163— src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php:163-173 | src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:237-246 | src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:269-279 — 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 `src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.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.
Duplicated block (10 lines × 3) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:603— src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:603-612 | src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:163-172 | src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:125-134 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:603` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) src/Standards/PSR12/Sniffs/ControlStructures/BooleanOperatorPlacementSniff.php:57— src/Standards/PSR12/Sniffs/ControlStructures/BooleanOperatorPlacementSniff.php:57-66 | src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:61-70 | src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:69-78 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (9 lines × 3) src/Fixer.php:442— src/Fixer.php:442-450 | src/Fixer.php:499-507 | src/Fixer.php:614-622 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:65— src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:65-73 | src/Standards/PSR12/Sniffs/Functions/ReturnTypeDeclarationSniff.php:46-54 | src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:68-76 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 3) src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:128— src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:128-136 | src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:124-132 | src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:363-371 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:128` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:207— src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:207-215 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:264-272 | src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:321-329 — 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 `src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:207` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) src/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php:86— src/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php:86-94 | src/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php:73-81 | src/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php:128-136 — 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 (18 lines × 2) src/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php:155— src/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php:155-172 | src/Standards/Generic/Sniffs/PHP/UpperCaseConstantSniff.php:35-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php:155` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php:102— src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php:102-119 | src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php:163-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php:102` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 2) src/Standards/Generic/Sniffs/WhiteSpace/IncrementDecrementSpacingSniff.php:88— src/Standards/Generic/Sniffs/WhiteSpace/IncrementDecrementSpacingSniff.php:88-105 | src/Standards/Generic/Sniffs/WhiteSpace/IncrementDecrementSpacingSniff.php:141-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/WhiteSpace/IncrementDecrementSpacingSniff.php:88` 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) src/Tokenizers/Tokenizer.php:1590— src/Tokenizers/Tokenizer.php:1590-1607 | src/Tokenizers/Tokenizer.php:1692-1709 — 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 `src/Tokenizers/Tokenizer.php:1590` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 3) src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php:104— src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php:104-118 | src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php:75-89 | src/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php:41-55 — before extracting anything, compare `src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php` and `src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 3) src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1123— src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1123-1137 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1158-1172 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1322-1336 — 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 `src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1123` 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. 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) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:337— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:337-351 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:448-462 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:526-540 — 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 `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:337` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 3) src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:144— src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:144-158 | src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:165-179 | src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:236-250 — 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 `src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:144` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:142` calls `foreach` and `src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:162` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) src/Config.php:1363— src/Config.php:1363-1376 | src/Config.php:1380-1393 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14 lines × 2) src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:273— src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:273-286 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:481-494 — 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 `src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:273` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:76— src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:76-89 | src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:93-106 — 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 `src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:76` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:684— src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:684-697 | src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:743-756 — 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 `src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:684` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:311— src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:311-318 | src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:239-246 | src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:343-350 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php` and `src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:311` 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 × 3) src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php:71— src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php:71-78 | src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:81-88 | src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php:238-245 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:79` calls `findNext`, `in_array` and `src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php:70` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 3) src/Standards/PSR12/Sniffs/Files/OpenTagSniff.php:55— src/Standards/PSR12/Sniffs/Files/OpenTagSniff.php:55-63 | src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php:119-126 | src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php:89-96 — before extracting anything, compare `src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php` and `src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR12/Sniffs/Files/OpenTagSniff.php:55` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:321— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:321-328 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:427-434 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:505-512 — 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 `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:321` 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) src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:96— src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:96-102 | src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php:90-96 | src/Standards/Generic/Sniffs/WhiteSpace/SpreadOperatorSpacingAfterSniff.php:94-100 — before extracting anything, compare `src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php` and `src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:96` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:106` calls `recordMetric` and `src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php:100` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) src/Standards/PSR12/Sniffs/Classes/ClosingBraceSniff.php:48— src/Standards/PSR12/Sniffs/Classes/ClosingBraceSniff.php:48-54 | src/Standards/PSR12/Sniffs/Classes/OpeningBraceSpaceSniff.php:43-49 | src/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php:55-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (7 lines × 3) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:474— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:474-480 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:552-558 | src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php:85-91 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7 lines × 3) src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:256— src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:256-262 | src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:316-322 | src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:360-366 — 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 `src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:256` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:92— src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:92-97 | src/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php:103-112 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:325-330 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:92` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php:77— src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php:77-82 | src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php:77-82 | src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:289-294 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php:77` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:152— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:152-159 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:622-628 | src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php:216-221 — 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 `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:152` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php:92— src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php:92-97 | src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php:106-111 | src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php:120-125 — 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 `src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php:92` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:321— src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:321-341 | src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:343-363 — 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 (21 lines × 2) src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php:141— src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php:141-161 | src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php:166-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (21 lines × 2) src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:82— src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:82-102 | src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:373-393 — 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) src/Fixer.php:494— src/Fixer.php:494-512 | src/Fixer.php:609-627 — 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 `src/Fixer.php:494` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (19 lines × 2) src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php:183— src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php:183-201 | src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php:316-334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php:183` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) src/Tokenizers/PHP.php:1458— src/Tokenizers/PHP.php:1458-1476 | src/Tokenizers/PHP.php:1539-1557 — 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 `src/Tokenizers/PHP.php:1458` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13–14 lines × 2) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:363— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:363-376 | src/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php:251-263 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:363` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 2) src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php:170— src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php:170-183 | src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php:172-184 — before extracting anything, compare `src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php` and `src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php:170` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–14 lines × 2) src/Tokenizers/Tokenizer.php:796— src/Tokenizers/Tokenizer.php:796-808 | src/Tokenizers/Tokenizer.php:812-825 — 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 `src/Tokenizers/Tokenizer.php:796` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–13 lines × 2) src/Config.php:849— src/Config.php:849-861 | src/Config.php:866-877 — 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 `src/Config.php:849` 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–13 lines × 2) src/Generators/HTML.php:34— src/Generators/HTML.php:34-46 | src/Generators/Markdown.php:29-40 — before extracting anything, compare `src/Generators/HTML.php` and `src/Generators/Markdown.php` as WHOLE FILES: this scan already matched 4 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Generators/HTML.php:32` calls `printToc` and `src/Generators/Markdown.php:27` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12–13 lines × 2) src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php:83— src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php:83-94 | src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php:225-237 — 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 `src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php:83` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–12 lines × 2) src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php:51— src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php:51-62 | src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php:50-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10–12 lines × 2) src/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php:89— src/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php:89-98 | src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php:96-107 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php:89` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–12 lines × 2) src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:186— src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:186-195 | src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:281-292 — 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 `src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:186` 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 (11 lines × 3) src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:458— src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:458-468 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:555-565 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:672-682 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 3) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:364— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:364-375 | src/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php:85-95 | src/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php:252-262 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:364` 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 × 3) src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:148— src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:148-159 | src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:243-253 | src/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php:138-149 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:75— src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:75-84 | src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php:90-98 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:75` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) src/Tokenizers/JS.php:1074— src/Tokenizers/JS.php:1074-1082 | src/Tokenizers/PHP.php:2436-2445 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Tokenizers/JS.php:1074` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Tokenizers/JS.php:1083` calls `str_repeat`, `count` and `src/Tokenizers/PHP.php:2446` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–10 lines × 2) src/Tokenizers/PHP.php:1365— src/Tokenizers/PHP.php:1365-1374 | src/Tokenizers/PHP.php:1400-1408 — 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 `src/Tokenizers/PHP.php:1365` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:124— src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:124-128 | src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:165-169 | src/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php:69-73 — 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 `src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:165— src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:165-169 | src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:288-292 | src/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php:69-73 — 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 `src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:165` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:263— src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:263-267 | src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php:168-172 | src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:179-183 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php` and `src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 90 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.
UseDeclarationSniff.process (cyclomatic 52) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:41— UseDeclarationSniff.process has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UseDeclarationSniff.process (cyclomatic 52) src/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php:41— UseDeclarationSniff.process has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (4 members, 50+ identical tokens) src/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php:42— src/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php:42-52 | src/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php:42-52 | src/Standards/Generic/Sniffs/Files/OneObjectStructurePerFileSniff.php:47-57 | src/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php:42-52 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:57— src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:57-148 | src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php:67-130 | src/Standards/Generic/Sniffs/WhiteSpace/SpreadOperatorSpacingAfterSniff.php:57-146 | src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:74-311 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (36 lines × 2) src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php:60— src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php:60-95 | src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php:60-95 — 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 (36 lines × 2) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:328— src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:328-363 | src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:369-404 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php` and `src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:328` 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 (34 lines × 2) src/Generators/Text.php:129— src/Generators/Text.php:129-162 | src/Generators/Text.php:164-197 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (34 lines × 2) src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:80— src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:80-113 | src/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php:121-154 — 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 (32–33 lines × 2) src/Reports/Code.php:162— src/Reports/Code.php:162-194 | src/Reports/Full.php:81-112 — before extracting anything, compare `src/Reports/Code.php` and `src/Reports/Full.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Reports/Code.php:162` 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 (32–33 lines × 2) src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php:32— src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php:32-63 | src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php:32-64 — before extracting anything, compare `src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php` and `src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (26 lines × 2) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:427— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:427-452 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:505-530 — 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 `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:427` 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 (26 lines × 2) src/Tokenizers/PHP.php:3513— src/Tokenizers/PHP.php:3513-3538 | src/Tokenizers/Tokenizer.php:852-877 — 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 (24 lines × 2) src/Standards/Generic/Sniffs/WhiteSpace/ArbitraryParenthesesSpacingSniff.php:136— src/Standards/Generic/Sniffs/WhiteSpace/ArbitraryParenthesesSpacingSniff.php:136-159 | src/Standards/Generic/Sniffs/WhiteSpace/ArbitraryParenthesesSpacingSniff.php:190-213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/WhiteSpace/ArbitraryParenthesesSpacingSniff.php:136` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24 lines × 2) src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:205— src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:205-228 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:262-285 — 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 (20 lines × 3) src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:129— src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:129-148 | src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php:111-130 | src/Standards/Generic/Sniffs/WhiteSpace/SpreadOperatorSpacingAfterSniff.php:127-146 — before extracting anything, compare `src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php` and `src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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 (20 lines × 3) src/Standards/Generic/Sniffs/PHP/LowerCaseTypeSniff.php:101— src/Standards/Generic/Sniffs/PHP/LowerCaseTypeSniff.php:101-120 | src/Standards/Generic/Sniffs/PHP/LowerCaseTypeSniff.php:132-151 | src/Standards/Generic/Sniffs/PHP/LowerCaseTypeSniff.php:164-183 — 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 `src/Standards/Generic/Sniffs/PHP/LowerCaseTypeSniff.php:101` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Standards/Generic/Sniffs/PHP/LowerCaseTypeSniff.php:162` calls `foreach` and `src/Standards/Generic/Sniffs/PHP/LowerCaseTypeSniff.php:98` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (19–20 lines × 2) src/Reports/Gitblame.php:35— src/Reports/Gitblame.php:35-53 | src/Reports/Hgblame.php:35-54 — before extracting anything, compare `src/Reports/Gitblame.php` and `src/Reports/Hgblame.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (19–20 lines × 2) src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:147— src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:147-166 | src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php:126-144 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:147` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:143— src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:143-162 | src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:164-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:142` calls `foreach` and `src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:162` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (20 lines × 2) src/Tokenizers/PHP.php:3256— src/Tokenizers/PHP.php:3256-3275 | src/Tokenizers/PHP.php:3378-3397 — 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 `src/Tokenizers/PHP.php:3256` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 3) src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:143— src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:143-158 | src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php:172-187 | src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php:77-92 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php` and `src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:143` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 3) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:392— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:392-407 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:465-480 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:543-558 — 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 `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:392` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:289— src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:289-303 | src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php:206-219 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php` and `src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14–15 lines × 2) src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:145— src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:145-159 | src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:240-253 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:145` 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 × 3) src/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php:58— src/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php:58-70 | src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:76-88 | src/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php:46-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 3) src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:191— src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:191-203 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:289-301 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:890-902 — 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 `src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:395— src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:395-405 | src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:420-431 — 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 `src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:395` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:150— src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:150-160 | src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:225-236 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:150` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 10) src/Standards/Generic/Sniffs/Arrays/ArrayIndentSniff.php:79— src/Standards/Generic/Sniffs/Arrays/ArrayIndentSniff.php:79-88 | src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php:205-215 | src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php:129-139 | src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php:164-174 | src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:270-280 | src/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php:154-164 | src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:122-131 | src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:172-181 | src/Standards/Squiz/Sniffs/CSS/IndentationSniff.php:129-139 | src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:154-163 — there are 10 copies across 9 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 10 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/Arrays/ArrayIndentSniff.php:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php:126` calls `findFirstOnLine` and `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:267` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 10) src/Standards/Generic/Sniffs/Arrays/ArrayIndentSniff.php:80— src/Standards/Generic/Sniffs/Arrays/ArrayIndentSniff.php:80-89 | src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php:206-216 | src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php:130-140 | src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php:165-175 | src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:480-490 | src/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php:155-165 | src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:123-132 | src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:173-182 | src/Standards/Squiz/Sniffs/CSS/IndentationSniff.php:130-140 | src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:155-164 — there are 10 copies across 9 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 10 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/Arrays/ArrayIndentSniff.php:80` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 4) src/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php:57— src/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php:57-65 | src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:75-83 | src/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php:45-53 | src/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php:62-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.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.
Duplicated block (9 lines × 4) src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php:61— src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php:61-69 | src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php:93-101 | src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php:148-156 | src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php:181-189 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php:146` calls `ltrim` and `src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php:91` 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 × 5) src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:204— src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:204-211 | src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:292-299 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:362-370 | src/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php:250-257 | src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php:331-338 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:213` calls `str_repeat`, `addContent` and `src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php:340` 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 × 5) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:392— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:392-399 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:465-472 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:543-550 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:655-662 | src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php:76-83 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:392` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:651` calls `processUseStatement`, `getTokens` and `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:390` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7–8 lines × 4) src/Files/File.php:2249— src/Files/File.php:2249-2255 | src/Files/File.php:2390-2397 | src/Files/File.php:2467-2473 | src/Files/File.php:2582-2588 — 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 `src/Files/File.php:2249` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–8 lines × 4) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:125— src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:125-131 | src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:143-149 | src/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php:177-183 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:106-113 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:135` calls `replaceToken` and `src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:115` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 4) src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:99— src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:99-104 | src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php:93-98 | src/Standards/Generic/Sniffs/WhiteSpace/SpreadOperatorSpacingAfterSniff.php:97-102 | src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:111-116 — before extracting anything, compare `src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php` and `src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:106` calls `recordMetric` and `src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php:100` 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 (6 lines × 4) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:149— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:149-154 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:619-624 | src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:161-166 | src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:123-128 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:149` 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.
PHP.tokenize (cyclomatic 494) src/Tokenizers/PHP.php:512— PHP.tokenize has cyclomatic complexity 494 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ScopeIndentSniff.process (cyclomatic 323) src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:127— ScopeIndentSniff.process has cyclomatic complexity 323 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PHP.processAdditional (cyclomatic 181) src/Tokenizers/PHP.php:2409— PHP.processAdditional has cyclomatic complexity 181 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Tokenizer.recurseScopeMap (cyclomatic 133) src/Tokenizers/Tokenizer.php:933— Tokenizer.recurseScopeMap has cyclomatic complexity 133 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
JS.tokenize (cyclomatic 122) src/Tokenizers/JS.php:279— JS.tokenize has cyclomatic complexity 122 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Config.processLongArgument (cyclomatic 114) src/Config.php:715— Config.processLongArgument has cyclomatic complexity 114 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArrayDeclarationSniff.processMultiLineArray (cyclomatic 112) src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:318— ArrayDeclarationSniff.processMultiLineArray has cyclomatic complexity 112 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InlineControlStructureSniff.process (cyclomatic 95) src/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php:67— InlineControlStructureSniff.process has cyclomatic complexity 95 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Tokenizer.createPositionMap (cyclomatic 90) src/Tokenizers/Tokenizer.php:170— Tokenizer.createPositionMap has cyclomatic complexity 90 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AbstractPatternSniff.processPattern (cyclomatic 88) src/Sniffs/AbstractPatternSniff.php:255— AbstractPatternSniff.processPattern has cyclomatic complexity 88 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSS.tokenize (cyclomatic 88) src/Tokenizers/CSS.php:52— CSS.tokenize has cyclomatic complexity 88 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ClassDeclarationSniff.processOpen (cyclomatic 84) src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:62— ClassDeclarationSniff.processOpen has cyclomatic complexity 84 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UseDeclarationSniff.processUseGroup (cyclomatic 82) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:283— UseDeclarationSniff.processUseGroup has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FunctionCommentSniff.processParams (cyclomatic 72) src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:281— FunctionCommentSniff.processParams 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.
MultipleStatementAlignmentSniff.checkAlignment (cyclomatic 68) src/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php:100— MultipleStatementAlignmentSniff.checkAlignment has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ControlStructureSpacingSniff.process (cyclomatic 67) src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php:64— ControlStructureSpacingSniff.process has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BlockCommentSniff.process (cyclomatic 66) src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:51— BlockCommentSniff.process has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DocCommentSniff.process (cyclomatic 65) src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:50— DocCommentSniff.process has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ControlSignatureSniff.process (cyclomatic 65) src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php:71— ControlSignatureSniff.process has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
File.getMethodParameters (cyclomatic 62) src/Files/File.php:1333— File.getMethodParameters has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ForLoopDeclarationSniff.process (cyclomatic 62) src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:72— ForLoopDeclarationSniff.process has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GitMergeConflictSniff.process (cyclomatic 61) src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php:54— GitMergeConflictSniff.process has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SideEffectsSniff.searchForConflict (cyclomatic 61) src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php:79— SideEffectsSniff.searchForConflict has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Ruleset.processRuleset (cyclomatic 60) src/Ruleset.php:317— Ruleset.processRuleset 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.
Ruleset.processRule (cyclomatic 60) src/Ruleset.php:867— Ruleset.processRule 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.
FunctionCallSignatureSniff.processMultiLineCall (cyclomatic 60) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:337— FunctionCallSignatureSniff.processMultiLineCall 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.
NonExecutableCodeSniff.process (cyclomatic 59) src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php:64— NonExecutableCodeSniff.process has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FunctionDeclarationArgumentSpacingSniff.processBracket (cyclomatic 58) src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:104— FunctionDeclarationArgumentSpacingSniff.processBracket has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SwitchDeclarationSniff.process (cyclomatic 57) src/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php:58— SwitchDeclarationSniff.process has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FunctionSpacingSniff.process (cyclomatic 57) src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php:69— FunctionSpacingSniff.process has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
File.addMessage (cyclomatic 56) src/Files/File.php:842— File.addMessage has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InlineCommentSniff.process (cyclomatic 53) src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php:54— InlineCommentSniff.process 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.
File.process (cyclomatic 52) src/Files/File.php:317— File.process has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UnusedFunctionParameterSniff.process (cyclomatic 52) src/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php:59— UnusedFunctionParameterSniff.process has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Code.generateFileReport (cyclomatic 51) src/Reports/Code.php:33— Code.generateFileReport has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MultiLineConditionSniff.process (cyclomatic 48) src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php:61— MultiLineConditionSniff.process has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OperatorBracketSniff.process (cyclomatic 48) src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php:51— OperatorBracketSniff.process has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EmbeddedPhpSniff.validateMultilineEmbeddedPhp (cyclomatic 47) src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:66— EmbeddedPhpSniff.validateMultilineEmbeddedPhp has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cache.load (cyclomatic 47) src/Util/Cache.php:42— Cache.load has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OperatorSpacingSniff.process (cyclomatic 45) src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:131— OperatorSpacingSniff.process has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
JS.processAdditional (cyclomatic 45) src/Tokenizers/JS.php:1052— JS.processAdditional has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DeclareStatementSniff.process (cyclomatic 44) src/Standards/PSR12/Sniffs/Files/DeclareStatementSniff.php:41— DeclareStatementSniff.process has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
File.findStartOfStatement (cyclomatic 42) src/Files/File.php:2346— File.findStartOfStatement has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SuperfluousWhitespaceSniff.process (cyclomatic 41) src/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php:72— SuperfluousWhitespaceSniff.process has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Runner.run (cyclomatic 39) src/Runner.php:353— Runner.run has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ForEachLoopDeclarationSniff.process (cyclomatic 39) src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:54— ForEachLoopDeclarationSniff.process has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Tokenizer.createLevelMap (cyclomatic 39) src/Tokenizers/Tokenizer.php:1500— Tokenizer.createLevelMap has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArbitraryParenthesesSpacingSniff.process (cyclomatic 38) src/Standards/Generic/Sniffs/WhiteSpace/ArbitraryParenthesesSpacingSniff.php:83— ArbitraryParenthesesSpacingSniff.process has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FunctionCommentSniff.processReturn (cyclomatic 38) src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:45— FunctionCommentSniff.processReturn has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CommentedOutCodeSniff.process (cyclomatic 38) src/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php:60— CommentedOutCodeSniff.process has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MemberVarSpacingSniff.processMemberVar (cyclomatic 38) src/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php:44— MemberVarSpacingSniff.processMemberVar has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Ruleset.expandRulesetReference (cyclomatic 37) src/Ruleset.php:685— Ruleset.expandRulesetReference has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FunctionCommentSniff.processParams (cyclomatic 37) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:265— FunctionCommentSniff.processParams has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SwitchDeclarationSniff.process (cyclomatic 37) src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php:48— SwitchDeclarationSniff.process has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Tokenizer.createTokenMap (cyclomatic 37) src/Tokenizers/Tokenizer.php:665— Tokenizer.createTokenMap has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VersionControl.generate (cyclomatic 36) src/Reports/VersionControl.php:150— VersionControl.generate has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DisallowSpaceIndentSniff.process (cyclomatic 36) src/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php:61— DisallowSpaceIndentSniff.process has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FunctionDeclarationSniff.process (cyclomatic 36) src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:63— FunctionDeclarationSniff.process has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ComparisonOperatorUsageSniff.process (cyclomatic 36) src/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php:89— ComparisonOperatorUsageSniff.process has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CreateWidgetTypeCallbackSniff.process (cyclomatic 35) src/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php:48— CreateWidgetTypeCallbackSniff.process 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.
BooleanOperatorPlacementSniff.process (cyclomatic 35) src/Standards/PSR12/Sniffs/ControlStructures/BooleanOperatorPlacementSniff.php:55— BooleanOperatorPlacementSniff.process 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.
DisallowMultipleAssignmentsSniff.process (cyclomatic 35) src/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php:41— DisallowMultipleAssignmentsSniff.process 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.
ConcatenationSpacingSniff.process (cyclomatic 34) src/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php:55— ConcatenationSpacingSniff.process has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FunctionDeclarationSniff.processArgumentList (cyclomatic 33) src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:372— FunctionDeclarationSniff.processArgumentList 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.
FileCommentSniff.process (cyclomatic 33) src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php:50— FileCommentSniff.process 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.
ScopeKeywordSpacingSniff.process (cyclomatic 33) src/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php:44— ScopeKeywordSpacingSniff.process 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.
OpeningFunctionBraceBsdAllmanSniff.process (cyclomatic 32) src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php:58— OpeningFunctionBraceBsdAllmanSniff.process 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.
DisallowTabIndentSniff.process (cyclomatic 32) src/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php:61— DisallowTabIndentSniff.process 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.
File.findEndOfStatement (cyclomatic 31) src/Files/File.php:2499— File.findEndOfStatement 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.
File.getMemberProperties (cyclomatic 30) src/Files/File.php:1796— File.getMemberProperties has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PropertyDeclarationSniff.processMemberVar (cyclomatic 30) src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php:28— PropertyDeclarationSniff.processMemberVar has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LongConditionClosingCommentSniff.process (cyclomatic 30) src/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php:83— LongConditionClosingCommentSniff.process has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Full.generateFileReport (cyclomatic 29) src/Reports/Full.php:33— Full.generateFileReport has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Source.generate (cyclomatic 29) src/Reports/Source.php:83— Source.generate has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FunctionCommentSniff.process (cyclomatic 29) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:60— FunctionCommentSniff.process has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FileHeaderSniff.processHeaderLines (cyclomatic 29) src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php:289— FileHeaderSniff.processHeaderLines has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SwitchDeclarationSniff.findNestedTerminator (cyclomatic 29) src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php:246— SwitchDeclarationSniff.findNestedTerminator has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ClassDeclarationSniff.processClose (cyclomatic 29) src/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php:99— ClassDeclarationSniff.processClose has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FunctionCommentThrowTagSniff.process (cyclomatic 29) src/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php:41— FunctionCommentThrowTagSniff.process has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EmptyPHPStatementSniff.process (cyclomatic 28) src/Standards/Generic/Sniffs/CodeAnalysis/EmptyPHPStatementSniff.php:47— EmptyPHPStatementSniff.process 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.
OpeningFunctionBraceKernighanRitchieSniff.process (cyclomatic 28) src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php:58— OpeningFunctionBraceKernighanRitchieSniff.process 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.
ControlStructureSpacingSniff.process (cyclomatic 28) src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:59— ControlStructureSpacingSniff.process 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.
ArrayDeclarationSniff.processSingleLineArray (cyclomatic 28) src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:144— ArrayDeclarationSniff.processSingleLineArray 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.
EmbeddedPhpSniff.validateInlineEmbeddedPhp (cyclomatic 28) src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:299— EmbeddedPhpSniff.validateInlineEmbeddedPhp 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.
FileHeaderSniff.getHeaderLines (cyclomatic 27) src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php:131— FileHeaderSniff.getHeaderLines 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.
File.getMethodProperties (cyclomatic 26) src/Files/File.php:1623— File.getMethodProperties has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UselessOverridingMethodSniff.process (cyclomatic 26) src/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php:53— UselessOverridingMethodSniff.process has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ObjectOperatorIndentSniff.process (cyclomatic 26) src/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php:64— ObjectOperatorIndentSniff.process has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ClassDefinitionOpeningBraceSpaceSniff.process (cyclomatic 26) src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php:48— ClassDefinitionOpeningBraceSpaceSniff.process has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SelfMemberReferenceSniff.processTokenWithinScope (cyclomatic 26) src/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php:44— SelfMemberReferenceSniff.processTokenWithinScope has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VariableCommentSniff.processMemberVar (cyclomatic 26) src/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php:29— VariableCommentSniff.processMemberVar has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
File.isReference (cyclomatic 25) src/Files/File.php:2032— File.isReference 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.
IncludeSystemSniff.processTokenWithinScope (cyclomatic 25) src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php:63— IncludeSystemSniff.processTokenWithinScope 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.
FunctionCallSignatureSniff.processSingleLineCall (cyclomatic 25) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:207— FunctionCallSignatureSniff.processSingleLineCall 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.
OperatorBracketSniff.addMissingBracketsError (cyclomatic 25) src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php:274— OperatorBracketSniff.addMissingBracketsError 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.
Runner.printProgress (cyclomatic 24) src/Runner.php:828— Runner.printProgress 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.
IncrementDecrementSpacingSniff.process (cyclomatic 24) src/Standards/Generic/Sniffs/WhiteSpace/IncrementDecrementSpacingSniff.php:54— IncrementDecrementSpacingSniff.process 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.
UnusedSystemSniff.process (cyclomatic 24) src/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php:40— UnusedSystemSniff.process 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.
MethodDeclarationSniff.processTokenWithinScope (cyclomatic 24) src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php:39— MethodDeclarationSniff.processTokenWithinScope 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.
Fixer.replaceToken (cyclomatic 23) src/Fixer.php:474— Fixer.replaceToken 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.
IndentationSniff.process (cyclomatic 23) src/Standards/Squiz/Sniffs/CSS/IndentationSniff.php:55— IndentationSniff.process 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.
LowercasePHPFunctionsSniff.process (cyclomatic 23) src/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php:60— LowercasePHPFunctionsSniff.process has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FunctionClosingBraceSpaceSniff.process (cyclomatic 23) src/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php:53— FunctionClosingBraceSpaceSniff.process 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.
LineLengthSniff.checkLineLength (cyclomatic 22) src/Standards/Generic/Sniffs/Files/LineLengthSniff.php:97— LineLengthSniff.checkLineLength 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.
ScopeClosingBraceSniff.process (cyclomatic 22) src/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php:48— ScopeClosingBraceSniff.process 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.
Config.processShortArgument (cyclomatic 21) src/Config.php:610— Config.processShortArgument has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Ruleset.__construct (cyclomatic 21) src/Ruleset.php:128— Ruleset.__construct 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.
SpaceAfterCastSniff.process (cyclomatic 21) src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:55— SpaceAfterCastSniff.process 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.
DocCommentAlignmentSniff.process (cyclomatic 21) src/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php:51— DocCommentAlignmentSniff.process 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.
Summary.generate (cyclomatic 20) src/Reports/Summary.php:65— Summary.generate 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.
Runner.processFile (cyclomatic 20) src/Runner.php:621— Runner.processFile 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.
SpreadOperatorSpacingAfterSniff.process (cyclomatic 20) src/Standards/Generic/Sniffs/WhiteSpace/SpreadOperatorSpacingAfterSniff.php:55— SpreadOperatorSpacingAfterSniff.process 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.
FileCommentSniff.process (cyclomatic 20) src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:93— FileCommentSniff.process 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.
InlineIfDeclarationSniff.process (cyclomatic 20) src/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php:40— InlineIfDeclarationSniff.process 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.
JS.getRegexToken (cyclomatic 20) src/Tokenizers/JS.php:915— JS.getRegexToken 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.
ValidatePEARPackageXML.checkFileTag (cyclomatic 19) scripts/ValidatePEAR/ValidatePEARPackageXML.php:207— ValidatePEARPackageXML.checkFileTag 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.
LanguageConstructSpacingSniff.process (cyclomatic 19) src/Standards/Generic/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php:56— LanguageConstructSpacingSniff.process 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.
ReturnTypeDeclarationSniff.process (cyclomatic 19) src/Standards/PSR12/Sniffs/Functions/ReturnTypeDeclarationSniff.php:44— ReturnTypeDeclarationSniff.process 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.
ShorthandSizeSniff.process (cyclomatic 19) src/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php:62— ShorthandSizeSniff.process 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.
Config.__construct (cyclomatic 18) src/Config.php:340— Config.__construct 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.
Ruleset.setSniffProperty (cyclomatic 18) src/Ruleset.php:1309— Ruleset.setSniffProperty 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.
AssignmentInConditionSniff.process (cyclomatic 18) src/Standards/Generic/Sniffs/CodeAnalysis/AssignmentInConditionSniff.php:78— AssignmentInConditionSniff.process 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.
DisallowAlternativePHPTagsSniff.process (cyclomatic 18) src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php:72— DisallowAlternativePHPTagsSniff.process 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.
DisallowShortOpenTagSniff.process (cyclomatic 18) src/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php:51— DisallowShortOpenTagSniff.process 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.
LowerCaseTypeSniff.process (cyclomatic 18) src/Standards/Generic/Sniffs/PHP/LowerCaseTypeSniff.php:71— LowerCaseTypeSniff.process 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.
IncludingFileSniff.process (cyclomatic 18) src/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php:48— IncludingFileSniff.process 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.
IncrementDecrementUsageSniff.processAssignment (cyclomatic 18) src/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php:119— IncrementDecrementUsageSniff.processAssignment 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.
Comment.tokenizeString (cyclomatic 18) src/Tokenizers/Comment.php:30— Comment.tokenizeString 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.
Common.suggestType (cyclomatic 18) src/Util/Common.php:446— Common.suggestType 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.
ValidatePEARPackageXML.checkPHPRelease (cyclomatic 17) scripts/ValidatePEAR/ValidatePEARPackageXML.php:276— ValidatePEARPackageXML.checkPHPRelease 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.
Config.restoreDefaults (cyclomatic 17) src/Config.php:479— Config.restoreDefaults 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.
Text.printCodeComparisonBlock (cyclomatic 17) src/Generators/Text.php:126— Text.printCodeComparisonBlock 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.
VersionControl.generateFileReport (cyclomatic 17) src/Reports/VersionControl.php:41— VersionControl.generateFileReport 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.
AbstractVariableSniff.processTokenWithinScope (cyclomatic 17) src/Sniffs/AbstractVariableSniff.php:78— AbstractVariableSniff.processTokenWithinScope 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.
FunctionCallArgumentSpacingSniff.checkSpacing (cyclomatic 17) src/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php:102— FunctionCallArgumentSpacingSniff.checkSpacing 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.
ClassDeclarationSniff.process (cyclomatic 17) src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php:45— ClassDeclarationSniff.process 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.
ValidFunctionNameSniff.processTokenOutsideScope (cyclomatic 17) src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php:181— ValidFunctionNameSniff.processTokenOutsideScope 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.
AnonClassDeclarationSniff.processSingleLineArgumentList (cyclomatic 17) src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php:143— AnonClassDeclarationSniff.processSingleLineArgumentList 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.
ClassDefinitionClosingBraceSpaceSniff.process (cyclomatic 17) src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php:48— ClassDefinitionClosingBraceSpaceSniff.process 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.
ClosingDeclarationCommentSniff.process (cyclomatic 17) src/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php:45— ClosingDeclarationCommentSniff.process 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.
OperatorSpacingSniff.isOperator (cyclomatic 17) src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:326— OperatorSpacingSniff.isOperator 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.
Config.setConfigData (cyclomatic 16) src/Config.php:1566— Config.setConfigData 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.
File.findPrevious (cyclomatic 16) src/Files/File.php:2216— File.findPrevious 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.
DisallowYodaConditionsSniff.process (cyclomatic 16) src/Standards/Generic/Sniffs/ControlStructures/DisallowYodaConditionsSniff.php:42— DisallowYodaConditionsSniff.process 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.
FileCommentSniff.processTags (cyclomatic 16) src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:223— FileCommentSniff.processTags 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.
ValidFunctionNameSniff.processTokenWithinScope (cyclomatic 16) src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php:73— ValidFunctionNameSniff.processTokenWithinScope 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.
DisallowComparisonAssignmentSniff.process (cyclomatic 16) src/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php:41— DisallowComparisonAssignmentSniff.process 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.
DoubleQuoteUsageSniff.process (cyclomatic 16) src/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php:43— DoubleQuoteUsageSniff.process 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.
PHP.tokenize (cognitive 1203) src/Tokenizers/PHP.php:512— PHP.tokenize has cognitive complexity 1203 (threshold 15). Drivers by points: if/else 231 (813 pts), boolean chains 252, loops 36 (138 pts) (nesting depth added 684). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Config.processLongArgument (cognitive 1063) src/Config.php:715— Config.processLongArgument has cognitive complexity 1063 (threshold 15). Drivers by points: if/else 117 (955 pts), loops 7 (69 pts), error handling 3 (30 pts), boolean chains 8, match/switch 1 (nesting depth added 927). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PHP.processAdditional (cognitive 974) src/Tokenizers/PHP.php:2409— PHP.processAdditional has cognitive complexity 974 (threshold 15). Drivers by points: if/else 117 (766 pts), loops 26 (160 pts), boolean chains 48 (nesting depth added 783). 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.
ScopeIndentSniff.process (cognitive 953) src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:127— ScopeIndentSniff.process has cognitive complexity 953 (threshold 15). Drivers by points: if/else 250 (835 pts), boolean chains 100, loops 6 (18 pts) (nesting depth added 597). 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.
Tokenizer.recurseScopeMap (cognitive 518) src/Tokenizers/Tokenizer.php:933— Tokenizer.recurseScopeMap has cognitive complexity 518 (threshold 15). Drivers by points: if/else 107 (451 pts), boolean chains 44, loops 4 (23 pts) (nesting depth added 363). 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.
Tokenizer.createPositionMap (cognitive 507) src/Tokenizers/Tokenizer.php:170— Tokenizer.createPositionMap has cognitive complexity 507 (threshold 15). Drivers by points: if/else 75 (399 pts), loops 10 (85 pts), boolean chains 23 (nesting depth added 399). 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.
JS.tokenize (cognitive 372) src/Tokenizers/JS.php:279— JS.tokenize has cognitive complexity 372 (threshold 15). Drivers by points: if/else 94 (309 pts), loops 12 (35 pts), boolean chains 28 (nesting depth added 238). 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.
AbstractPatternSniff.processPattern (cognitive 368) src/Sniffs/AbstractPatternSniff.php:255— AbstractPatternSniff.processPattern has cognitive complexity 368 (threshold 15). Drivers by points: if/else 85 (333 pts), boolean chains 21, loops 4 (14 pts) (nesting depth added 258). 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.
UseDeclarationSniff.processUseGroup (cognitive 335) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:283— UseDeclarationSniff.processUseGroup has cognitive complexity 335 (threshold 15). Drivers by points: if/else 91 (272 pts), loops 12 (59 pts), boolean chains 4 (nesting depth added 228). 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.
ArrayDeclarationSniff.processMultiLineArray (cognitive 332) src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:318— ArrayDeclarationSniff.processMultiLineArray has cognitive complexity 332 (threshold 15). Drivers by points: if/else 105 (287 pts), loops 8 (25 pts), boolean chains 20 (nesting depth added 199). 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.
ClassDeclarationSniff.processOpen (cognitive 274) src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:62— ClassDeclarationSniff.processOpen has cognitive complexity 274 (threshold 15). Drivers by points: if/else 80 (225 pts), loops 9 (34 pts), boolean chains 15 (nesting depth added 170). 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.
CSS.tokenize (cognitive 232) src/Tokenizers/CSS.php:52— CSS.tokenize has cognitive complexity 232 (threshold 15). Drivers by points: if/else 60 (182 pts), loops 9 (28 pts), boolean chains 20, match/switch 1 (2 pts) (nesting depth added 142). 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.
UseDeclarationSniff.process (cognitive 228) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:41— UseDeclarationSniff.process has cognitive complexity 228 (threshold 15). Drivers by points: if/else 44 (186 pts), loops 8 (36 pts), boolean chains 6 (nesting depth added 170). 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.
FunctionCommentSniff.processParams (cognitive 223) src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:281— FunctionCommentSniff.processParams has cognitive complexity 223 (threshold 15). Drivers by points: if/else 65 (196 pts), loops 8 (16 pts), boolean chains 11 (nesting depth added 139). 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.
JS.processAdditional (cognitive 211) src/Tokenizers/JS.php:1052— JS.processAdditional has cognitive complexity 211 (threshold 15). Drivers by points: if/else 35 (158 pts), loops 10 (49 pts), boolean chains 4 (nesting depth added 162). 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.
Tokenizer.createLevelMap (cognitive 202) src/Tokenizers/Tokenizer.php:1500— Tokenizer.createLevelMap has cognitive complexity 202 (threshold 15). Drivers by points: if/else 28 (136 pts), loops 9 (63 pts), boolean chains 3 (nesting depth added 162). 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.
FunctionDeclarationArgumentSpacingSniff.processBracket (cognitive 198) src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:104— FunctionDeclarationArgumentSpacingSniff.processBracket has cognitive complexity 198 (threshold 15). Drivers by points: if/else 65 (196 pts), boolean chains 1, loops 1 (nesting depth added 131). 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.
SwitchDeclarationSniff.process (cognitive 193) src/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php:58— SwitchDeclarationSniff.process has cognitive complexity 193 (threshold 15). Drivers by points: if/else 47 (157 pts), loops 6 (26 pts), boolean chains 10 (nesting depth added 130). 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.
FunctionCallSignatureSniff.processMultiLineCall (cognitive 190) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:337— FunctionCallSignatureSniff.processMultiLineCall has cognitive complexity 190 (threshold 15). Drivers by points: if/else 57 (169 pts), boolean chains 11, loops 3 (10 pts) (nesting depth added 119). 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.
Ruleset.processRule (cognitive 189) src/Ruleset.php:867— Ruleset.processRule has cognitive complexity 189 (threshold 15). Drivers by points: if/else 45 (155 pts), loops 7 (22 pts), boolean chains 12 (nesting depth added 125). 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.
MultipleStatementAlignmentSniff.checkAlignment (cognitive 189) src/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php:100— MultipleStatementAlignmentSniff.checkAlignment has cognitive complexity 189 (threshold 15). Drivers by points: if/else 67 (165 pts), loops 5 (13 pts), boolean chains 11 (nesting depth added 106). 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.
InlineControlStructureSniff.process (cognitive 180) src/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php:67— InlineControlStructureSniff.process has cognitive complexity 180 (threshold 15). Drivers by points: if/else 61 (131 pts), boolean chains 39, loops 4 (10 pts) (nesting depth added 76). 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.
ForLoopDeclarationSniff.process (cognitive 177) src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:72— ForLoopDeclarationSniff.process has cognitive complexity 177 (threshold 15). Drivers by points: if/else 46 (126 pts), loops 7 (34 pts), boolean chains 17 (nesting depth added 107). 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.
ControlSignatureSniff.process (cognitive 173) src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php:71— ControlSignatureSniff.process has cognitive complexity 173 (threshold 15). Drivers by points: if/else 59 (137 pts), loops 4 (21 pts), boolean chains 15 (nesting depth added 95). 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.
DocCommentSniff.process (cognitive 168) src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:50— DocCommentSniff.process has cognitive complexity 168 (threshold 15). Drivers by points: if/else 49 (131 pts), loops 11 (29 pts), boolean chains 8 (nesting depth added 100). 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.
Tokenizer.createTokenMap (cognitive 158) src/Tokenizers/Tokenizer.php:665— Tokenizer.createTokenMap has cognitive complexity 158 (threshold 15). Drivers by points: if/else 35 (144 pts), loops 3 (11 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 118). 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.
File.process (cognitive 153) src/Files/File.php:317— File.process has cognitive complexity 153 (threshold 15). Drivers by points: if/else 36 (126 pts), loops 5 (14 pts), boolean chains 13 (nesting depth added 99). 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.
SwitchDeclarationSniff.findNestedTerminator (cognitive 151) src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php:246— SwitchDeclarationSniff.findNestedTerminator has cognitive complexity 151 (threshold 15). Drivers by points: if/else 30 (137 pts), loops 2 (11 pts), boolean chains 3 (nesting depth added 116). 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.
UnusedFunctionParameterSniff.process (cognitive 150) src/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php:59— UnusedFunctionParameterSniff.process has cognitive complexity 150 (threshold 15). Drivers by points: if/else 40 (119 pts), loops 7 (20 pts), boolean chains 11 (nesting depth added 92). 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.
UseDeclarationSniff.process (cognitive 147) src/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php:41— UseDeclarationSniff.process has cognitive complexity 147 (threshold 15). Drivers by points: if/else 40 (107 pts), loops 7 (27 pts), boolean chains 9, match/switch 1 (4 pts) (nesting depth added 90). 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.
Code.generateFileReport (cognitive 138) src/Reports/Code.php:33— Code.generateFileReport has cognitive complexity 138 (threshold 15). Drivers by points: if/else 46 (114 pts), loops 10 (19 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 78). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ruleset.processRuleset (cognitive 135) src/Ruleset.php:317— Ruleset.processRuleset has cognitive complexity 135 (threshold 15). Drivers by points: if/else 49 (115 pts), loops 10 (14 pts), boolean chains 6 (nesting depth added 70). 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.
MultiLineConditionSniff.process (cognitive 133) src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php:61— MultiLineConditionSniff.process has cognitive complexity 133 (threshold 15). Drivers by points: if/else 51 (116 pts), loops 3 (10 pts), boolean chains 7 (nesting depth added 72). 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.
BlockCommentSniff.process (cognitive 133) src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:51— BlockCommentSniff.process has cognitive complexity 133 (threshold 15). Drivers by points: if/else 57 (113 pts), boolean chains 13, loops 4 (7 pts) (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.
DeclareStatementSniff.process (cognitive 129) src/Standards/PSR12/Sniffs/Files/DeclareStatementSniff.php:41— DeclareStatementSniff.process has cognitive complexity 129 (threshold 15). Drivers by points: if/else 49 (119 pts), loops 2 (9 pts), boolean chains 1 (nesting depth added 77). 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.
ControlStructureSpacingSniff.process (cognitive 129) src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php:64— ControlStructureSpacingSniff.process has cognitive complexity 129 (threshold 15). Drivers by points: if/else 44 (89 pts), boolean chains 25, loops 5 (15 pts) (nesting depth added 55). 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.
SuperfluousWhitespaceSniff.process (cognitive 129) src/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php:72— SuperfluousWhitespaceSniff.process has cognitive complexity 129 (threshold 15). Drivers by points: if/else 33 (102 pts), loops 5 (20 pts), boolean chains 7 (nesting depth added 84). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
FunctionCommentSniff.processReturn (cognitive 126) src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:45— FunctionCommentSniff.processReturn has cognitive complexity 126 (threshold 15). Drivers by points: if/else 28 (102 pts), loops 4 (15 pts), boolean chains 9 (nesting depth added 85). 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.
SideEffectsSniff.searchForConflict (cognitive 124) src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php:79— SideEffectsSniff.searchForConflict has cognitive complexity 124 (threshold 15). Drivers by points: if/else 33 (93 pts), boolean chains 27, loops 2 (4 pts) (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.
SwitchDeclarationSniff.process (cognitive 120) src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php:48— SwitchDeclarationSniff.process has cognitive complexity 120 (threshold 15). Drivers by points: if/else 32 (103 pts), loops 3 (10 pts), boolean chains 7 (nesting depth added 78). 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.
FunctionCommentSniff.processParams (cognitive 117) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:265— FunctionCommentSniff.processParams has cognitive complexity 117 (threshold 15). Drivers by points: if/else 34 (95 pts), loops 9 (22 pts) (nesting depth added 74). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
EmbeddedPhpSniff.validateMultilineEmbeddedPhp (cognitive 117) src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:66— EmbeddedPhpSniff.validateMultilineEmbeddedPhp has cognitive complexity 117 (threshold 15). Drivers by points: if/else 41 (90 pts), loops 6 (20 pts), boolean chains 7 (nesting depth added 63). 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.
FunctionSpacingSniff.process (cognitive 115) src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php:69— FunctionSpacingSniff.process has cognitive complexity 115 (threshold 15). Drivers by points: if/else 45 (90 pts), loops 7 (14 pts), boolean chains 11 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitMergeConflictSniff.process (cognitive 113) src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php:54— GitMergeConflictSniff.process has cognitive complexity 113 (threshold 15). Drivers by points: if/else 23 (79 pts), boolean chains 27, match/switch 2 (6 pts), loops 1 (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OperatorBracketSniff.process (cognitive 113) src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php:51— OperatorBracketSniff.process has cognitive complexity 113 (threshold 15). Drivers by points: if/else 34 (89 pts), boolean chains 14, loops 3 (10 pts) (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.
ComparisonOperatorUsageSniff.process (cognitive 112) src/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php:89— ComparisonOperatorUsageSniff.process has cognitive complexity 112 (threshold 15). Drivers by points: if/else 32 (99 pts), boolean chains 9, loops 2 (4 pts) (nesting depth added 69). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Ruleset.expandRulesetReference (cognitive 111) src/Ruleset.php:685— Ruleset.expandRulesetReference has cognitive complexity 111 (threshold 15). Drivers by points: if/else 42 (102 pts), loops 1 (5 pts), boolean chains 4 (nesting depth added 64). 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.
Runner.run (cognitive 111) src/Runner.php:353— Runner.run has cognitive complexity 111 (threshold 15). Drivers by points: if/else 35 (88 pts), loops 6 (21 pts), boolean chains 2 (nesting depth added 68). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
NonExecutableCodeSniff.process (cognitive 110) src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php:64— NonExecutableCodeSniff.process has cognitive complexity 110 (threshold 15). Drivers by points: if/else 40 (85 pts), boolean chains 16, loops 5 (9 pts) (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ArbitraryParenthesesSpacingSniff.process (cognitive 109) src/Standards/Generic/Sniffs/WhiteSpace/ArbitraryParenthesesSpacingSniff.php:83— ArbitraryParenthesesSpacingSniff.process has cognitive complexity 109 (threshold 15). Drivers by points: if/else 34 (88 pts), loops 2 (12 pts), boolean chains 9 (nesting depth added 64). 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.
InlineCommentSniff.process (cognitive 109) src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php:54— InlineCommentSniff.process has cognitive complexity 109 (threshold 15). Drivers by points: if/else 42 (89 pts), loops 7 (14 pts), boolean chains 6 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
File.getMethodParameters (cognitive 106) src/Files/File.php:1333— File.getMethodParameters has cognitive complexity 106 (threshold 15). Drivers by points: if/else 32 (91 pts), loops 3 (8 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 65). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionDeclarationSniff.process (cognitive 104) src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:63— FunctionDeclarationSniff.process has cognitive complexity 104 (threshold 15). Drivers by points: if/else 44 (99 pts), boolean chains 5 (nesting depth added 55). 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.
OperatorSpacingSniff.process (cognitive 101) src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:131— OperatorSpacingSniff.process has cognitive complexity 101 (threshold 15). Drivers by points: if/else 37 (80 pts), boolean chains 15, loops 1 (6 pts) (nesting depth added 48). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
MemberVarSpacingSniff.processMemberVar (cognitive 99) src/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php:44— MemberVarSpacingSniff.processMemberVar has cognitive complexity 99 (threshold 15). Drivers by points: if/else 28 (73 pts), loops 5 (18 pts), boolean chains 8 (nesting depth added 58). 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.
File.addMessage (cognitive 97) src/Files/File.php:842— File.addMessage has cognitive complexity 97 (threshold 15). Drivers by points: if/else 39 (70 pts), boolean chains 14, loops 7 (13 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ForEachLoopDeclarationSniff.process (cognitive 97) src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:54— ForEachLoopDeclarationSniff.process has cognitive complexity 97 (threshold 15). Drivers by points: if/else 44 (95 pts), boolean chains 2 (nesting depth added 51). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Cache.load (cognitive 97) src/Util/Cache.php:42— Cache.load has cognitive complexity 97 (threshold 15). Drivers by points: if/else 35 (73 pts), loops 9 (17 pts), boolean chains 7 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileHeaderSniff.processHeaderLines (cognitive 96) src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php:289— FileHeaderSniff.processHeaderLines has cognitive complexity 96 (threshold 15). Drivers by points: if/else 19 (70 pts), loops 6 (20 pts), boolean chains 6 (nesting depth added 65). 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.
OpeningFunctionBraceBsdAllmanSniff.process (cognitive 82) src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php:58— OpeningFunctionBraceBsdAllmanSniff.process has cognitive complexity 82 (threshold 15). Drivers by points: if/else 29 (70 pts), loops 2 (8 pts), boolean chains 4 (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DisallowTabIndentSniff.process (cognitive 82) src/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php:61— DisallowTabIndentSniff.process has cognitive complexity 82 (threshold 15). Drivers by points: if/else 28 (71 pts), boolean chains 10, loops 1 (nesting depth added 43). 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.
ClassDefinitionOpeningBraceSpaceSniff.process (cognitive 82) src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php:48— ClassDefinitionOpeningBraceSpaceSniff.process has cognitive complexity 82 (threshold 15). Drivers by points: if/else 27 (65 pts), loops 4 (17 pts) (nesting depth added 51). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
BooleanOperatorPlacementSniff.process (cognitive 81) src/Standards/PSR12/Sniffs/ControlStructures/BooleanOperatorPlacementSniff.php:55— BooleanOperatorPlacementSniff.process has cognitive complexity 81 (threshold 15). Drivers by points: if/else 31 (74 pts), boolean chains 4, loops 2, match/switch 1 (nesting depth added 43). 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.
DisallowSpaceIndentSniff.process (cognitive 80) src/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php:61— DisallowSpaceIndentSniff.process has cognitive complexity 80 (threshold 15). Drivers by points: if/else 29 (68 pts), boolean chains 11, loops 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.
ArrayDeclarationSniff.processSingleLineArray (cognitive 80) src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:144— ArrayDeclarationSniff.processSingleLineArray has cognitive complexity 80 (threshold 15). Drivers by points: if/else 28 (75 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 48). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
VersionControl.generate (cognitive 79) src/Reports/VersionControl.php:150— VersionControl.generate has cognitive complexity 79 (threshold 15). Drivers by points: if/else 32 (65 pts), loops 5 (9 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Runner.printProgress (cognitive 79) src/Runner.php:828— Runner.printProgress has cognitive complexity 79 (threshold 15). Drivers by points: if/else 27 (75 pts), boolean chains 4 (nesting depth added 48). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PropertyDeclarationSniff.processMemberVar (cognitive 79) src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php:28— PropertyDeclarationSniff.processMemberVar has cognitive complexity 79 (threshold 15). Drivers by points: if/else 26 (60 pts), loops 3 (15 pts), boolean chains 3, error handling 1 (nesting depth added 46). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
File.findStartOfStatement (cognitive 78) src/Files/File.php:2346— File.findStartOfStatement has cognitive complexity 78 (threshold 15). Drivers by points: if/else 23 (54 pts), boolean chains 18, loops 4 (6 pts) (nesting depth added 33). 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.
Full.generateFileReport (cognitive 76) src/Reports/Full.php:33— Full.generateFileReport has cognitive complexity 76 (threshold 15). Drivers by points: if/else 24 (58 pts), loops 7 (16 pts), boolean chains 2 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionDeclarationSniff.processArgumentList (cognitive 76) src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:372— FunctionDeclarationSniff.processArgumentList has cognitive complexity 76 (threshold 15). Drivers by points: if/else 27 (66 pts), boolean chains 8, loops 2 (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.
ClassDeclarationSniff.processClose (cognitive 73) src/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php:99— ClassDeclarationSniff.processClose has cognitive complexity 73 (threshold 15). Drivers by points: if/else 25 (62 pts), boolean chains 6, loops 2 (5 pts) (nesting depth added 40). 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.
FunctionCallSignatureSniff.processSingleLineCall (cognitive 72) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:207— FunctionCallSignatureSniff.processSingleLineCall has cognitive complexity 72 (threshold 15). Drivers by points: if/else 24 (53 pts), loops 3 (16 pts), boolean chains 3 (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
FunctionClosingBraceSpaceSniff.process (cognitive 69) src/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php:53— FunctionClosingBraceSpaceSniff.process has cognitive complexity 69 (threshold 15). Drivers by points: if/else 21 (53 pts), loops 3 (14 pts), boolean chains 2 (nesting depth added 43). 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.
File.findEndOfStatement (cognitive 68) src/Files/File.php:2499— File.findEndOfStatement has cognitive complexity 68 (threshold 15). Drivers by points: if/else 20 (54 pts), boolean chains 11, loops 2 (3 pts) (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CreateWidgetTypeCallbackSniff.process (cognitive 68) src/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php:48— CreateWidgetTypeCallbackSniff.process has cognitive complexity 68 (threshold 15). Drivers by points: if/else 24 (53 pts), boolean chains 9, loops 3 (6 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommentedOutCodeSniff.process (cognitive 67) src/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php:60— CommentedOutCodeSniff.process has cognitive complexity 67 (threshold 15). Drivers by points: if/else 33 (58 pts), boolean chains 6, loops 2, error handling 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.
Source.generate (cognitive 66) src/Reports/Source.php:83— Source.generate has cognitive complexity 66 (threshold 15). Drivers by points: if/else 35 (62 pts), loops 3, boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionCommentThrowTagSniff.process (cognitive 66) src/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php:41— FunctionCommentThrowTagSniff.process has cognitive complexity 66 (threshold 15). Drivers by points: if/else 25 (52 pts), loops 5 (11 pts), boolean chains 3 (nesting depth added 33). 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.
ConcatenationSpacingSniff.process (cognitive 64) src/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php:55— ConcatenationSpacingSniff.process has cognitive complexity 64 (threshold 15). Drivers by points: if/else 27 (50 pts), boolean chains 14 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileCommentSniff.process (cognitive 63) src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php:50— FileCommentSniff.process has cognitive complexity 63 (threshold 15). Drivers by points: if/else 24 (53 pts), boolean chains 7, loops 3 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ControlStructureSpacingSniff.process (cognitive 62) src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:59— ControlStructureSpacingSniff.process has cognitive complexity 62 (threshold 15). Drivers by points: if/else 25 (53 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ObjectOperatorIndentSniff.process (cognitive 60) src/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php:64— ObjectOperatorIndentSniff.process has cognitive complexity 60 (threshold 15). Drivers by points: if/else 20 (49 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 33). 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.
FileHeaderSniff.getHeaderLines (cognitive 60) src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php:131— FileHeaderSniff.getHeaderLines has cognitive complexity 60 (threshold 15). Drivers by points: if/else 13 (44 pts), loops 3 (8 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionCallArgumentSpacingSniff.checkSpacing (cognitive 59) src/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php:102— FunctionCallArgumentSpacingSniff.checkSpacing has cognitive complexity 59 (threshold 15). Drivers by points: if/else 17 (57 pts), boolean chains 1, loops 1 (nesting depth added 40). 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.
SelfMemberReferenceSniff.processTokenWithinScope (cognitive 58) src/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php:44— SelfMemberReferenceSniff.processTokenWithinScope has cognitive complexity 58 (threshold 15). Drivers by points: if/else 19 (41 pts), loops 4 (12 pts), boolean chains 5 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
EmbeddedPhpSniff.validateInlineEmbeddedPhp (cognitive 57) src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:299— EmbeddedPhpSniff.validateInlineEmbeddedPhp has cognitive complexity 57 (threshold 15). Drivers by points: if/else 22 (43 pts), boolean chains 7, loops 2 (7 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LongConditionClosingCommentSniff.process (cognitive 56) src/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php:83— LongConditionClosingCommentSniff.process has cognitive complexity 56 (threshold 15). Drivers by points: if/else 21 (44 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ScopeKeywordSpacingSniff.process (cognitive 55) src/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php:44— ScopeKeywordSpacingSniff.process has cognitive complexity 55 (threshold 15). Drivers by points: if/else 22 (39 pts), boolean chains 12, loops 1 (4 pts) (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.
IncludeSystemSniff.processTokenWithinScope (cognitive 54) src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php:63— IncludeSystemSniff.processTokenWithinScope has cognitive complexity 54 (threshold 15). Drivers by points: if/else 19 (41 pts), loops 6 (13 pts) (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
EmptyPHPStatementSniff.process (cognitive 52) src/Standards/Generic/Sniffs/CodeAnalysis/EmptyPHPStatementSniff.php:47— EmptyPHPStatementSniff.process has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (35 pts), boolean chains 10, loops 2 (6 pts), match/switch 1 (nesting depth added 26). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
IndentationSniff.process (cognitive 51) src/Standards/Squiz/Sniffs/CSS/IndentationSniff.php:55— IndentationSniff.process has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (43 pts), boolean chains 7, loops 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
LowerCaseTypeSniff.process (cognitive 50) src/Standards/Generic/Sniffs/PHP/LowerCaseTypeSniff.php:71— LowerCaseTypeSniff.process has cognitive complexity 50 (threshold 15). Drivers by points: if/else 21 (47 pts), error handling 1 (2 pts), loops 1 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
UnusedSystemSniff.process (cognitive 50) src/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php:40— UnusedSystemSniff.process has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (39 pts), boolean chains 5, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
FunctionCommentSniff.process (cognitive 47) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:60— FunctionCommentSniff.process has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 11, loops 4 (9 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DisallowMultipleAssignmentsSniff.process (cognitive 47) src/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php:41— DisallowMultipleAssignmentsSniff.process has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 14, loops 3 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
File.isReference (cognitive 46) src/Files/File.php:2032— File.isReference has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 7, loops 2 (7 pts) (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.
ValidatePEARPackageXML.checkFileTag (cognitive 45) scripts/ValidatePEAR/ValidatePEARPackageXML.php:207— ValidatePEARPackageXML.checkFileTag has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (37 pts), boolean chains 8 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
OpeningFunctionBraceKernighanRitchieSniff.process (cognitive 45) src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php:58— OpeningFunctionBraceKernighanRitchieSniff.process has cognitive complexity 45 (threshold 15). Drivers by points: if/else 24 (37 pts), boolean chains 8 (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.
ClassDefinitionClosingBraceSpaceSniff.process (cognitive 45) src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php:48— ClassDefinitionClosingBraceSpaceSniff.process has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (33 pts), loops 3 (11 pts), boolean chains 1 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DocCommentAlignmentSniff.process (cognitive 45) src/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php:51— DocCommentAlignmentSniff.process has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (41 pts), boolean chains 3, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InlineIfDeclarationSniff.process (cognitive 45) src/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php:40— InlineIfDeclarationSniff.process has cognitive complexity 45 (threshold 15). Drivers by points: if/else 24 (45 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Fixer.replaceToken (cognitive 44) src/Fixer.php:474— Fixer.replaceToken has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (41 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.
UselessOverridingMethodSniff.process (cognitive 44) src/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php:53— UselessOverridingMethodSniff.process has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (34 pts), boolean chains 6, loops 4 (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.
IncludingFileSniff.process (cognitive 44) src/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php:48— IncludingFileSniff.process has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (42 pts), loops 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
File.getMemberProperties (cognitive 43) src/Files/File.php:1796— File.getMemberProperties has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 9, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
File.findPrevious (cognitive 43) src/Files/File.php:2216— File.findPrevious has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (37 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DisallowShortOpenTagSniff.process (cognitive 43) src/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php:51— DisallowShortOpenTagSniff.process has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (39 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
IncrementDecrementSpacingSniff.process (cognitive 43) src/Standards/Generic/Sniffs/WhiteSpace/IncrementDecrementSpacingSniff.php:54— IncrementDecrementSpacingSniff.process has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 8, loops 2 (6 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.
ClassDeclarationSniff.process (cognitive 43) src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php:45— ClassDeclarationSniff.process has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (39 pts), loops 1 (4 pts) (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Text.printCodeComparisonBlock (cognitive 42) src/Generators/Text.php:126— Text.printCodeComparisonBlock has cognitive complexity 42 (threshold 15). Drivers by points: if/else 22 (38 pts), loops 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.
Reporter.__construct (cognitive 42) src/Reporter.php:98— Reporter.__construct has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (36 pts), loops 2 (6 pts) (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
VariableCommentSniff.processMemberVar (cognitive 42) src/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php:29— VariableCommentSniff.processMemberVar has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 6, loops 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.
ArrayDeclarationSniff.process (cognitive 41) src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:44— ArrayDeclarationSniff.process has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (32 pts), loops 2 (9 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionCommentSniff.processThrows (cognitive 41) src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:205— FunctionCommentSniff.processThrows has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 2 (5 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.
MultiLineFunctionDeclarationSniff.processBracket (cognitive 41) src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:191— MultiLineFunctionDeclarationSniff.processBracket has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (35 pts), loops 2 (6 pts) (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
AbstractPatternSniff.parse (cognitive 40) src/Sniffs/AbstractPatternSniff.php:768— AbstractPatternSniff.parse has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (33 pts), loops 2 (5 pts), boolean chains 2 (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.
AnonClassDeclarationSniff.processSingleLineArgumentList (cognitive 40) src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php:143— AnonClassDeclarationSniff.processSingleLineArgumentList has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 3 (13 pts), boolean chains 2 (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.
Runner.processFile (cognitive 39) src/Runner.php:621— Runner.processFile has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (29 pts), loops 2 (4 pts), match/switch 1 (3 pts), boolean chains 2, error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssignmentInConditionSniff.process (cognitive 39) src/Standards/Generic/Sniffs/CodeAnalysis/AssignmentInConditionSniff.php:78— AssignmentInConditionSniff.process has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (35 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionDeclarationSniff.processMultiLineDeclaration (cognitive 39) src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:283— FunctionDeclarationSniff.processMultiLineDeclaration has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (34 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ScopeClosingBraceSniff.process (cognitive 39) src/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php:48— ScopeClosingBraceSniff.process has cognitive complexity 39 (threshold 15). Drivers by points: if/else 23 (35 pts), boolean chains 2, loops 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.
Ruleset.__construct (cognitive 38) src/Ruleset.php:128— Ruleset.__construct has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 5 (7 pts), boolean chains 3, error handling 1 (3 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.
ControlStructureSpacingSniff.process (cognitive 38) src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:65— ControlStructureSpacingSniff.process has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (37 pts), boolean chains 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
File.getMethodProperties (cognitive 36) src/Files/File.php:1623— File.getMethodProperties has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 6, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VersionControl.generateFileReport (cognitive 36) src/Reports/VersionControl.php:41— VersionControl.generateFileReport has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 8 (12 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ruleset.setSniffProperty (cognitive 36) src/Ruleset.php:1309— Ruleset.setSniffProperty has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (28 pts), loops 1 (5 pts), boolean chains 3 (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.
LineLengthSniff.checkLineLength (cognitive 36) src/Standards/Generic/Sniffs/Files/LineLengthSniff.php:97— LineLengthSniff.checkLineLength has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (31 pts), boolean chains 5 (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.
DisallowAlternativePHPTagsSniff.process (cognitive 36) src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php:72— DisallowAlternativePHPTagsSniff.process has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (33 pts), boolean chains 3 (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.
LanguageConstructSpacingSniff.process (cognitive 36) src/Standards/Generic/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php:56— LanguageConstructSpacingSniff.process has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 2 (7 pts), boolean chains 2 (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.
OpacitySniff.process (cognitive 36) src/Standards/Squiz/Sniffs/CSS/OpacitySniff.php:48— OpacitySniff.process has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (32 pts), boolean chains 4 (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.
JS.getRegexToken (cognitive 36) src/Tokenizers/JS.php:915— JS.getRegexToken has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (31 pts), loops 5 (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.
ReturnTypeDeclarationSniff.process (cognitive 35) src/Standards/PSR12/Sniffs/Functions/ReturnTypeDeclarationSniff.php:44— ReturnTypeDeclarationSniff.process has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 6, loops 1 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MethodDeclarationSniff.processTokenWithinScope (cognitive 35) src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php:39— MethodDeclarationSniff.processTokenWithinScope has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 5, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClosingDeclarationCommentSniff.process (cognitive 35) src/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php:45— ClosingDeclarationCommentSniff.process has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (30 pts), loops 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.
SpaceAfterCastSniff.process (cognitive 34) src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:55— SpaceAfterCastSniff.process has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 4, loops 1 (3 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.
OperatorBracketSniff.addMissingBracketsError (cognitive 34) src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php:274— OperatorBracketSniff.addMissingBracketsError has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 10, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IncrementDecrementUsageSniff.processAssignment (cognitive 34) src/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php:119— IncrementDecrementUsageSniff.processAssignment has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (31 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpreadOperatorSpacingAfterSniff.process (cognitive 33) src/Standards/Generic/Sniffs/WhiteSpace/SpreadOperatorSpacingAfterSniff.php:55— SpreadOperatorSpacingAfterSniff.process has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 3, loops 1 (3 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.
FileHeaderSniff.process (cognitive 33) src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php:41— FileHeaderSniff.process has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (31 pts), boolean chains 1, loops 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ScopeIndentSniff.adjustIndent (cognitive 32) src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1513— ScopeIndentSniff.adjustIndent has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValidVariableNameSniff.processVariable (cognitive 32) src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php:30— ValidVariableNameSniff.processVariable has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 1 (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.
Comment.tokenizeString (cognitive 32) src/Tokenizers/Comment.php:30— Comment.tokenizeString has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 2 (3 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.
FileCommentSniff.process (cognitive 31) src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:93— FileCommentSniff.process has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 3, loops 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.
ValidatePEARPackageXML.checkPHPRelease (cognitive 30) scripts/ValidatePEAR/ValidatePEARPackageXML.php:276— ValidatePEARPackageXML.checkPHPRelease has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 4 (6 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.
DisallowMultipleStatementsSniff.process (cognitive 30) src/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php:40— DisallowMultipleStatementsSniff.process has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LowerCaseConstantSniff.process (cognitive 30) src/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php:69— LowerCaseConstantSniff.process has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Fixer.fixFile (cognitive 29) src/Fixer.php:140— Fixer.fixFile has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 2 (4 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.
ShorthandSizeSniff.process (cognitive 29) src/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php:62— ShorthandSizeSniff.process has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (22 pts), loops 3 (6 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.
Config.__construct (cognitive 28) src/Config.php:340— Config.__construct has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3 (7 pts), boolean chains 6 (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.
File.findFirstOnLine (cognitive 28) src/Files/File.php:2623— File.findFirstOnLine has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 2 (3 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.
AbstractVariableSniff.processTokenWithinScope (cognitive 28) src/Sniffs/AbstractVariableSniff.php:78— AbstractVariableSniff.processTokenWithinScope has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 4, loops 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.
UnnecessaryStringConcatSniff.process (cognitive 28) src/Standards/Generic/Sniffs/Strings/UnnecessaryStringConcatSniff.php:71— UnnecessaryStringConcatSniff.process has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (24 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.
EvalObjectFactorySniff.process (cognitive 28) src/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php:41— EvalObjectFactorySniff.process has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 5 (8 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.
FileCommentSniff.processTags (cognitive 28) src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:223— FileCommentSniff.processTags has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValidFunctionNameSniff.processTokenOutsideScope (cognitive 28) src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php:181— ValidFunctionNameSniff.processTokenOutsideScope has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (22 pts), loops 2 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Common.suggestType (cognitive 28) src/Util/Common.php:446— Common.suggestType has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (26 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Standards.getInstalledStandardDetails (cognitive 28) src/Util/Standards.php:78— Standards.getInstalledStandardDetails has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Source.makeFriendlyName (cognitive 27) src/Reports/Source.php:282— Source.makeFriendlyName has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 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.
Summary.generate (cognitive 27) src/Reports/Summary.php:65— Summary.generate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 5, loops 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
ArrayIndentSniff.processMultiLineArray (cognitive 27) src/Standards/Generic/Sniffs/Arrays/ArrayIndentSniff.php:58— ArrayIndentSniff.processMultiLineArray has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (26 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.
UseDeclarationSniff.processUseStatement (cognitive 27) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:651— UseDeclarationSniff.processUseStatement has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 1 (5 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Config.__set (cognitive 26) src/Config.php:224— Config.__set has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (5 pts), boolean chains 3, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ruleset.populateTokenListeners (cognitive 26) src/Ruleset.php:1219— Ruleset.populateTokenListeners has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 6 (13 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.
DisallowYodaConditionsSniff.process (cognitive 26) src/Standards/Generic/Sniffs/ControlStructures/DisallowYodaConditionsSniff.php:42— DisallowYodaConditionsSniff.process has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (23 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.
LowercasePHPFunctionsSniff.process (cognitive 26) src/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php:60— LowercasePHPFunctionsSniff.process has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 8 (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.
Common.isCamelCaps (cognitive 26) src/Util/Common.php:333— Common.isCamelCaps has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 2, loops 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.
Config.setCommandLineValues (cognitive 25) src/Config.php:430— Config.setCommandLineValues has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (5 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.
Config.setConfigData (cognitive 25) src/Config.php:1566— Config.setConfigData has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 3, 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.
Filter.shouldIgnorePath (cognitive 25) src/Filters/Filter.php:201— Filter.shouldIgnorePath has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 3 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cbf.generateFileReport (cognitive 25) src/Reports/Cbf.php:39— Cbf.generateFileReport has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (25 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.
AnonClassDeclarationSniff.process (cognitive 25) src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php:57— AnonClassDeclarationSniff.process has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValidVariableNameSniff.processVariable (cognitive 25) src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php:30— ValidVariableNameSniff.processVariable has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (24 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.
DoubleQuoteUsageSniff.process (cognitive 25) src/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php:43— DoubleQuoteUsageSniff.process has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OperatorSpacingSniff.isOperator (cognitive 25) src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php:326— OperatorSpacingSniff.isOperator 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.
OpeningBraceSameLineSniff.process (cognitive 24) src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php:45— OpeningBraceSameLineSniff.process has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (23 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.
LineEndingsSniff.process (cognitive 24) src/Standards/Generic/Sniffs/Files/LineEndingsSniff.php:61— LineEndingsSniff.process has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColonSpacingSniff.process (cognitive 24) src/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php:48— ColonSpacingSniff.process has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (23 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.
PHP.createAttributesNestingMap (cognitive 24) src/Tokenizers/PHP.php:3511— PHP.createAttributesNestingMap has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 2, 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.
Tokenizer.replaceTabsInToken (cognitive 24) src/Tokenizers/Tokenizer.php:585— Tokenizer.replaceTabsInToken has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Tokenizer.createParenthesisNestingMap (cognitive 24) src/Tokenizers/Tokenizer.php:850— Tokenizer.createParenthesisNestingMap has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 2, 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.
Info.generate (cognitive 23) src/Reports/Info.php:63— Info.generate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (8 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.
UpperCaseConstantNameSniff.process (cognitive 23) src/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php:44— UpperCaseConstantNameSniff.process has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DisallowSelfActionsSniff.process (cognitive 23) src/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php:41— DisallowSelfActionsSniff.process has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2, loops 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.
GetRequestDataSniff.process (cognitive 23) src/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php:40— GetRequestDataSniff.process has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionCallSignatureSniff.process (cognitive 23) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:86— FunctionCallSignatureSniff.process has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 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.
Reporter.prepareFileReport (cognitive 22) src/Reporter.php:334— Reporter.prepareFileReport has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 5 (9 pts), boolean chains 1 (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.
Cbf.generate (cognitive 22) src/Reports/Cbf.php:136— Cbf.generate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IncludeSystemSniff.processTokenOutsideScope (cognitive 22) src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php:204— IncludeSystemSniff.processTokenOutsideScope has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScopeClosingBraceSniff.process (cognitive 22) src/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php:41— ScopeClosingBraceSniff.process has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Standards.getInstalledStandards (cognitive 22) src/Util/Standards.php:167— Standards.getInstalledStandards has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
File.findNext (cognitive 21) src/Files/File.php:2297— File.findNext has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpaceAfterNotSniff.process (cognitive 21) src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php:65— SpaceAfterNotSniff.process has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValidFunctionNameSniff.processTokenWithinScope (cognitive 21) src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php:73— ValidFunctionNameSniff.processTokenWithinScope has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PHP.standardiseToken (cognitive 21) src/Tokenizers/PHP.php:3228— PHP.standardiseToken has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 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.
FunctionCommentSniff.process (cognitive 20) src/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php:31— FunctionCommentSniff.process has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 1, 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.
FileCommentSniff.processCopyright (cognitive 20) src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:489— FileCommentSniff.processCopyright has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 3, 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.
LowercaseStyleDefinitionSniff.process (cognitive 20) src/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php:47— LowercaseStyleDefinitionSniff.process has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 2, 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.
MultiLineFunctionDeclarationSniff.isMultiLineDeclaration (cognitive 20) src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:42— MultiLineFunctionDeclarationSniff.isMultiLineDeclaration has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 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.
DisallowSizeFunctionsInLoopsSniff.process (cognitive 20) src/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php:67— DisallowSizeFunctionsInLoopsSniff.process has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LogicalOperatorSpacingSniff.process (cognitive 20) src/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php:51— LogicalOperatorSpacingSniff.process has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PHP.parsePhpAttribute (cognitive 20) src/Tokenizers/PHP.php:3452— PHP.parsePhpAttribute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, 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.
Config.restoreDefaults (cognitive 19) src/Config.php:479— Config.restoreDefaults has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (19 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.
Runner.runPHPCS (cognitive 19) src/Runner.php:54— Runner.runPHPCS has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 2 (4 pts), boolean chains 3, error handling 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CallTimePassByReferenceSniff.process (cognitive 19) src/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php:44— CallTimePassByReferenceSniff.process has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 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.
SubversionPropertiesSniff.getProperties (cognitive 19) src/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php:120— SubversionPropertiesSniff.getProperties has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Diff.generateFileReport (cognitive 18) src/Reports/Diff.php:32— Diff.generateFileReport has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (18 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.
OperatorSpacingSniff.process (cognitive 18) src/Standards/PSR12/Sniffs/Operators/OperatorSpacingSniff.php:52— OperatorSpacingSniff.process has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
NamespaceDeclarationSniff.process (cognitive 18) src/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php:41— NamespaceDeclarationSniff.process has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (4 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.
PostStatementCommentSniff.process (cognitive 18) src/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php:68— PostStatementCommentSniff.process has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DisallowComparisonAssignmentSniff.process (cognitive 18) src/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php:41— DisallowComparisonAssignmentSniff.process has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Standards.getInstalledStandardPath (cognitive 18) src/Util/Standards.php:279— Standards.getInstalledStandardPath has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClassDeclarationSniff.processOpen (cognitive 17) src/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php:54— ClassDeclarationSniff.processOpen has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 2 (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.
Junit.generateFileReport (cognitive 16) src/Reports/Junit.php:34— Junit.generateFileReport has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 3 (7 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.
Xml.generateFileReport (cognitive 16) src/Reports/Xml.php:33— Xml.generateFileReport has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 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.
Ruleset.explain (cognitive 16) src/Ruleset.php:238— Ruleset.explain has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Runner.processChildProcs (cognitive 16) src/Runner.php:748— Runner.processChildProcs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 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.
AbstractPatternSniff.process (cognitive 16) src/Sniffs/AbstractPatternSniff.php:187— AbstractPatternSniff.process has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AjaxNullComparisonSniff.process (cognitive 16) src/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php:43— AjaxNullComparisonSniff.process has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValidClassNameSniff.process (cognitive 16) src/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php:45— ValidClassNameSniff.process has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClosingTagSniff.process (cognitive 16) src/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php:41— ClosingTagSniff.process has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClassDefinitionNameSpacingSniff.process (cognitive 16) src/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php:48— ClassDefinitionNameSpacingSniff.process has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 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.
MultiLineFunctionDeclarationSniff.processSingleLineDeclaration (cognitive 16) src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:109— MultiLineFunctionDeclarationSniff.processSingleLineDeclaration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 1 (4 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SemicolonSpacingSniff.process (cognitive 16) src/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php:51— SemicolonSpacingSniff.process has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Common.prepareForOutput (cognitive 16) src/Util/Common.php:276— Common.prepareForOutput has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyMethods: File src/Files/File.php:19— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Near-duplicate member pair (111 shared lines) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:267— src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:267-534 | src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:283-638 — These two members are variants of one another: 111 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (68 shared lines) src/Reports/Code.php:35— src/Reports/Code.php:35-317 | src/Reports/Full.php:35-186 — These two members are variants of one another: 68 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (43 shared lines) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:209— src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:209-319 | src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php:145-216 — These two members are variants of one another: 43 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (40 shared lines) src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php:50— src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php:50-129 | src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php:50-171 — These two members are variants of one another: 40 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (33 shared lines) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:285— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:285-637 | src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php:30-186 — These two members are variants of one another: 33 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (30 shared lines) src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:65— src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:65-201 | src/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php:42-150 — These two members are variants of one another: 30 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (43 corresponding lines) · ×1
Edited copy of a member (43 corresponding lines) src/Config.php:1361— src/Config.php:1361-1425 | src/Config.php:1437-1479 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) src/Generators/HTML.php:238— src/Generators/HTML.php:238-265 | src/Generators/Markdown.php:129-156 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (67 lines × 2) src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:69— src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:69-135 | src/Standards/Generic/Sniffs/WhiteSpace/SpreadOperatorSpacingAfterSniff.php:67-133 — before extracting anything, compare `src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php` and `src/Standards/Generic/Sniffs/WhiteSpace/SpreadOperatorSpacingAfterSniff.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php:69` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (49–53 lines × 2) src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:136— src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:136-184 | src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php:70-122 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php` and `src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php:136` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (38–40 lines × 2) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:269— src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:269-308 | src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:298-335 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php` and `src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:265` calls `processParams`, `getTokens` and `src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php:296` 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 (28–33 lines × 2) src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:71— src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:71-98 | src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php:61-93 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php:71` 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 (26–27 lines × 2) src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php:107— src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php:107-133 | src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php:78-103 — before extracting anything, compare `src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php` and `src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php:107` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (27 lines × 2) src/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php:55— src/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php:55-81 | src/Standards/Zend/Sniffs/Files/ClosingTagSniff.php:45-71 — 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 (25 lines × 2) src/Filters/GitModified.php:37— src/Filters/GitModified.php:37-61 | src/Filters/GitStaged.php:39-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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 (24–25 lines × 2) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:282— src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:282-305 | src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php:178-202 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php` and `src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:282` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23 lines × 2) src/Reports/Code.php:267— src/Reports/Code.php:267-289 | src/Reports/Full.php:150-172 — before extracting anything, compare `src/Reports/Code.php` and `src/Reports/Full.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 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 (22–23 lines × 2) src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php:191— src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php:191-213 | src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php:119-140 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16–22 lines × 3) src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:287— src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:287-302 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:720-741 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:1372-1393 — 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 `src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:287` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (20–22 lines × 2) src/Tokenizers/Tokenizer.php:1147— src/Tokenizers/Tokenizer.php:1147-1168 | src/Tokenizers/Tokenizer.php:1173-1192 — 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 `src/Tokenizers/Tokenizer.php:1147` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20–21 lines × 2) src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php:132— src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php:132-151 | src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php:199-219 — 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 `src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php:132` 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. 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 × 3) src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php:127— src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php:127-145 | src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:170-187 | src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:152-169 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php:127` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17–19 lines × 3) src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:168— src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:168-184 | src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:205-221 | src/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php:66-84 — before extracting anything, compare `src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php` and `src/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:168` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17–19 lines × 2) src/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php:68— src/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php:68-84 | src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:92-110 — 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 (18–19 lines × 2) src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:452— src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:452-470 | src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:549-566 — 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 `src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php:452` 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 (15–18 lines × 2) src/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php:67— src/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php:67-84 | src/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php:114-128 — 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 `src/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php:67` 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 (17 lines × 3) src/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php:52— src/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php:52-68 | src/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php:54-70 | src/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php:48-64 — 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 (16–17 lines × 3) src/Tokenizers/PHP.php:3185— src/Tokenizers/PHP.php:3185-3201 | src/Tokenizers/Tokenizer.php:1582-1597 | src/Tokenizers/Tokenizer.php:1684-1699 — 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 `src/Tokenizers/PHP.php:3185` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–17 lines × 2) src/Config.php:1575— src/Config.php:1575-1591 | src/Config.php:1653-1667 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16–17 lines × 2) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:148— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:148-164 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:618-633 — 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 `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:148` 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–16 lines × 3) src/Tokenizers/PHP.php:885— src/Tokenizers/PHP.php:885-896 | src/Tokenizers/PHP.php:999-1010 | src/Tokenizers/PHP.php:2115-2130 — 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 `src/Tokenizers/PHP.php:885` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–16 lines × 2) src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:162— src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:162-176 | src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:124-139 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:162` 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–16 lines × 2) src/Util/Common.php:279— src/Util/Common.php:279-289 | src/Util/Common.php:291-306 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Util/Common.php:291` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 5) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:408— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:408-422 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:486-500 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:564-578 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:671-685 | src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php:97-111 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:408` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–14 lines × 8) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:441— src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:441-452 | src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php:114-127 | src/Standards/PSR12/Sniffs/Classes/OpeningBraceSpaceSniff.php:64-75 | src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:151-163 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:209-221 | src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php:129-141 | src/Standards/PSR2/Sniffs/Methods/FunctionClosingBraceSniff.php:73-85 | src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php:219-230 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php` and `src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:441` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php:233` calls `recordMetric` and `src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php:129` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 4) src/Config.php:1368— src/Config.php:1368-1379 | src/Config.php:1393-1404 | src/Config.php:1440-1451 | src/Config.php:1456-1467 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 3) src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:182— src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:182-193 | src/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php:77-88 | src/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php:123-134 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (11–12 lines × 3) src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:88— src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:88-98 | src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:121-132 | src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:379-389 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:88` 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–12 lines × 2) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:101— src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:101-112 | src/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php:78-85 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:101` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (11 lines × 4) src/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php:42— src/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php:42-52 | src/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php:42-52 | src/Standards/Generic/Sniffs/Files/OneObjectStructurePerFileSniff.php:47-57 | src/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php:42-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
Duplicated block (8–11 lines × 3) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:605— src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:605-615 | src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php:89-96 | src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php:157-164 — before extracting anything, compare `src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php` and `src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:605` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–10 lines × 6) src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:329— src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:329-337 | src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:351-359 | src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php:144-153 | src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php:169-178 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:574-582 | src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:96-104 — there are 6 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:329` 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, `src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:339` calls `addNewline` and `src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:106` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 5) src/Standards/PSR12/Sniffs/Files/DeclareStatementSniff.php:50— src/Standards/PSR12/Sniffs/Files/DeclareStatementSniff.php:50-59 | src/Standards/PSR12/Sniffs/Files/DeclareStatementSniff.php:68-77 | src/Standards/PSR12/Sniffs/Files/DeclareStatementSniff.php:96-105 | src/Standards/PSR12/Sniffs/Files/DeclareStatementSniff.php:115-124 | src/Standards/PSR12/Sniffs/Files/DeclareStatementSniff.php:133-142 — 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 `src/Standards/PSR12/Sniffs/Files/DeclareStatementSniff.php:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 4) src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php:128— src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php:128-138 | src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:171-180 | src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:373-382 | src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:153-162 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php:128` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 3) src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:186— src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:186-194 | src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:223-231 | src/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php:88-97 — before extracting anything, compare `src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php` and `src/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:186` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–9 lines × 8) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:439— src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:439-445 | src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php:112-119 | src/Standards/PSR12/Sniffs/Classes/OpeningBraceSpaceSniff.php:62-68 | src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:148-156 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:207-213 | src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php:127-134 | src/Standards/PSR2/Sniffs/Methods/FunctionClosingBraceSniff.php:71-78 | src/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php:191-197 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php` and `src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:439` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php:146` calls `addNewlineBefore` and `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:438` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 7) src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:91— src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:91-99 | src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:164-172 | src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php:155-163 | src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php:312-320 | src/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php:109-117 | src/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php:142-150 | src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php:249-257 — there are 7 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php:91` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–9 lines × 3) src/Files/File.php:2250— src/Files/File.php:2250-2255 | src/Files/File.php:2468-2473 | src/Files/File.php:2580-2588 — 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 `src/Files/File.php:2250` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 3) src/Standards/PSR12/Sniffs/Functions/ReturnTypeDeclarationSniff.php:94— src/Standards/PSR12/Sniffs/Functions/ReturnTypeDeclarationSniff.php:94-101 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:85-93 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:109-117 — 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 `src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:85` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:196— src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:196-205 | src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:171-178 | src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php:208-215 | src/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php:70-78 — before extracting anything, compare `src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php` and `src/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:196` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 5) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:445— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:445-451 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:483-489 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:523-529 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:561-567 | src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php:94-100 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:445` 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 × 4) src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:340— src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:340-346 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:451-457 | src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:529-535 | src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php:76-84 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php:76` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:346` calls `endChangeset`, `replaceToken` and `src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php:84` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5–7 lines × 3) src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:168— src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:168-172 | src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:438-443 | src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php:111-117 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php` and `src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6–7 lines × 2) src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:80— src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:80-86 | src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php:122-127 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:80` 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–7 lines × 2) src/Tokenizers/JS.php:1072— src/Tokenizers/JS.php:1072-1076 | src/Tokenizers/PHP.php:2469-2475 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Tokenizers/PHP.php:2469` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (4–7 lines × 3) src/Tokenizers/JS.php:1088— src/Tokenizers/JS.php:1088-1094 | src/Tokenizers/PHP.php:2450-2456 | src/Tokenizers/PHP.php:2504-2507 — 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 `src/Tokenizers/JS.php:1088` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Tokenizers/JS.php:1095` calls `str_repeat`, `count` and `src/Tokenizers/PHP.php:2457` 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 (6 lines × 6) src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:126— src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:126-131 | src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:144-149 | src/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php:178-183 | src/Standards/PSR12/Sniffs/Functions/ReturnTypeDeclarationSniff.php:93-98 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:84-89 | src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php:107-113 — there are 6 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:126` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:135` calls `replaceToken` and `src/Standards/PSR12/Sniffs/Functions/ReturnTypeDeclarationSniff.php:100` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5–6 lines × 2) src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:156— src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:156-161 | src/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php:86-90 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php:156` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 8) src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:166— src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:166-170 | src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:200-205 | src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:289-293 | src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:436-440 | src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php:109-113 | src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php:142-147 | src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php:167-172 | src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php:93-98 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php` and `src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:166` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 7) src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:166— src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:166-170 | src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:201-205 | src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:289-293 | src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php:436-440 | src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php:109-113 | src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:126-130 | src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php:269-273 — before extracting anything, compare `src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php` and `src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php:166` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Repository declared end-of-life README.md:2— This repository declares its own end of life: `README.md` line 2 reads “> This repository has been abandoned. Its successor is [PHPCSStandards/PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer/)”. That is a first-party statement of intent, not an inference — the Maturity and Knowledge lenses otherwise approximate the same fact from decayed commit history (D16 reports a dormant codebase, D34 orphaned files), and this row says the maintainer already told you. It does NOT change any score: an honest end-of-life notice is the README doing its job, and every dimension below still measures the code as it stands. Read the whole report as an assessment of software the author has stopped working on.
Minor — 12 finding(s)
D34 · Knowledge Freshness· Most significant orphaned file · ×3
Most significant orphaned file src/Tokenizers/PHP.php— 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 src/Files/File.php— 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 src/Tokenizers/Tokenizer.php— 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.
Documentation: no project overview README.md— The only visible document is a non-constructive abandonment warning that links to the successor, with no About or description of what PHP_CodeSniffer does. Add an About section explaining what PHP_CodeSniffer is and its purpose.
Documentation: no installation or build instructions README.md— The document begins with a non-constructive warning then proceeds to install instructions, but the visible content ends at 'Then test the downloaded PHARs' before any real installation or usage examples appear. Complete the install/doc guide by adding usage examples and a Getting Started section.
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
Scattered collaborators — 95 % of calls cross a namespace and only 1 % of collaborators are co-located — group each feature's code into a vertical slice so a call's collaborators sit together.
Dormant codebase — 223 of 223 significant files have no living knowledge — the codebase as a whole is dormant, not 223 separate risks. Counted over 223 of the 308 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation· No architecture diagram/doc · ×1
No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
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.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
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 01a0db97-d169-7c9e-b33e-d802082f07b4 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 24 · Warnings: 773 · Recommendations: 12 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 26-09-2026 @ 02:42 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.