Public report — PhpSpreadsheet, 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_b30e7b69374a4c1291b95927149c6d11
Filed 26 September 2026, 02:48 UTC
Public
Large · 138,586 LoC · rebuild ~2.3 person-years · weakest lens: Maturity (56%)
Findings by grade
36 critical1015 serious79 minor42 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, 01:43 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 ▸
1112findings with an exact file:lineof 1130 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
32/115dimensions across the health lenses138586 LoC — wide & deep
The system holds an adequate standing with a health score of 68%, indicating a workable asset that carries real, compounding risks. While the architecture is robust, the overall maturity is weak, creating a fragile foundation for a large-scale investment. This is a substantial system, comprising over 138,000 lines of production code, with a rebuild effort estimated at roughly 2.3 person-years and a cost near €340,000. The value tied up here is significant, and the cost of changing it is high, making efficiency critical.
The most pressing issue is a velocity tax on every change. Code quality signals average a mediocre 5.3 out of 10, acting as a hidden levy on development. Modifications in weaker areas plausibly cost 7–15% more than in clean code, and this drag compounds as the codebase grows. This inefficiency translates directly into higher operational costs and slower delivery speeds, eroding the return on the substantial engineering investment.
A second theme is the concentration of risk in low maturity. With a maturity score of 56%, the system lacks the documentation and structural clarity needed for a new team to pick it up safely. For an asset this large, this gap creates operational risk and slows onboarding. The lack of measured data in key areas like domain modeling and event sourcing means the picture is partial, but the existing signals point to a system that is difficult to navigate and maintain over time.
Genuinely good news is the strong architecture and high code health, which provide a solid technical base. The highest-leverage move is to record significant decisions in a single, discoverable location. This small effort pays for itself within months by reducing confusion and rework. Focus first on this documentation fix, as it addresses the root of the maturity gap and offers immediate protection for the team’s productivity and the system’s long-term viability.
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.
1049 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.
Rebuild cost & value ~ Modeled — €110,000–€560,000
1.0× (at 68% quality) — the last 20% of quality is most of the work
Size & shape
Large · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~2.3 person-years of build effort (about ~€340,000 to rebuild). Its weakest lens is Maturity at 56% — 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 1.0× 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
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 top-ranked fix costs roughly 3–10 engineer-days once. Not doing it costs about 10.9–65.2 engineer-days every year, paid as drag on the ~63,364 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–11 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 7–15% 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: 15,624 line(s) changed over a 90-day window ⇒ ~63,364/year · D1/D2/D4 code quality: averaging 5.3/10 ⇒ a 7–15% drag on each change · top-ranked remediation: Medium effort ⇒ about 3–10 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 11 months.
Value concentrated against a weak lens · Medium · Value at risk
This is a Large asset (~2.3 person-years to rebuild), and its weakest lens is Maturity at 56%. 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).
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 5.3/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 7–15% 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 5.3/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.
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.)
94 modules, 173 dependencies. 2 dependency cycles across 29 modules, marked above the diagonal.
Showing the 40 most-connected modules; 54 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.
PhpOffice.PhpSpreadsheet.Calculation.Token uses PhpOffice.PhpSpreadsheet.Calculation.Engine. Changing PhpOffice.PhpSpreadsheet.Calculation.Engine can break PhpOffice.PhpSpreadsheet.Calculation.Token, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
7→33 PhpOffice.PhpSpreadsheet.Reader.Security depends on PhpOffice.PhpSpreadsheet.Readercycle✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Security → type in PhpOffice.PhpSpreadsheet.Reader) reference.
PhpOffice.PhpSpreadsheet.Reader.Security uses PhpOffice.PhpSpreadsheet.Reader. Changing PhpOffice.PhpSpreadsheet.Reader can break PhpOffice.PhpSpreadsheet.Reader.Security, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
8→12 PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer depends on PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainercycle✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer → type in PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer) reference.
PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer uses PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer. Changing PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer can break PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
9→13 PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting depends on PhpOffice.PhpSpreadsheet.Stylecycle✕
Type pairs
10 distinct (type in PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting → type in PhpOffice.PhpSpreadsheet.Style) references.
PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
9→20 PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting depends on PhpOffice.PhpSpreadsheet.Worksheetcycle✕
Type pairs
3 distinct (type in PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting → type in PhpOffice.PhpSpreadsheet.Worksheet) references.
PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
9→22 PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting depends on PhpOffice.PhpSpreadsheet.Cellcycle✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting → type in PhpOffice.PhpSpreadsheet.Cell) references.
PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting uses PhpOffice.PhpSpreadsheet.Cell. Changing PhpOffice.PhpSpreadsheet.Cell can break PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
9→23 PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting depends on PhpOffice.PhpSpreadsheet.Calculationcycle✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting → type in PhpOffice.PhpSpreadsheet.Calculation) reference.
PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting uses PhpOffice.PhpSpreadsheet.Calculation. Changing PhpOffice.PhpSpreadsheet.Calculation can break PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
10→14 PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter.Column depends on PhpOffice.PhpSpreadsheet.Worksheet.AutoFiltercycle✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter.Column → type in PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter) reference.
PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter.Column uses PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter. Changing PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter can break PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter.Column, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
11→20 PhpOffice.PhpSpreadsheet.Worksheet.PivotTable depends on PhpOffice.PhpSpreadsheet.Worksheetcycle✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet.PivotTable → type in PhpOffice.PhpSpreadsheet.Worksheet) references.
PhpOffice.PhpSpreadsheet.Worksheet.PivotTable uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Worksheet.PivotTable, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
12→8 PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer depends on PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer → type in PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer) reference.
PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer uses PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer. Changing PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer can break PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
13→9 PhpOffice.PhpSpreadsheet.Style depends on PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting✕
Type pairs
3 distinct (type in PhpOffice.PhpSpreadsheet.Style → type in PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting) references.
PhpOffice.PhpSpreadsheet.Style uses PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting. Changing PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting can break PhpOffice.PhpSpreadsheet.Style, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
13→15 PhpOffice.PhpSpreadsheet.Style depends on PhpOffice.PhpSpreadsheet.Chartcycle✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Style → type in PhpOffice.PhpSpreadsheet.Chart) reference.
PhpOffice.PhpSpreadsheet.Style uses PhpOffice.PhpSpreadsheet.Chart. Changing PhpOffice.PhpSpreadsheet.Chart can break PhpOffice.PhpSpreadsheet.Style, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
13→20 PhpOffice.PhpSpreadsheet.Style depends on PhpOffice.PhpSpreadsheet.Worksheetcycle✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Style → type in PhpOffice.PhpSpreadsheet.Worksheet) reference.
PhpOffice.PhpSpreadsheet.Style uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Style, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
13→35 PhpOffice.PhpSpreadsheet.Style depends on PhpOffice.PhpSpreadsheetcycle✕
Type pairs
4 distinct (type in PhpOffice.PhpSpreadsheet.Style → type in PhpOffice.PhpSpreadsheet) references.
PhpOffice.PhpSpreadsheet.Style uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Style, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
14→10 PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter depends on PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter.Column✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter → type in PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter.Column) reference.
PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter uses PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter.Column. Changing PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter.Column can break PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
14→20 PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter depends on PhpOffice.PhpSpreadsheet.Worksheetcycle✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter → type in PhpOffice.PhpSpreadsheet.Worksheet) reference.
PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
15→13 PhpOffice.PhpSpreadsheet.Chart depends on PhpOffice.PhpSpreadsheet.Style✕
Type pairs
3 distinct (type in PhpOffice.PhpSpreadsheet.Chart → type in PhpOffice.PhpSpreadsheet.Style) references.
PhpOffice.PhpSpreadsheet.Chart uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet.Chart, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
15→20 PhpOffice.PhpSpreadsheet.Chart depends on PhpOffice.PhpSpreadsheet.Worksheetcycle✕
Type pairs
4 distinct (type in PhpOffice.PhpSpreadsheet.Chart → type in PhpOffice.PhpSpreadsheet.Worksheet) references.
PhpOffice.PhpSpreadsheet.Chart uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Chart, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
15→35 PhpOffice.PhpSpreadsheet.Chart depends on PhpOffice.PhpSpreadsheetcycle✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Chart → type in PhpOffice.PhpSpreadsheet) references.
PhpOffice.PhpSpreadsheet.Chart uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Chart, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
16→13 PhpOffice.PhpSpreadsheet.Reader.Xls depends on PhpOffice.PhpSpreadsheet.Style✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xls → type in PhpOffice.PhpSpreadsheet.Style) reference.
PhpOffice.PhpSpreadsheet.Reader.Xls uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet.Reader.Xls, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
16→33 PhpOffice.PhpSpreadsheet.Reader.Xls depends on PhpOffice.PhpSpreadsheet.Readercycle✕
Type pairs
6 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xls → type in PhpOffice.PhpSpreadsheet.Reader) references.
PhpOffice.PhpSpreadsheet.Reader.Xls uses PhpOffice.PhpSpreadsheet.Reader. Changing PhpOffice.PhpSpreadsheet.Reader can break PhpOffice.PhpSpreadsheet.Reader.Xls, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
16→35 PhpOffice.PhpSpreadsheet.Reader.Xls depends on PhpOffice.PhpSpreadsheetcycle✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xls → type in PhpOffice.PhpSpreadsheet) reference.
PhpOffice.PhpSpreadsheet.Reader.Xls uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Reader.Xls, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
17→4 PhpOffice.PhpSpreadsheet.Shared.Escher depends on PhpOffice.PhpSpreadsheet.Shared.Escher.DgContainer✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Shared.Escher → type in PhpOffice.PhpSpreadsheet.Shared.Escher.DgContainer) reference.
PhpOffice.PhpSpreadsheet.Shared.Escher uses PhpOffice.PhpSpreadsheet.Shared.Escher.DgContainer. Changing PhpOffice.PhpSpreadsheet.Shared.Escher.DgContainer can break PhpOffice.PhpSpreadsheet.Shared.Escher, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
17→12 PhpOffice.PhpSpreadsheet.Shared.Escher depends on PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Shared.Escher → type in PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer) reference.
PhpOffice.PhpSpreadsheet.Shared.Escher uses PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer. Changing PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer can break PhpOffice.PhpSpreadsheet.Shared.Escher, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
18→13 PhpOffice.PhpSpreadsheet.Worksheet.Drawing depends on PhpOffice.PhpSpreadsheet.Style✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet.Drawing → type in PhpOffice.PhpSpreadsheet.Style) reference.
PhpOffice.PhpSpreadsheet.Worksheet.Drawing uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet.Worksheet.Drawing, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
18→35 PhpOffice.PhpSpreadsheet.Worksheet.Drawing depends on PhpOffice.PhpSpreadsheetcycle✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet.Drawing → type in PhpOffice.PhpSpreadsheet) reference.
PhpOffice.PhpSpreadsheet.Worksheet.Drawing uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Worksheet.Drawing, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
19→13 PhpOffice.PhpSpreadsheet.Worksheet.Table depends on PhpOffice.PhpSpreadsheet.Style✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet.Table → type in PhpOffice.PhpSpreadsheet.Style) reference.
PhpOffice.PhpSpreadsheet.Worksheet.Table uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet.Worksheet.Table, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
19→20 PhpOffice.PhpSpreadsheet.Worksheet.Table depends on PhpOffice.PhpSpreadsheet.Worksheetcycle✕
Type pairs
3 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet.Table → type in PhpOffice.PhpSpreadsheet.Worksheet) references.
PhpOffice.PhpSpreadsheet.Worksheet.Table uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Worksheet.Table, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
19→35 PhpOffice.PhpSpreadsheet.Worksheet.Table depends on PhpOffice.PhpSpreadsheetcycle✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet.Table → type in PhpOffice.PhpSpreadsheet) reference.
PhpOffice.PhpSpreadsheet.Worksheet.Table uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Worksheet.Table, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
20→5 PhpOffice.PhpSpreadsheet.Worksheet depends on PhpOffice.PhpSpreadsheet.Worksheet.Sparkline✕
Type pairs
3 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet → type in PhpOffice.PhpSpreadsheet.Worksheet.Sparkline) references.
PhpOffice.PhpSpreadsheet.Worksheet uses PhpOffice.PhpSpreadsheet.Worksheet.Sparkline. Changing PhpOffice.PhpSpreadsheet.Worksheet.Sparkline can break PhpOffice.PhpSpreadsheet.Worksheet, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→11 PhpOffice.PhpSpreadsheet.Worksheet depends on PhpOffice.PhpSpreadsheet.Worksheet.PivotTable✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet → type in PhpOffice.PhpSpreadsheet.Worksheet.PivotTable) reference.
PhpOffice.PhpSpreadsheet.Worksheet uses PhpOffice.PhpSpreadsheet.Worksheet.PivotTable. Changing PhpOffice.PhpSpreadsheet.Worksheet.PivotTable can break PhpOffice.PhpSpreadsheet.Worksheet, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→13 PhpOffice.PhpSpreadsheet.Worksheet depends on PhpOffice.PhpSpreadsheet.Style✕
Type pairs
3 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet → type in PhpOffice.PhpSpreadsheet.Style) references.
PhpOffice.PhpSpreadsheet.Worksheet uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet.Worksheet, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→14 PhpOffice.PhpSpreadsheet.Worksheet depends on PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet → type in PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter) reference.
PhpOffice.PhpSpreadsheet.Worksheet uses PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter. Changing PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter can break PhpOffice.PhpSpreadsheet.Worksheet, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→15 PhpOffice.PhpSpreadsheet.Worksheet depends on PhpOffice.PhpSpreadsheet.Chart✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet → type in PhpOffice.PhpSpreadsheet.Chart) reference.
PhpOffice.PhpSpreadsheet.Worksheet uses PhpOffice.PhpSpreadsheet.Chart. Changing PhpOffice.PhpSpreadsheet.Chart can break PhpOffice.PhpSpreadsheet.Worksheet, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→18 PhpOffice.PhpSpreadsheet.Worksheet depends on PhpOffice.PhpSpreadsheet.Worksheet.Drawing✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet → type in PhpOffice.PhpSpreadsheet.Worksheet.Drawing) reference.
PhpOffice.PhpSpreadsheet.Worksheet uses PhpOffice.PhpSpreadsheet.Worksheet.Drawing. Changing PhpOffice.PhpSpreadsheet.Worksheet.Drawing can break PhpOffice.PhpSpreadsheet.Worksheet, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→19 PhpOffice.PhpSpreadsheet.Worksheet depends on PhpOffice.PhpSpreadsheet.Worksheet.Table✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet → type in PhpOffice.PhpSpreadsheet.Worksheet.Table) references.
PhpOffice.PhpSpreadsheet.Worksheet uses PhpOffice.PhpSpreadsheet.Worksheet.Table. Changing PhpOffice.PhpSpreadsheet.Worksheet.Table can break PhpOffice.PhpSpreadsheet.Worksheet, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→21 PhpOffice.PhpSpreadsheet.Worksheet depends on PhpOffice.PhpSpreadsheet.Collectioncycle✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet → type in PhpOffice.PhpSpreadsheet.Collection) references.
PhpOffice.PhpSpreadsheet.Worksheet uses PhpOffice.PhpSpreadsheet.Collection. Changing PhpOffice.PhpSpreadsheet.Collection can break PhpOffice.PhpSpreadsheet.Worksheet, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
20→22 PhpOffice.PhpSpreadsheet.Worksheet depends on PhpOffice.PhpSpreadsheet.Cellcycle✕
Type pairs
7 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet → type in PhpOffice.PhpSpreadsheet.Cell) references.
PhpOffice.PhpSpreadsheet.Worksheet uses PhpOffice.PhpSpreadsheet.Cell. Changing PhpOffice.PhpSpreadsheet.Cell can break PhpOffice.PhpSpreadsheet.Worksheet, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
20→35 PhpOffice.PhpSpreadsheet.Worksheet depends on PhpOffice.PhpSpreadsheetcycle✕
Type pairs
6 distinct (type in PhpOffice.PhpSpreadsheet.Worksheet → type in PhpOffice.PhpSpreadsheet) references.
PhpOffice.PhpSpreadsheet.Worksheet uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Worksheet, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
21→20 PhpOffice.PhpSpreadsheet.Collection depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Collection → type in PhpOffice.PhpSpreadsheet.Worksheet) references.
PhpOffice.PhpSpreadsheet.Collection uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Collection, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
21→22 PhpOffice.PhpSpreadsheet.Collection depends on PhpOffice.PhpSpreadsheet.Cellcycle✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Collection → type in PhpOffice.PhpSpreadsheet.Cell) reference.
PhpOffice.PhpSpreadsheet.Collection uses PhpOffice.PhpSpreadsheet.Cell. Changing PhpOffice.PhpSpreadsheet.Cell can break PhpOffice.PhpSpreadsheet.Collection, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
22→13 PhpOffice.PhpSpreadsheet.Cell depends on PhpOffice.PhpSpreadsheet.Style✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Cell → type in PhpOffice.PhpSpreadsheet.Style) reference.
PhpOffice.PhpSpreadsheet.Cell uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet.Cell, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
22→20 PhpOffice.PhpSpreadsheet.Cell depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
5 distinct (type in PhpOffice.PhpSpreadsheet.Cell → type in PhpOffice.PhpSpreadsheet.Worksheet) references.
PhpOffice.PhpSpreadsheet.Cell uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Cell, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
22→21 PhpOffice.PhpSpreadsheet.Cell depends on PhpOffice.PhpSpreadsheet.Collection✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Cell → type in PhpOffice.PhpSpreadsheet.Collection) reference.
PhpOffice.PhpSpreadsheet.Cell uses PhpOffice.PhpSpreadsheet.Collection. Changing PhpOffice.PhpSpreadsheet.Collection can break PhpOffice.PhpSpreadsheet.Cell, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→1 PhpOffice.PhpSpreadsheet.Calculation depends on PhpOffice.PhpSpreadsheet.Calculation.Engine✕
Type pairs
4 distinct (type in PhpOffice.PhpSpreadsheet.Calculation → type in PhpOffice.PhpSpreadsheet.Calculation.Engine) references.
PhpOffice.PhpSpreadsheet.Calculation uses PhpOffice.PhpSpreadsheet.Calculation.Engine. Changing PhpOffice.PhpSpreadsheet.Calculation.Engine can break PhpOffice.PhpSpreadsheet.Calculation, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→6 PhpOffice.PhpSpreadsheet.Calculation depends on PhpOffice.PhpSpreadsheet.Calculation.Token✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Calculation → type in PhpOffice.PhpSpreadsheet.Calculation.Token) reference.
PhpOffice.PhpSpreadsheet.Calculation uses PhpOffice.PhpSpreadsheet.Calculation.Token. Changing PhpOffice.PhpSpreadsheet.Calculation.Token can break PhpOffice.PhpSpreadsheet.Calculation, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→20 PhpOffice.PhpSpreadsheet.Calculation depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Calculation → type in PhpOffice.PhpSpreadsheet.Worksheet) reference.
PhpOffice.PhpSpreadsheet.Calculation uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Calculation, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→22 PhpOffice.PhpSpreadsheet.Calculation depends on PhpOffice.PhpSpreadsheet.Cell✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Calculation → type in PhpOffice.PhpSpreadsheet.Cell) references.
PhpOffice.PhpSpreadsheet.Calculation uses PhpOffice.PhpSpreadsheet.Cell. Changing PhpOffice.PhpSpreadsheet.Cell can break PhpOffice.PhpSpreadsheet.Calculation, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→35 PhpOffice.PhpSpreadsheet.Calculation depends on PhpOffice.PhpSpreadsheetcycle✕
Type pairs
3 distinct (type in PhpOffice.PhpSpreadsheet.Calculation → type in PhpOffice.PhpSpreadsheet) references.
PhpOffice.PhpSpreadsheet.Calculation uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Calculation, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
24→20 PhpOffice.PhpSpreadsheet.Calculation.Engine.Operands depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Calculation.Engine.Operands → type in PhpOffice.PhpSpreadsheet.Worksheet) reference.
PhpOffice.PhpSpreadsheet.Calculation.Engine.Operands uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Calculation.Engine.Operands, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
24→22 PhpOffice.PhpSpreadsheet.Calculation.Engine.Operands depends on PhpOffice.PhpSpreadsheet.Cell✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Calculation.Engine.Operands → type in PhpOffice.PhpSpreadsheet.Cell) reference.
PhpOffice.PhpSpreadsheet.Calculation.Engine.Operands uses PhpOffice.PhpSpreadsheet.Cell. Changing PhpOffice.PhpSpreadsheet.Cell can break PhpOffice.PhpSpreadsheet.Calculation.Engine.Operands, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
25→20 PhpOffice.PhpSpreadsheet.Calculation.LookupRef depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
3 distinct (type in PhpOffice.PhpSpreadsheet.Calculation.LookupRef → type in PhpOffice.PhpSpreadsheet.Worksheet) references.
PhpOffice.PhpSpreadsheet.Calculation.LookupRef uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Calculation.LookupRef, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
25→22 PhpOffice.PhpSpreadsheet.Calculation.LookupRef depends on PhpOffice.PhpSpreadsheet.Cell✕
Type pairs
6 distinct (type in PhpOffice.PhpSpreadsheet.Calculation.LookupRef → type in PhpOffice.PhpSpreadsheet.Cell) references.
PhpOffice.PhpSpreadsheet.Calculation.LookupRef uses PhpOffice.PhpSpreadsheet.Cell. Changing PhpOffice.PhpSpreadsheet.Cell can break PhpOffice.PhpSpreadsheet.Calculation.LookupRef, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→13 PhpOffice.PhpSpreadsheet.RichText depends on PhpOffice.PhpSpreadsheet.Style✕
Type pairs
3 distinct (type in PhpOffice.PhpSpreadsheet.RichText → type in PhpOffice.PhpSpreadsheet.Style) references.
PhpOffice.PhpSpreadsheet.RichText uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet.RichText, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→22 PhpOffice.PhpSpreadsheet.RichText depends on PhpOffice.PhpSpreadsheet.Cell✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.RichText → type in PhpOffice.PhpSpreadsheet.Cell) reference.
PhpOffice.PhpSpreadsheet.RichText uses PhpOffice.PhpSpreadsheet.Cell. Changing PhpOffice.PhpSpreadsheet.Cell can break PhpOffice.PhpSpreadsheet.RichText, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→35 PhpOffice.PhpSpreadsheet.RichText depends on PhpOffice.PhpSpreadsheetcycle✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.RichText → type in PhpOffice.PhpSpreadsheet) reference.
PhpOffice.PhpSpreadsheet.RichText uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.RichText, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
27→13 PhpOffice.PhpSpreadsheet.Shared depends on PhpOffice.PhpSpreadsheet.Style✕
Type pairs
3 distinct (type in PhpOffice.PhpSpreadsheet.Shared → type in PhpOffice.PhpSpreadsheet.Style) references.
PhpOffice.PhpSpreadsheet.Shared uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet.Shared, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
27→17 PhpOffice.PhpSpreadsheet.Shared depends on PhpOffice.PhpSpreadsheet.Shared.Escher✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Shared → type in PhpOffice.PhpSpreadsheet.Shared.Escher) references.
PhpOffice.PhpSpreadsheet.Shared uses PhpOffice.PhpSpreadsheet.Shared.Escher. Changing PhpOffice.PhpSpreadsheet.Shared.Escher can break PhpOffice.PhpSpreadsheet.Shared, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
27→20 PhpOffice.PhpSpreadsheet.Shared depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Shared → type in PhpOffice.PhpSpreadsheet.Worksheet) reference.
PhpOffice.PhpSpreadsheet.Shared uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Shared, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
27→22 PhpOffice.PhpSpreadsheet.Shared depends on PhpOffice.PhpSpreadsheet.Cell✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Shared → type in PhpOffice.PhpSpreadsheet.Cell) reference.
PhpOffice.PhpSpreadsheet.Shared uses PhpOffice.PhpSpreadsheet.Cell. Changing PhpOffice.PhpSpreadsheet.Cell can break PhpOffice.PhpSpreadsheet.Shared, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→3 PhpOffice.PhpSpreadsheet.Reader.Xlsx depends on PhpOffice.PhpSpreadsheet.Document✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xlsx → type in PhpOffice.PhpSpreadsheet.Document) reference.
PhpOffice.PhpSpreadsheet.Reader.Xlsx uses PhpOffice.PhpSpreadsheet.Document. Changing PhpOffice.PhpSpreadsheet.Document can break PhpOffice.PhpSpreadsheet.Reader.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→5 PhpOffice.PhpSpreadsheet.Reader.Xlsx depends on PhpOffice.PhpSpreadsheet.Worksheet.Sparkline✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xlsx → type in PhpOffice.PhpSpreadsheet.Worksheet.Sparkline) reference.
PhpOffice.PhpSpreadsheet.Reader.Xlsx uses PhpOffice.PhpSpreadsheet.Worksheet.Sparkline. Changing PhpOffice.PhpSpreadsheet.Worksheet.Sparkline can break PhpOffice.PhpSpreadsheet.Reader.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→7 PhpOffice.PhpSpreadsheet.Reader.Xlsx depends on PhpOffice.PhpSpreadsheet.Reader.Security✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xlsx → type in PhpOffice.PhpSpreadsheet.Reader.Security) reference.
PhpOffice.PhpSpreadsheet.Reader.Xlsx uses PhpOffice.PhpSpreadsheet.Reader.Security. Changing PhpOffice.PhpSpreadsheet.Reader.Security can break PhpOffice.PhpSpreadsheet.Reader.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→9 PhpOffice.PhpSpreadsheet.Reader.Xlsx depends on PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting✕
Type pairs
3 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xlsx → type in PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting) references.
PhpOffice.PhpSpreadsheet.Reader.Xlsx uses PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting. Changing PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting can break PhpOffice.PhpSpreadsheet.Reader.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→11 PhpOffice.PhpSpreadsheet.Reader.Xlsx depends on PhpOffice.PhpSpreadsheet.Worksheet.PivotTable✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xlsx → type in PhpOffice.PhpSpreadsheet.Worksheet.PivotTable) references.
PhpOffice.PhpSpreadsheet.Reader.Xlsx uses PhpOffice.PhpSpreadsheet.Worksheet.PivotTable. Changing PhpOffice.PhpSpreadsheet.Worksheet.PivotTable can break PhpOffice.PhpSpreadsheet.Reader.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→13 PhpOffice.PhpSpreadsheet.Reader.Xlsx depends on PhpOffice.PhpSpreadsheet.Style✕
Type pairs
10 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xlsx → type in PhpOffice.PhpSpreadsheet.Style) references.
PhpOffice.PhpSpreadsheet.Reader.Xlsx uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet.Reader.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→14 PhpOffice.PhpSpreadsheet.Reader.Xlsx depends on PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xlsx → type in PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter) reference.
PhpOffice.PhpSpreadsheet.Reader.Xlsx uses PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter. Changing PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter can break PhpOffice.PhpSpreadsheet.Reader.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→15 PhpOffice.PhpSpreadsheet.Reader.Xlsx depends on PhpOffice.PhpSpreadsheet.Chart✕
Type pairs
9 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xlsx → type in PhpOffice.PhpSpreadsheet.Chart) references.
PhpOffice.PhpSpreadsheet.Reader.Xlsx uses PhpOffice.PhpSpreadsheet.Chart. Changing PhpOffice.PhpSpreadsheet.Chart can break PhpOffice.PhpSpreadsheet.Reader.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→20 PhpOffice.PhpSpreadsheet.Reader.Xlsx depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
11 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xlsx → type in PhpOffice.PhpSpreadsheet.Worksheet) references.
PhpOffice.PhpSpreadsheet.Reader.Xlsx uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Reader.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→26 PhpOffice.PhpSpreadsheet.Reader.Xlsx depends on PhpOffice.PhpSpreadsheet.RichText✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xlsx → type in PhpOffice.PhpSpreadsheet.RichText) reference.
PhpOffice.PhpSpreadsheet.Reader.Xlsx uses PhpOffice.PhpSpreadsheet.RichText. Changing PhpOffice.PhpSpreadsheet.RichText can break PhpOffice.PhpSpreadsheet.Reader.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→33 PhpOffice.PhpSpreadsheet.Reader.Xlsx depends on PhpOffice.PhpSpreadsheet.Readercycle✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xlsx → type in PhpOffice.PhpSpreadsheet.Reader) reference.
PhpOffice.PhpSpreadsheet.Reader.Xlsx uses PhpOffice.PhpSpreadsheet.Reader. Changing PhpOffice.PhpSpreadsheet.Reader can break PhpOffice.PhpSpreadsheet.Reader.Xlsx, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
28→35 PhpOffice.PhpSpreadsheet.Reader.Xlsx depends on PhpOffice.PhpSpreadsheetcycle✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xlsx → type in PhpOffice.PhpSpreadsheet) reference.
PhpOffice.PhpSpreadsheet.Reader.Xlsx uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Reader.Xlsx, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
29→20 PhpOffice.PhpSpreadsheet.Writer.Ods depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
8 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Ods → type in PhpOffice.PhpSpreadsheet.Worksheet) references.
PhpOffice.PhpSpreadsheet.Writer.Ods uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Writer.Ods, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→22 PhpOffice.PhpSpreadsheet.Writer.Ods depends on PhpOffice.PhpSpreadsheet.Cell✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Ods → type in PhpOffice.PhpSpreadsheet.Cell) reference.
PhpOffice.PhpSpreadsheet.Writer.Ods uses PhpOffice.PhpSpreadsheet.Cell. Changing PhpOffice.PhpSpreadsheet.Cell can break PhpOffice.PhpSpreadsheet.Writer.Ods, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→27 PhpOffice.PhpSpreadsheet.Writer.Ods depends on PhpOffice.PhpSpreadsheet.Shared✕
Type pairs
6 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Ods → type in PhpOffice.PhpSpreadsheet.Shared) references.
PhpOffice.PhpSpreadsheet.Writer.Ods uses PhpOffice.PhpSpreadsheet.Shared. Changing PhpOffice.PhpSpreadsheet.Shared can break PhpOffice.PhpSpreadsheet.Writer.Ods, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→34 PhpOffice.PhpSpreadsheet.Writer.Ods depends on PhpOffice.PhpSpreadsheet.Writercycle✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Ods → type in PhpOffice.PhpSpreadsheet.Writer) references.
PhpOffice.PhpSpreadsheet.Writer.Ods uses PhpOffice.PhpSpreadsheet.Writer. Changing PhpOffice.PhpSpreadsheet.Writer can break PhpOffice.PhpSpreadsheet.Writer.Ods, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
29→35 PhpOffice.PhpSpreadsheet.Writer.Ods depends on PhpOffice.PhpSpreadsheetcycle✕
Type pairs
6 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Ods → type in PhpOffice.PhpSpreadsheet) references.
PhpOffice.PhpSpreadsheet.Writer.Ods uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Writer.Ods, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
30→13 PhpOffice.PhpSpreadsheet.Writer.Ods.Cell depends on PhpOffice.PhpSpreadsheet.Style✕
Type pairs
5 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Ods.Cell → type in PhpOffice.PhpSpreadsheet.Style) references.
PhpOffice.PhpSpreadsheet.Writer.Ods.Cell uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet.Writer.Ods.Cell, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→20 PhpOffice.PhpSpreadsheet.Writer.Ods.Cell depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
3 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Ods.Cell → type in PhpOffice.PhpSpreadsheet.Worksheet) references.
PhpOffice.PhpSpreadsheet.Writer.Ods.Cell uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Writer.Ods.Cell, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→22 PhpOffice.PhpSpreadsheet.Writer.Ods.Cell depends on PhpOffice.PhpSpreadsheet.Cell✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Ods.Cell → type in PhpOffice.PhpSpreadsheet.Cell) reference.
PhpOffice.PhpSpreadsheet.Writer.Ods.Cell uses PhpOffice.PhpSpreadsheet.Cell. Changing PhpOffice.PhpSpreadsheet.Cell can break PhpOffice.PhpSpreadsheet.Writer.Ods.Cell, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→27 PhpOffice.PhpSpreadsheet.Writer.Ods.Cell depends on PhpOffice.PhpSpreadsheet.Shared✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Ods.Cell → type in PhpOffice.PhpSpreadsheet.Shared) references.
PhpOffice.PhpSpreadsheet.Writer.Ods.Cell uses PhpOffice.PhpSpreadsheet.Shared. Changing PhpOffice.PhpSpreadsheet.Shared can break PhpOffice.PhpSpreadsheet.Writer.Ods.Cell, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→13 PhpOffice.PhpSpreadsheet.Writer.Xls depends on PhpOffice.PhpSpreadsheet.Style✕
Type pairs
5 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xls → type in PhpOffice.PhpSpreadsheet.Style) references.
PhpOffice.PhpSpreadsheet.Writer.Xls uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet.Writer.Xls, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→20 PhpOffice.PhpSpreadsheet.Writer.Xls depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xls → type in PhpOffice.PhpSpreadsheet.Worksheet) references.
PhpOffice.PhpSpreadsheet.Writer.Xls uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Writer.Xls, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→22 PhpOffice.PhpSpreadsheet.Writer.Xls depends on PhpOffice.PhpSpreadsheet.Cell✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xls → type in PhpOffice.PhpSpreadsheet.Cell) reference.
PhpOffice.PhpSpreadsheet.Writer.Xls uses PhpOffice.PhpSpreadsheet.Cell. Changing PhpOffice.PhpSpreadsheet.Cell can break PhpOffice.PhpSpreadsheet.Writer.Xls, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→27 PhpOffice.PhpSpreadsheet.Writer.Xls depends on PhpOffice.PhpSpreadsheet.Shared✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xls → type in PhpOffice.PhpSpreadsheet.Shared) references.
PhpOffice.PhpSpreadsheet.Writer.Xls uses PhpOffice.PhpSpreadsheet.Shared. Changing PhpOffice.PhpSpreadsheet.Shared can break PhpOffice.PhpSpreadsheet.Writer.Xls, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→35 PhpOffice.PhpSpreadsheet.Writer.Xls depends on PhpOffice.PhpSpreadsheetcycle✕
Type pairs
3 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xls → type in PhpOffice.PhpSpreadsheet) references.
PhpOffice.PhpSpreadsheet.Writer.Xls uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Writer.Xls, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
32→5 PhpOffice.PhpSpreadsheet.Writer.Xlsx depends on PhpOffice.PhpSpreadsheet.Worksheet.Sparkline✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xlsx → type in PhpOffice.PhpSpreadsheet.Worksheet.Sparkline) reference.
PhpOffice.PhpSpreadsheet.Writer.Xlsx uses PhpOffice.PhpSpreadsheet.Worksheet.Sparkline. Changing PhpOffice.PhpSpreadsheet.Worksheet.Sparkline can break PhpOffice.PhpSpreadsheet.Writer.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→9 PhpOffice.PhpSpreadsheet.Writer.Xlsx depends on PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting✕
Type pairs
4 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xlsx → type in PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting) references.
PhpOffice.PhpSpreadsheet.Writer.Xlsx uses PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting. Changing PhpOffice.PhpSpreadsheet.Style.ConditionalFormatting can break PhpOffice.PhpSpreadsheet.Writer.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→10 PhpOffice.PhpSpreadsheet.Writer.Xlsx depends on PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter.Column✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xlsx → type in PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter.Column) reference.
PhpOffice.PhpSpreadsheet.Writer.Xlsx uses PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter.Column. Changing PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter.Column can break PhpOffice.PhpSpreadsheet.Writer.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→11 PhpOffice.PhpSpreadsheet.Writer.Xlsx depends on PhpOffice.PhpSpreadsheet.Worksheet.PivotTable✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xlsx → type in PhpOffice.PhpSpreadsheet.Worksheet.PivotTable) references.
PhpOffice.PhpSpreadsheet.Writer.Xlsx uses PhpOffice.PhpSpreadsheet.Worksheet.PivotTable. Changing PhpOffice.PhpSpreadsheet.Worksheet.PivotTable can break PhpOffice.PhpSpreadsheet.Writer.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→13 PhpOffice.PhpSpreadsheet.Writer.Xlsx depends on PhpOffice.PhpSpreadsheet.Style✕
Type pairs
10 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xlsx → type in PhpOffice.PhpSpreadsheet.Style) references.
PhpOffice.PhpSpreadsheet.Writer.Xlsx uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet.Writer.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→14 PhpOffice.PhpSpreadsheet.Writer.Xlsx depends on PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xlsx → type in PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter) reference.
PhpOffice.PhpSpreadsheet.Writer.Xlsx uses PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter. Changing PhpOffice.PhpSpreadsheet.Worksheet.AutoFilter can break PhpOffice.PhpSpreadsheet.Writer.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→15 PhpOffice.PhpSpreadsheet.Writer.Xlsx depends on PhpOffice.PhpSpreadsheet.Chart✕
Type pairs
13 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xlsx → type in PhpOffice.PhpSpreadsheet.Chart) references.
PhpOffice.PhpSpreadsheet.Writer.Xlsx uses PhpOffice.PhpSpreadsheet.Chart. Changing PhpOffice.PhpSpreadsheet.Chart can break PhpOffice.PhpSpreadsheet.Writer.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→20 PhpOffice.PhpSpreadsheet.Writer.Xlsx depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
11 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xlsx → type in PhpOffice.PhpSpreadsheet.Worksheet) references.
PhpOffice.PhpSpreadsheet.Writer.Xlsx uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Writer.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→22 PhpOffice.PhpSpreadsheet.Writer.Xlsx depends on PhpOffice.PhpSpreadsheet.Cell✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xlsx → type in PhpOffice.PhpSpreadsheet.Cell) reference.
PhpOffice.PhpSpreadsheet.Writer.Xlsx uses PhpOffice.PhpSpreadsheet.Cell. Changing PhpOffice.PhpSpreadsheet.Cell can break PhpOffice.PhpSpreadsheet.Writer.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→26 PhpOffice.PhpSpreadsheet.Writer.Xlsx depends on PhpOffice.PhpSpreadsheet.RichText✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xlsx → type in PhpOffice.PhpSpreadsheet.RichText) reference.
PhpOffice.PhpSpreadsheet.Writer.Xlsx uses PhpOffice.PhpSpreadsheet.RichText. Changing PhpOffice.PhpSpreadsheet.RichText can break PhpOffice.PhpSpreadsheet.Writer.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→27 PhpOffice.PhpSpreadsheet.Writer.Xlsx depends on PhpOffice.PhpSpreadsheet.Shared✕
Type pairs
14 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xlsx → type in PhpOffice.PhpSpreadsheet.Shared) references.
PhpOffice.PhpSpreadsheet.Writer.Xlsx uses PhpOffice.PhpSpreadsheet.Shared. Changing PhpOffice.PhpSpreadsheet.Shared can break PhpOffice.PhpSpreadsheet.Writer.Xlsx, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→34 PhpOffice.PhpSpreadsheet.Writer.Xlsx depends on PhpOffice.PhpSpreadsheet.Writercycle✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xlsx → type in PhpOffice.PhpSpreadsheet.Writer) reference.
PhpOffice.PhpSpreadsheet.Writer.Xlsx uses PhpOffice.PhpSpreadsheet.Writer. Changing PhpOffice.PhpSpreadsheet.Writer can break PhpOffice.PhpSpreadsheet.Writer.Xlsx, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
32→35 PhpOffice.PhpSpreadsheet.Writer.Xlsx depends on PhpOffice.PhpSpreadsheetcycle✕
Type pairs
14 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Xlsx → type in PhpOffice.PhpSpreadsheet) references.
PhpOffice.PhpSpreadsheet.Writer.Xlsx uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Writer.Xlsx, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
33→7 PhpOffice.PhpSpreadsheet.Reader depends on PhpOffice.PhpSpreadsheet.Reader.Security✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader → type in PhpOffice.PhpSpreadsheet.Reader.Security) reference.
PhpOffice.PhpSpreadsheet.Reader uses PhpOffice.PhpSpreadsheet.Reader.Security. Changing PhpOffice.PhpSpreadsheet.Reader.Security can break PhpOffice.PhpSpreadsheet.Reader, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→13 PhpOffice.PhpSpreadsheet.Reader depends on PhpOffice.PhpSpreadsheet.Style✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader → type in PhpOffice.PhpSpreadsheet.Style) reference.
PhpOffice.PhpSpreadsheet.Reader uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet.Reader, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→16 PhpOffice.PhpSpreadsheet.Reader depends on PhpOffice.PhpSpreadsheet.Reader.Xls✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader → type in PhpOffice.PhpSpreadsheet.Reader.Xls) reference.
PhpOffice.PhpSpreadsheet.Reader uses PhpOffice.PhpSpreadsheet.Reader.Xls. Changing PhpOffice.PhpSpreadsheet.Reader.Xls can break PhpOffice.PhpSpreadsheet.Reader, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→20 PhpOffice.PhpSpreadsheet.Reader depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
5 distinct (type in PhpOffice.PhpSpreadsheet.Reader → type in PhpOffice.PhpSpreadsheet.Worksheet) references.
PhpOffice.PhpSpreadsheet.Reader uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Reader, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→22 PhpOffice.PhpSpreadsheet.Reader depends on PhpOffice.PhpSpreadsheet.Cell✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader → type in PhpOffice.PhpSpreadsheet.Cell) reference.
PhpOffice.PhpSpreadsheet.Reader uses PhpOffice.PhpSpreadsheet.Cell. Changing PhpOffice.PhpSpreadsheet.Cell can break PhpOffice.PhpSpreadsheet.Reader, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→26 PhpOffice.PhpSpreadsheet.Reader depends on PhpOffice.PhpSpreadsheet.RichText✕
Type pairs
5 distinct (type in PhpOffice.PhpSpreadsheet.Reader → type in PhpOffice.PhpSpreadsheet.RichText) references.
PhpOffice.PhpSpreadsheet.Reader uses PhpOffice.PhpSpreadsheet.RichText. Changing PhpOffice.PhpSpreadsheet.RichText can break PhpOffice.PhpSpreadsheet.Reader, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→28 PhpOffice.PhpSpreadsheet.Reader depends on PhpOffice.PhpSpreadsheet.Reader.Xlsx✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader → type in PhpOffice.PhpSpreadsheet.Reader.Xlsx) reference.
PhpOffice.PhpSpreadsheet.Reader uses PhpOffice.PhpSpreadsheet.Reader.Xlsx. Changing PhpOffice.PhpSpreadsheet.Reader.Xlsx can break PhpOffice.PhpSpreadsheet.Reader, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→35 PhpOffice.PhpSpreadsheet.Reader depends on PhpOffice.PhpSpreadsheetcycle✕
Type pairs
13 distinct (type in PhpOffice.PhpSpreadsheet.Reader → type in PhpOffice.PhpSpreadsheet) references.
PhpOffice.PhpSpreadsheet.Reader uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Reader, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
34→12 PhpOffice.PhpSpreadsheet.Writer depends on PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Writer → type in PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer) reference.
PhpOffice.PhpSpreadsheet.Writer uses PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer. Changing PhpOffice.PhpSpreadsheet.Shared.Escher.DggContainer can break PhpOffice.PhpSpreadsheet.Writer, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→13 PhpOffice.PhpSpreadsheet.Writer depends on PhpOffice.PhpSpreadsheet.Style✕
Type pairs
6 distinct (type in PhpOffice.PhpSpreadsheet.Writer → type in PhpOffice.PhpSpreadsheet.Style) references.
PhpOffice.PhpSpreadsheet.Writer uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet.Writer, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→15 PhpOffice.PhpSpreadsheet.Writer depends on PhpOffice.PhpSpreadsheet.Chart✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Writer → type in PhpOffice.PhpSpreadsheet.Chart) reference.
PhpOffice.PhpSpreadsheet.Writer uses PhpOffice.PhpSpreadsheet.Chart. Changing PhpOffice.PhpSpreadsheet.Chart can break PhpOffice.PhpSpreadsheet.Writer, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→20 PhpOffice.PhpSpreadsheet.Writer depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
5 distinct (type in PhpOffice.PhpSpreadsheet.Writer → type in PhpOffice.PhpSpreadsheet.Worksheet) references.
PhpOffice.PhpSpreadsheet.Writer uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Writer, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→22 PhpOffice.PhpSpreadsheet.Writer depends on PhpOffice.PhpSpreadsheet.Cell✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Writer → type in PhpOffice.PhpSpreadsheet.Cell) reference.
PhpOffice.PhpSpreadsheet.Writer uses PhpOffice.PhpSpreadsheet.Cell. Changing PhpOffice.PhpSpreadsheet.Cell can break PhpOffice.PhpSpreadsheet.Writer, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→26 PhpOffice.PhpSpreadsheet.Writer depends on PhpOffice.PhpSpreadsheet.RichText✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Writer → type in PhpOffice.PhpSpreadsheet.RichText) reference.
PhpOffice.PhpSpreadsheet.Writer uses PhpOffice.PhpSpreadsheet.RichText. Changing PhpOffice.PhpSpreadsheet.RichText can break PhpOffice.PhpSpreadsheet.Writer, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→29 PhpOffice.PhpSpreadsheet.Writer depends on PhpOffice.PhpSpreadsheet.Writer.Ods✕
Type pairs
7 distinct (type in PhpOffice.PhpSpreadsheet.Writer → type in PhpOffice.PhpSpreadsheet.Writer.Ods) references.
PhpOffice.PhpSpreadsheet.Writer uses PhpOffice.PhpSpreadsheet.Writer.Ods. Changing PhpOffice.PhpSpreadsheet.Writer.Ods can break PhpOffice.PhpSpreadsheet.Writer, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→31 PhpOffice.PhpSpreadsheet.Writer depends on PhpOffice.PhpSpreadsheet.Writer.Xls✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Writer → type in PhpOffice.PhpSpreadsheet.Writer.Xls) references.
PhpOffice.PhpSpreadsheet.Writer uses PhpOffice.PhpSpreadsheet.Writer.Xls. Changing PhpOffice.PhpSpreadsheet.Writer.Xls can break PhpOffice.PhpSpreadsheet.Writer, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→32 PhpOffice.PhpSpreadsheet.Writer depends on PhpOffice.PhpSpreadsheet.Writer.Xlsx✕
Type pairs
14 distinct (type in PhpOffice.PhpSpreadsheet.Writer → type in PhpOffice.PhpSpreadsheet.Writer.Xlsx) references.
PhpOffice.PhpSpreadsheet.Writer uses PhpOffice.PhpSpreadsheet.Writer.Xlsx. Changing PhpOffice.PhpSpreadsheet.Writer.Xlsx can break PhpOffice.PhpSpreadsheet.Writer, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→35 PhpOffice.PhpSpreadsheet.Writer depends on PhpOffice.PhpSpreadsheetcycle✕
Type pairs
9 distinct (type in PhpOffice.PhpSpreadsheet.Writer → type in PhpOffice.PhpSpreadsheet) references.
PhpOffice.PhpSpreadsheet.Writer uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Writer, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
35→3 PhpOffice.PhpSpreadsheet depends on PhpOffice.PhpSpreadsheet.Document✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet → type in PhpOffice.PhpSpreadsheet.Document) references.
PhpOffice.PhpSpreadsheet uses PhpOffice.PhpSpreadsheet.Document. Changing PhpOffice.PhpSpreadsheet.Document can break PhpOffice.PhpSpreadsheet, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
35→13 PhpOffice.PhpSpreadsheet depends on PhpOffice.PhpSpreadsheet.Style✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet → type in PhpOffice.PhpSpreadsheet.Style) references.
PhpOffice.PhpSpreadsheet uses PhpOffice.PhpSpreadsheet.Style. Changing PhpOffice.PhpSpreadsheet.Style can break PhpOffice.PhpSpreadsheet, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
35→20 PhpOffice.PhpSpreadsheet depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
10 distinct (type in PhpOffice.PhpSpreadsheet → type in PhpOffice.PhpSpreadsheet.Worksheet) references.
PhpOffice.PhpSpreadsheet uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
35→22 PhpOffice.PhpSpreadsheet depends on PhpOffice.PhpSpreadsheet.Cell✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet → type in PhpOffice.PhpSpreadsheet.Cell) reference.
PhpOffice.PhpSpreadsheet uses PhpOffice.PhpSpreadsheet.Cell. Changing PhpOffice.PhpSpreadsheet.Cell can break PhpOffice.PhpSpreadsheet, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
35→23 PhpOffice.PhpSpreadsheet depends on PhpOffice.PhpSpreadsheet.Calculation✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet → type in PhpOffice.PhpSpreadsheet.Calculation) reference.
PhpOffice.PhpSpreadsheet uses PhpOffice.PhpSpreadsheet.Calculation. Changing PhpOffice.PhpSpreadsheet.Calculation can break PhpOffice.PhpSpreadsheet, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
35→26 PhpOffice.PhpSpreadsheet depends on PhpOffice.PhpSpreadsheet.RichText✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet → type in PhpOffice.PhpSpreadsheet.RichText) reference.
PhpOffice.PhpSpreadsheet uses PhpOffice.PhpSpreadsheet.RichText. Changing PhpOffice.PhpSpreadsheet.RichText can break PhpOffice.PhpSpreadsheet, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
35→33 PhpOffice.PhpSpreadsheet depends on PhpOffice.PhpSpreadsheet.Reader✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet → type in PhpOffice.PhpSpreadsheet.Reader) references.
PhpOffice.PhpSpreadsheet uses PhpOffice.PhpSpreadsheet.Reader. Changing PhpOffice.PhpSpreadsheet.Reader can break PhpOffice.PhpSpreadsheet, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
35→34 PhpOffice.PhpSpreadsheet depends on PhpOffice.PhpSpreadsheet.Writer✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet → type in PhpOffice.PhpSpreadsheet.Writer) reference.
PhpOffice.PhpSpreadsheet uses PhpOffice.PhpSpreadsheet.Writer. Changing PhpOffice.PhpSpreadsheet.Writer can break PhpOffice.PhpSpreadsheet, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→15 PhpOffice.PhpSpreadsheet.Helper depends on PhpOffice.PhpSpreadsheet.Chart✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Helper → type in PhpOffice.PhpSpreadsheet.Chart) reference.
PhpOffice.PhpSpreadsheet.Helper uses PhpOffice.PhpSpreadsheet.Chart. Changing PhpOffice.PhpSpreadsheet.Chart can break PhpOffice.PhpSpreadsheet.Helper, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→20 PhpOffice.PhpSpreadsheet.Helper depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Helper → type in PhpOffice.PhpSpreadsheet.Worksheet) reference.
PhpOffice.PhpSpreadsheet.Helper uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Helper, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→26 PhpOffice.PhpSpreadsheet.Helper depends on PhpOffice.PhpSpreadsheet.RichText✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Helper → type in PhpOffice.PhpSpreadsheet.RichText) reference.
PhpOffice.PhpSpreadsheet.Helper uses PhpOffice.PhpSpreadsheet.RichText. Changing PhpOffice.PhpSpreadsheet.RichText can break PhpOffice.PhpSpreadsheet.Helper, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→34 PhpOffice.PhpSpreadsheet.Helper depends on PhpOffice.PhpSpreadsheet.Writer✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Helper → type in PhpOffice.PhpSpreadsheet.Writer) reference.
PhpOffice.PhpSpreadsheet.Helper uses PhpOffice.PhpSpreadsheet.Writer. Changing PhpOffice.PhpSpreadsheet.Writer can break PhpOffice.PhpSpreadsheet.Helper, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→35 PhpOffice.PhpSpreadsheet.Helper depends on PhpOffice.PhpSpreadsheet✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Helper → type in PhpOffice.PhpSpreadsheet) reference.
PhpOffice.PhpSpreadsheet.Helper uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Helper, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→3 PhpOffice.PhpSpreadsheet.Reader.Ods depends on PhpOffice.PhpSpreadsheet.Document✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Ods → type in PhpOffice.PhpSpreadsheet.Document) reference.
PhpOffice.PhpSpreadsheet.Reader.Ods uses PhpOffice.PhpSpreadsheet.Document. Changing PhpOffice.PhpSpreadsheet.Document can break PhpOffice.PhpSpreadsheet.Reader.Ods, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→20 PhpOffice.PhpSpreadsheet.Reader.Ods depends on PhpOffice.PhpSpreadsheet.Worksheet✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Ods → type in PhpOffice.PhpSpreadsheet.Worksheet) reference.
PhpOffice.PhpSpreadsheet.Reader.Ods uses PhpOffice.PhpSpreadsheet.Worksheet. Changing PhpOffice.PhpSpreadsheet.Worksheet can break PhpOffice.PhpSpreadsheet.Reader.Ods, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→35 PhpOffice.PhpSpreadsheet.Reader.Ods depends on PhpOffice.PhpSpreadsheet✕
Type pairs
2 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Ods → type in PhpOffice.PhpSpreadsheet) references.
PhpOffice.PhpSpreadsheet.Reader.Ods uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Reader.Ods, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
38→3 PhpOffice.PhpSpreadsheet.Reader.Xml depends on PhpOffice.PhpSpreadsheet.Document✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xml → type in PhpOffice.PhpSpreadsheet.Document) reference.
PhpOffice.PhpSpreadsheet.Reader.Xml uses PhpOffice.PhpSpreadsheet.Document. Changing PhpOffice.PhpSpreadsheet.Document can break PhpOffice.PhpSpreadsheet.Reader.Xml, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
38→35 PhpOffice.PhpSpreadsheet.Reader.Xml depends on PhpOffice.PhpSpreadsheet✕
Type pairs
3 distinct (type in PhpOffice.PhpSpreadsheet.Reader.Xml → type in PhpOffice.PhpSpreadsheet) references.
PhpOffice.PhpSpreadsheet.Reader.Xml uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Reader.Xml, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
39→34 PhpOffice.PhpSpreadsheet.Writer.Pdf depends on PhpOffice.PhpSpreadsheet.Writer✕
Type pairs
3 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Pdf → type in PhpOffice.PhpSpreadsheet.Writer) references.
PhpOffice.PhpSpreadsheet.Writer.Pdf uses PhpOffice.PhpSpreadsheet.Writer. Changing PhpOffice.PhpSpreadsheet.Writer can break PhpOffice.PhpSpreadsheet.Writer.Pdf, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
39→35 PhpOffice.PhpSpreadsheet.Writer.Pdf depends on PhpOffice.PhpSpreadsheet✕
Type pairs
1 distinct (type in PhpOffice.PhpSpreadsheet.Writer.Pdf → type in PhpOffice.PhpSpreadsheet) reference.
PhpOffice.PhpSpreadsheet.Writer.Pdf uses PhpOffice.PhpSpreadsheet. Changing PhpOffice.PhpSpreadsheet can break PhpOffice.PhpSpreadsheet.Writer.Pdf, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
40→30 samples.Basic5 depends on PhpOffice.PhpSpreadsheet.Writer.Ods.Cell✕
Type pairs
1 distinct (type in samples.Basic5 → type in PhpOffice.PhpSpreadsheet.Writer.Ods.Cell) reference.
samples.Basic5 uses PhpOffice.PhpSpreadsheet.Writer.Ods.Cell. Changing PhpOffice.PhpSpreadsheet.Writer.Ods.Cell can break samples.Basic5, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
40→34 samples.Basic5 depends on PhpOffice.PhpSpreadsheet.Writer✕
Type pairs
1 distinct (type in samples.Basic5 → type in PhpOffice.PhpSpreadsheet.Writer) reference.
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
32
High / Critical
A02:2021 — Cryptographic Failures
2
High / Critical
Roadmap
Begin by establishing a centralized repository for architectural decisions to capture context and consequences, while simultaneously updating the root README to include clear instructions for running the test suite. Next, correct factual inaccuracies in the documentation to ensure it aligns with the current project state. Finally, address stability risks by resolving orphaned knowledge items and mitigating high-churn complexity hotspots in key files.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
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 — 36
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 — 1015
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 — 79
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 42
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. 28 of 32 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — 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 — 32 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, 1112 of 1130 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 READ here — but this repository measures it: a coverage step in CI (`phpunit --coverage`) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.php), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored. To have the real number 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.
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.
D32 Data Compliance (PII/GDPR) — 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. `src/PhpSpreadsheet/Calculation/Calculation.php`, `src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentProcessor.php`, `src/PhpSpreadsheet/Calculation/Statistical/Distributions/StudentT.php`, `src/PhpSpreadsheet/Calculation/TextData/Thai.php`, `src/PhpSpreadsheet/Helper/Html.php`, … (+6 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
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.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality 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.
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.
D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
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.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: 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.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (4): D19, D21, D22, 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.
117 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Xlsx.loadSpreadsheetFromFile at 314. A further 2 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being Xls.readSummaryInformation at 28 — they are counted neither in the figure above nor in this dimension's score.
+ 112 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 Xlsx.loadSpreadsheetFromFile (cyclomatic 314) finding(s) in Cyclomatic Complexity — start with Xlsx.php. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Calculation.processTokenStack (cyclomatic 203) finding(s) in Cyclomatic Complexity — start with Calculation.php. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Calculation.internalParseFormula (cyclomatic 145) finding(s) in Cyclomatic Complexity — start with Calculation.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 Xlsx.loadSpreadsheetFromFile (cognitive 1747) finding(s) in Cognitive Complexity — start with Xlsx.php. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Calculation.processTokenStack (cognitive 629) finding(s) in Cognitive Complexity — start with Calculation.php. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Xml.loadIntoExisting (cognitive 370) finding(s) in Cognitive Complexity — start with Xml.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 Classes8.3 / 10Strong✓ 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 34 MethodTooLong finding(s) in God Classes — start with Chart.php (7), Xls.php (4), Xlsx.php (3). — One of this dimension's main actionable groups (34 warning-level).
Resolve the 32 TooManyMethods finding(s) in God Classes — start with Worksheet.php (3), Html.php (2), Xlsx.php (2). — One of this dimension's main actionable groups (32 warning-level).
Resolve the 27 ClassTooLong finding(s) in God Classes — start with Worksheet.php (3), Xls.php (2), Xlsx.php (2). — One of this dimension's main actionable groups (27 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.
294 duplicated block group(s) detected. A further 15 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 3 of the 309 are in trees this repository does not ship — vendored, example/demo, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 106 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 21 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with Worksheet.php (3), ConvertHex.php, Periodic.php. — One of this dimension's main actionable groups (21 warning-level).
Resolve the 20 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with Time.php, BitWise.php, Periodic.php. — One of this dimension's main actionable groups (20 warning-level).
Resolve the 15 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with Style.php (5), Calculation.php (3), MatrixFunctions.php. — One of this dimension's main actionable groups (15 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.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
3650 test methods: 3650 unit, 0 integration, 0 BDD, 0 e2e.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.3 / 10Stronggated by 166 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
66 skipped (66 with a documented reason), 166 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 3650 tests.
No assertions: testACCRINTM · ×166tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AccrintMTest.php:10
Resolve the 166 No assertions finding(s) in Test Quality — start with CountTest.php (4), PriceTest.php (2), StDevATest.php (2). — One of this dimension's main actionable groups (166 warning-level).
Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
1 outdated, 0 abandoned direct Composer dependencies. PLATFORM requirements (php, ext-*, lib-*) are deliberately not graded here: they name the runtime rather than a Packagist package, so there is no release for them to be behind — whether that runtime is still supported is a separate question with a separate remedy. Development requirements are excluded, because a consumer never installs them. A newer release is reported only where this repository's OWN constraint already admits it, so the remedy is `composer update` and never a manifest edit. Known CVEs in this dependency graph are D30's question.
Outdated: maennchen/zipstream-php
✓ On the Gold path — maintain.
Detailed fixes: d12_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.
Resolve the 19 Hotspot finding(s) in Churn × Complexity Hotspots — start with Worksheet.php (3), Xlsx.php (2), Xls.php (2). — One of this dimension's main actionable groups (19 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor7.5 / 10Strong✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
92 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/PhpSpreadsheet/Writer/Html.php. Counted over 369 of the 545 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×2
Further sole-owners (lower concentration)
What to do
Resolve the 2 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
53 deducted task-comment markers across 138586 LoC (0.0/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 44 TodoComment finding(s) in Explicit Debt — start with Escher.php (6), Xls.php (5), Parser.php (4). — One of this dimension's main actionable groups (44 warning-level).
Resolve the 8 FixmeComment finding(s) in Explicit Debt — start with LoadSpreadsheet.php (2), Parser.php (2), Xls.php. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 1 XxxComment finding(s) in Explicit Debt — start with Font.php. — One of this dimension's main actionable groups (1 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.
This project is well documented: the README and a dedicated docs repository cover every major topic (installation, PHP version support, file formats, PDF export, charting, settings, recipes), with each document clearly indexed by outline. The README gives an overview of what PhpSpreadsheet does and links to install instructions; the docs index provides a comprehensive table of supported file formats, software requirements, and cross-references; faq.md covers common errors (memory exhaustion, worksheet protection) with concrete code fixes; worksheets, tables, sparklines, settings, recipes, and reading-file topics are each fully present in the docs. The README is clipped mid-document but its outline exists, so no section is omitted. The documentation is comprehensive for a spreadsheet library: it includes an overview of PhpSpreadsheet's features (reading/writing readers/writers, pivot tables, migration from PHPExcel, memory saving, file encryption), detailed usage examples (named ranges, conditional formatting wizard steps), architecture/design docs (30 markdown files), and a dedicated Topics directory covering every supported format, reader/writer configuration, and security feature. It is clear, complete, and well-structured. The documentation is comprehensive for a spreadsheet library: the README (1 document) gives an overview of PhpSpreadsheet's calculation engine, auto-filtering, cell-access APIs, and date handling; architecture docs cover Composer autoloading, in-memory spreadsheet model, readers/writers, fluent interfaces, and schematics; and dedicated topics such as The Dating Game, Looping the Loop, and Excel Anomalies explain internal behavior (precision-as-displayed, formula adjustment) and user-hostile quirks. It is a well-structured reference for both new users and contributors.
Documentation: no installation or build instructions · ×2README.md
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
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?
D22 · Internal API ConsistencyAdequate◐ Sampled · advisory
What it measures: Whether the internal API surface is consistent and coherent.
Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.
5 API inconsistencies across a 400-member sample of 544 exposed types.
Redundant factory methods with ambiguous null-handling semantics. `getInstance` likely throws or returns a default if no spreadsheet is provided, while `getInstanceOrNull` explicitly returns null. This forces consumers to guess which method to use based on error handling preferences rather than clear intent.
Duplicate configuration methods for global vs. instance state without clear distinction in naming convention. The prefix `Instance` is inconsistent with other methods like `setCalculationCacheEnabled` which likely applies to the instance but doesn't have an `Instance` prefix. This creates confusion about scope (global static state vs. instance state).
Inconsistent boolean configuration pattern. Some settings use `setXEnabled(bool)` (standard), while others provide separate `enableX()` and `disableX()` methods. This forces developers to remember which pattern applies to which feature.
Same inconsistency as cache: mixed boolean configuration patterns. `setBranchPruningEnabled` takes `mixed` (likely bool or truthy/falsy), while separate enable/disable methods exist.
Overlapping calculation methods with unclear distinction. `calculateFormula` and `calculateFormulaValue` have nearly identical signatures. The presence of a private/protected `_calculateFormulaValue` suggests refactoring debt or internal vs. external usage confusion. It is unclear when to use `calculateFormula` vs `calculateFormulaValue`.
What to do
Resolve the 1 Redundant factory methods with ambiguous null-handling semantics.… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Duplicate configuration methods for global vs. instance state without… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Inconsistent boolean configuration pattern. Some settings use… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d22_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
54 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
32 finding(s): 0 critical, 30 high, 2 medium, 0 low. 26 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 2 file(s) — `src/PhpSpreadsheet/Shared/StringHelper.php` (line 329), `src/PhpSpreadsheet/Writer/Html.php` (line 1609) — 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 (2), REDACTED. — 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 26 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 (26 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir/Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex, Go, Java and Kotlin via Maven/Gradle, npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
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.
147 of 369 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php. Counted over 369 of the 545 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 5 Orphaned knowledge finding(s) in Knowledge Freshness — start with ConvertUOM.php, PageSetup.php, Theme.php. — One of this dimension's main actionable groups (5 issue-level).
Resolve the 1 Further orphaned files (smaller) 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.
Resolve the 2 Change coupling finding(s) in Change Coupling — start with Dompdf.php, BaseReader.php. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 5 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
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.
What to do
Add a 'Testing' section to the root README — how to run the test suite.
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.
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).
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.
README claims Patreon articles exist but the evidence shows no Patreon project — searched for: `Patreon`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
What to do
Reconcile the README with reality: README claims Patreon articles exist but the evidence shows no Patreon project.
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
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
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.
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.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 1 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
Not evidenced — 4 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.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 78 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 — Frontend below the scale floor (4 DOM element(s) < 25) — too little surface to assess accessibility.
AC2 Forms & labels — Frontend below the scale floor (4 DOM element(s) < 25) — too little surface to assess accessibility.
AC3 Page structure — Frontend below the scale floor (4 DOM element(s) < 25) — too little surface to assess accessibility.
AC4 Keyboard semantics — Frontend below the scale floor (4 DOM element(s) < 25) — too little surface to assess accessibility.
AC5 ARIA correctness — Frontend below the scale floor (4 DOM element(s) < 25) — too little surface to assess accessibility.
AC6 Visual & motion safety — Frontend below the scale floor (4 DOM element(s) < 25) — too little surface to assess accessibility.
AC7 A11y enforcement — Frontend below the scale floor (4 DOM element(s) < 25) — too little surface to assess accessibility.
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.
D11 Test Reliability — Test reliability not included — no .php test runner
D14 License Compliance — Package manifest not parsed for licence data — analyzer language-coverage gap
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
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.
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) — 11 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
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.
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
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 2 aggregate root(s) (AggregateRoot/IAggregateRoot); 4 value object(s)
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
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.
Orphaned knowledge src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/PhpSpreadsheet/Worksheet/PageSetup.php— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/PhpSpreadsheet/Writer/Xlsx/Theme.php— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/PhpSpreadsheet/Reader/Xls/Escher.php— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
No assertions: testACCRINTM tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AccrintMTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testACCRINT tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AccrintTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testAMORDEGRC tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AmorDegRcTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testAMORLINC tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AmorLincTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testCOUPDAYBS tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDayBsTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testCOUPDAYSNC tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDaysNcTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testCOUPDAYS tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDaysTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testCOUPNCD tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupNcdTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testCOUPNUM tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupNumTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testCOUPPCD tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupPcdTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testCUMIPMT tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CumIpmtTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testCUMPRINC tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CumPrincTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testDB tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DbTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testDDB tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DdbTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testDISC tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DiscTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testDOLLARDE tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DollarDeTest.php:13— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testDOLLARFR tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DollarFrTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testEFFECT tests/PhpSpreadsheetTests/Calculation/Functions/Financial/EffectTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testFV tests/PhpSpreadsheetTests/Calculation/Functions/Financial/FvTest.php:13— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testIPMT tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IPmtTest.php:13— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testINTRATE tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IntRateTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testISPMT tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IsPmtTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testNPER tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NPerTest.php:13— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testNOMINAL tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NominalTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testNPV tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NpvTest.php:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
TodoComment src/PhpSpreadsheet/Calculation/Financial/Depreciation.php:63— // TODO Handle period value between 0 and 1 (e.g. 0.5) — 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 src/PhpSpreadsheet/Calculation/Financial/Depreciation.php:123— // TODO Handling for fractional $period values — 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 src/PhpSpreadsheet/Calculation/Internal/ExcelArrayPseudoFunctions.php:76— // TODO How are we going to identify and handle a #SPILL! or a #CALC! error? — 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 src/PhpSpreadsheet/Cell/DataType.php:60— // TODO: Sanitize Rich-Text string (max. character count is 32,767) — 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 src/PhpSpreadsheet/Reader/Xlsx.php:1451— // TODO: Autoshapes from twoCellAnchors! — 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 src/PhpSpreadsheet/Reader/Xls.php:3268— // todo: what if string is very long? continue record — 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 src/PhpSpreadsheet/Reader/Xls.php:3806— // todo: implement — 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 src/PhpSpreadsheet/Reader/Xls.php:3884— // TODO: Investigate structure for .xls SHEETLAYOUT record as saved by MS Office Excel 2007 — 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 src/PhpSpreadsheet/Reader/Xls.php:4818— // todo: check if we have identified the whole set of special characters — 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 src/PhpSpreadsheet/Reader/Xls.php:4828— // TODO: external sheet support — 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 src/PhpSpreadsheet/Reader/Html.php:377— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/PhpSpreadsheet/Reader/Html.php:783— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php:492— // TODO: Why is there no BSE Index? Is this a new Office Version? Password protected field? — 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 src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php:684— // TODO Provide support for named values — 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 src/PhpSpreadsheet/Reader/Xls/Biff8.php:244— // todo: if cell range is just a single cell, should this function — 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 src/PhpSpreadsheet/Reader/Xls/Biff8.php:300— // TODO: if cell range is just a single cell, should this function — 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 src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php:398— // TODO: The cfIcon element is not implemented yet. — 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 src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1583— // TODO parse title elements — 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 src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:90— // TODO :: To be implemented — 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 src/PhpSpreadsheet/Writer/Xls/Parser.php:554— // TODO: use real error codes — 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 src/PhpSpreadsheet/Writer/Xls/Parser.php:635— // TODO: use real error codes — 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 src/PhpSpreadsheet/Writer/Xls/Parser.php:650— // TODO: use real error codes — 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 src/PhpSpreadsheet/Writer/Xls/Parser.php:630— // TODO: possible class value 0,1,2 check Formula.pm — 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 src/PhpSpreadsheet/Writer/Xls/Escher.php:172— // todo — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/PhpSpreadsheet/Writer/Xls/Escher.php:212— // todo — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
MethodTooLong: Xlsx.loadSpreadsheetFromFile src/PhpSpreadsheet/Reader/Xlsx.php:560— MethodTooLong — loadSpreadsheetFromFile runs 952 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 852 over it, 9.52× 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: Calculation.processTokenStack src/PhpSpreadsheet/Calculation/Calculation.php:1724— MethodTooLong — processTokenStack runs 472 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 372 over it, 4.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LoadSpreadsheet.loadSpreadsheetFromFile2 src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php:24— MethodTooLong — loadSpreadsheetFromFile2 runs 414 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 314 over it, 4.14× 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: Theme.writeTheme src/PhpSpreadsheet/Writer/Xlsx/Theme.php:17— MethodTooLong — writeTheme runs 363 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 263 over it, 3.63× 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: Chart.readChart src/PhpSpreadsheet/Reader/Xlsx/Chart.php:78— MethodTooLong — readChart runs 340 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 240 over it, 3.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Calculation.internalParseFormula src/PhpSpreadsheet/Calculation/Calculation.php:1186— MethodTooLong — internalParseFormula runs 333 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 233 over it, 3.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Xml.loadIntoExisting src/PhpSpreadsheet/Reader/Xml.php:287— MethodTooLong — loadIntoExisting runs 309 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 209 over it, 3.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Xls.getNextToken src/PhpSpreadsheet/Reader/Xls.php:4381— MethodTooLong — getNextToken runs 305 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 205 over it, 3.05× 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: Ods.processTableRow src/PhpSpreadsheet/Reader/Ods.php:813— MethodTooLong — processTableRow runs 274 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 174 over it, 2.74× 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: Ods.loadIntoExisting src/PhpSpreadsheet/Reader/Ods.php:326— MethodTooLong — loadIntoExisting runs 267 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 167 over it, 2.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Escher.close src/PhpSpreadsheet/Writer/Xls/Escher.php:52— MethodTooLong — close runs 251 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 151 over it, 2.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Worksheet.writeCFRule src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2806— MethodTooLong — writeCFRule runs 216 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 116 over it, 2.16× 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: Chart.writePlotGroup src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1150— MethodTooLong — writePlotGroup runs 215 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 115 over it, 2.15× 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: Chart.chartDataSeries src/PhpSpreadsheet/Reader/Xlsx/Chart.php:599— MethodTooLong — chartDataSeries runs 198 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 98 over it, 1.98× 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: Style.applyFromArray src/PhpSpreadsheet/Style/Style.php:200— MethodTooLong — applyFromArray runs 180 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 80 over it, 1.80× 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: Content.writeCells src/PhpSpreadsheet/Writer/Ods/Content.php:227— MethodTooLong — writeCells runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AutoFilter.showHideRows src/PhpSpreadsheet/Worksheet/AutoFilter.php:789— MethodTooLong — showHideRows 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: Worksheet.close src/PhpSpreadsheet/Writer/Xls/Worksheet.php:201— MethodTooLong — close 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.
MethodTooLong: Xlsx.save src/PhpSpreadsheet/Writer/Xlsx.php:328— MethodTooLong — save runs 160 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× 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: Chart.writeCategoryAxis src/PhpSpreadsheet/Writer/Xlsx/Chart.php:602— MethodTooLong — writeCategoryAxis runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Chart.writeValueAxis src/PhpSpreadsheet/Writer/Xlsx/Chart.php:827— MethodTooLong — writeValueAxis runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× 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: Chart.parseRichText src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1024— MethodTooLong — parseRichText runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Xls.createFormulaFromTokens src/PhpSpreadsheet/Reader/Xls.php:4198— MethodTooLong — createFormulaFromTokens runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Chart.writePlotArea src/PhpSpreadsheet/Writer/Xlsx/Chart.php:321— MethodTooLong — writePlotArea runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ContentTypes.writeContentTypes src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:23— MethodTooLong — writeContentTypes runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
TooManyMethods: Worksheet src/PhpSpreadsheet/Worksheet/Worksheet.php:40— TooManyMethods — 209 methods. The bar is 30 methods; this is 179 over it, 6.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Spreadsheet src/PhpSpreadsheet/Spreadsheet.php:19— TooManyMethods — 119 methods. The bar is 30 methods; this is 89 over it, 3.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Xls src/PhpSpreadsheet/Reader/Xls.php:65— TooManyMethods — 92 methods. The bar is 30 methods; this is 62 over it, 3.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Chart src/PhpSpreadsheet/Chart/Chart.php:8— TooManyMethods — 81 methods. The bar is 30 methods; this is 51 over it, 2.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Html src/PhpSpreadsheet/Writer/Html.php:39— TooManyMethods — 81 methods. The bar is 30 methods; this is 51 over it, 2.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Worksheet src/PhpSpreadsheet/Writer/Xls/Worksheet.php:29— TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Calculation src/PhpSpreadsheet/Calculation/Calculation.php:29— TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Cell src/PhpSpreadsheet/Cell/Cell.php:23— TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Style src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:21— TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Xlsx src/PhpSpreadsheet/Reader/Xlsx.php:54— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BaseDrawing src/PhpSpreadsheet/Worksheet/BaseDrawing.php:11— TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Worksheet src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:28— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SparklineGroup src/PhpSpreadsheet/Worksheet/Sparkline/SparklineGroup.php:14— TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Html src/PhpSpreadsheet/Reader/Html.php:33— TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Csv src/PhpSpreadsheet/Reader/Csv.php:15— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Layout src/PhpSpreadsheet/Chart/Layout.php:7— TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Font src/PhpSpreadsheet/Style/Font.php:8— TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Protection src/PhpSpreadsheet/Worksheet/Protection.php:7— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Xlsx src/PhpSpreadsheet/Writer/Xlsx.php:41— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ReferenceHelper src/PhpSpreadsheet/ReferenceHelper.php:15— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AutoFilter src/PhpSpreadsheet/Worksheet/AutoFilter.php:21— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Properties src/PhpSpreadsheet/Chart/Properties.php:11— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PageSetup src/PhpSpreadsheet/Worksheet/PageSetup.php:80— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DataSeriesValues src/PhpSpreadsheet/Chart/DataSeriesValues.php:10— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Properties src/PhpSpreadsheet/Document/Properties.php:8— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Xls src/PhpSpreadsheet/Reader/Xls.php:65— ClassTooLong — 2175 significant lines (blank, comment-only and punctuation-only lines excluded), 92 methods. The bar is 400 significant lines; this is 1775 over it, 5.44× 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: FunctionArray src/PhpSpreadsheet/Calculation/FunctionArray.php:5— ClassTooLong — 2140 significant lines (blank, comment-only and punctuation-only lines excluded), 0 methods. The bar is 400 significant lines; this is 1740 over it, 5.35× 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: Xlsx src/PhpSpreadsheet/Reader/Xlsx.php:54— ClassTooLong — 1845 significant lines (blank, comment-only and punctuation-only lines excluded), 56 methods. The bar is 400 significant lines; this is 1445 over it, 4.61× 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: Worksheet src/PhpSpreadsheet/Worksheet/Worksheet.php:40— ClassTooLong — 1647 significant lines (blank, comment-only and punctuation-only lines excluded), 209 methods. The bar is 400 significant lines; this is 1247 over it, 4.12× 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: Calculation src/PhpSpreadsheet/Calculation/Calculation.php:29— ClassTooLong — 1643 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods. The bar is 400 significant lines; this is 1243 over it, 4.11× 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: Worksheet src/PhpSpreadsheet/Writer/Xls/Worksheet.php:29— ClassTooLong — 1523 significant lines (blank, comment-only and punctuation-only lines excluded), 71 methods. The bar is 400 significant lines; this is 1123 over it, 3.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: Chart src/PhpSpreadsheet/Writer/Xlsx/Chart.php:23— ClassTooLong — 1306 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 906 over it, 3.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Html src/PhpSpreadsheet/Writer/Html.php:39— ClassTooLong — 1216 significant lines (blank, comment-only and punctuation-only lines excluded), 81 methods. The bar is 400 significant lines; this is 816 over it, 3.04× 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: Ods src/PhpSpreadsheet/Reader/Ods.php:40— ClassTooLong — 1178 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 778 over it, 2.95× 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: Chart src/PhpSpreadsheet/Reader/Xlsx/Chart.php:24— ClassTooLong — 1154 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 754 over it, 2.89× 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: Worksheet src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:28— ClassTooLong — 1150 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 750 over it, 2.88× 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: Parser src/PhpSpreadsheet/Writer/Xls/Parser.php:17— ClassTooLong — 853 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 453 over it, 2.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: Style src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:21— ClassTooLong — 829 significant lines (blank, comment-only and punctuation-only lines excluded), 63 methods. The bar is 400 significant lines; this is 429 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Html src/PhpSpreadsheet/Reader/Html.php:33— ClassTooLong — 769 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 400 significant lines; this is 369 over it, 1.92× 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: ReferenceHelper src/PhpSpreadsheet/ReferenceHelper.php:15— ClassTooLong — 747 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 400 significant lines; this is 347 over it, 1.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Spreadsheet src/PhpSpreadsheet/Spreadsheet.php:19— ClassTooLong — 697 significant lines (blank, comment-only and punctuation-only lines excluded), 119 methods. The bar is 400 significant lines; this is 297 over it, 1.74× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AutoFilter src/PhpSpreadsheet/Worksheet/AutoFilter.php:21— ClassTooLong — 557 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 400 significant lines; this is 157 over it, 1.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: Properties src/PhpSpreadsheet/Chart/Properties.php:11— ClassTooLong — 544 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 400 significant lines; this is 144 over it, 1.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AgileEncryption src/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php:13— ClassTooLong — 518 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 118 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: JpGraphRendererBase src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:27— ClassTooLong — 515 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 115 over it, 1.29× 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: Cell src/PhpSpreadsheet/Cell/Cell.php:23— ClassTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded), 63 methods. The bar is 400 significant lines; this is 111 over it, 1.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Xlsx src/PhpSpreadsheet/Writer/Xlsx.php:41— ClassTooLong — 477 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 77 over it, 1.19× 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: Xls src/PhpSpreadsheet/Writer/Xls.php:30— ClassTooLong — 472 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 72 over it, 1.18× 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: ConvertUOM src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php:9— ClassTooLong — 466 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. The bar is 400 significant lines; this is 66 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Xml src/PhpSpreadsheet/Reader/Xml.php:32— ClassTooLong — 450 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 50 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.
FileTooLong: Reader/Xls.php src/PhpSpreadsheet/Reader/Xls.php— FileTooLong — 2206 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Xls (65-4922). The bar is 500 significant lines; this is 1706 over it, 4.41× 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: Calculation/FunctionArray.php src/PhpSpreadsheet/Calculation/FunctionArray.php— FileTooLong — 2142 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: FunctionArray (5-2685). The bar is 500 significant lines; this is 1642 over it, 4.28× 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: Reader/Xlsx.php src/PhpSpreadsheet/Reader/Xlsx.php— FileTooLong — 1895 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Xlsx (54-3088). The bar is 500 significant lines; this is 1395 over it, 3.79× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Worksheet/Worksheet.php src/PhpSpreadsheet/Worksheet/Worksheet.php— FileTooLong — 1683 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Worksheet (40-4337). The bar is 500 significant lines; this is 1183 over it, 3.37× 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: Calculation/Calculation.php src/PhpSpreadsheet/Calculation/Calculation.php— FileTooLong — 1668 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Calculation (29-3078). The bar is 500 significant lines; this is 1168 over it, 3.34× 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: Xls/Worksheet.php src/PhpSpreadsheet/Writer/Xls/Worksheet.php— FileTooLong — 1543 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Worksheet (29-3261). The bar is 500 significant lines; this is 1043 over it, 3.09× 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: Xlsx/Chart.php src/PhpSpreadsheet/Writer/Xlsx/Chart.php— FileTooLong — 1325 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Chart (23-1989). The bar is 500 significant lines; this is 825 over it, 2.65× 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: Writer/Html.php src/PhpSpreadsheet/Writer/Html.php— FileTooLong — 1251 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Html (39-2419). The bar is 500 significant lines; this is 751 over it, 2.50× 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: Reader/Ods.php src/PhpSpreadsheet/Reader/Ods.php— FileTooLong — 1214 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Ods (40-1926). The bar is 500 significant lines; this is 714 over it, 2.43× 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: Xlsx/Chart.php src/PhpSpreadsheet/Reader/Xlsx/Chart.php— FileTooLong — 1174 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Chart (24-1658). The bar is 500 significant lines; this is 674 over it, 2.35× 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: Xlsx/Worksheet.php src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php— FileTooLong — 1174 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Worksheet (28-2010). The bar is 500 significant lines; this is 674 over it, 2.35× 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: Xls/Parser.php src/PhpSpreadsheet/Writer/Xls/Parser.php— FileTooLong — 862 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Parser (17-1659). The bar is 500 significant lines; this is 362 over it, 1.72× 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: Cell/Style.php src/PhpSpreadsheet/Writer/Ods/Cell/Style.php— FileTooLong — 846 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Style (21-1168). The bar is 500 significant lines; this is 346 over it, 1.69× 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: Reader/Html.php src/PhpSpreadsheet/Reader/Html.php— FileTooLong — 798 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: Html (33-1401). The bar is 500 significant lines; this is 298 over it, 1.60× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: PhpSpreadsheet/ReferenceHelper.php src/PhpSpreadsheet/ReferenceHelper.php— FileTooLong — 758 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: ReferenceHelper (15-1411). The bar is 500 significant lines; this is 258 over it, 1.52× 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: PhpSpreadsheet/Spreadsheet.php src/PhpSpreadsheet/Spreadsheet.php— FileTooLong — 712 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Spreadsheet (19-1964). The bar is 500 significant lines; this is 212 over it, 1.42× 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: Worksheet/AutoFilter.php src/PhpSpreadsheet/Worksheet/AutoFilter.php— FileTooLong — 574 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: AutoFilter (21-1090). The bar is 500 significant lines; this is 74 over it, 1.15× 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: Chart/Properties.php src/PhpSpreadsheet/Chart/Properties.php— FileTooLong — 546 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: Properties (11-935). The bar is 500 significant lines; this is 46 over it, 1.09× 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: Renderer/JpGraphRendererBase.php src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php— FileTooLong — 535 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: JpGraphRendererBase (27-886). 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.
FileTooLong: Cell/Cell.php src/PhpSpreadsheet/Cell/Cell.php— FileTooLong — 530 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: Cell (23-1189). The bar is 500 significant lines; this is 30 over it, 1.06× 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: Xlsx/AgileEncryption.php src/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php— FileTooLong — 526 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: AgileEncryption (13-842). The bar is 500 significant lines; this is 26 over it, 1.05× 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: Writer/Xlsx.php src/PhpSpreadsheet/Writer/Xlsx.php— FileTooLong — 514 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: Xlsx (41-1156). The bar is 500 significant lines; this is 14 over it, 1.03× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
Duplicated block (8 lines × 2) src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php:103— src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php:103-110 | src/PhpSpreadsheet/Calculation/Engineering/ConvertOctal.php:103-110 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php:103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic.php:122— src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic.php:122-129 | src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Payments.php:33-40 — 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/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic.php:122` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php:64— src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php:64-71 | src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php:125-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php:30— src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php:30-37 | src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php:29-36 — 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/PhpSpreadsheet/Calculation/LookupRef/HLookup.php:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php:38` calls `convertLiteralArray` and `src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php:37` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) src/PhpSpreadsheet/Calculation/LookupRef/Helpers.php:64— src/PhpSpreadsheet/Calculation/LookupRef/Helpers.php:64-71 | src/PhpSpreadsheet/Calculation/LookupRef/Offset.php:114-121 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:171— src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:171-178 | src/PhpSpreadsheet/Calculation/MathTrig/Floor.php:211-218 — before extracting anything, compare `src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php` and `src/PhpSpreadsheet/Calculation/MathTrig/Floor.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:171` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php:30— src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php:30-37 | src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php:71-78 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/PhpSpreadsheet/Calculation/Statistical/Averages.php:39— src/PhpSpreadsheet/Calculation/Statistical/Averages.php:39-46 | src/PhpSpreadsheet/Calculation/Statistical/Averages.php:80-87 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Statistical/Averages.php:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:41— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:41-48 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:94-101 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:41` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:102` calls `validateProbability` and `src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:49` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) src/PhpSpreadsheet/Reader/Csv.php:252— src/PhpSpreadsheet/Reader/Csv.php:252-259 | src/PhpSpreadsheet/Reader/Slk.php:137-144 — 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 (8 lines × 2) src/PhpSpreadsheet/Reader/Ods/DefinedNames.php:22— src/PhpSpreadsheet/Reader/Ods/DefinedNames.php:22-29 | src/PhpSpreadsheet/Reader/Ods/DefinedNames.php:41-48 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Ods/DefinedNames.php:22` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Style/Border.php:191— src/PhpSpreadsheet/Style/Border.php:191-198 | src/PhpSpreadsheet/Style/Font.php:732-739 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) src/PhpSpreadsheet/Style/NumberFormat.php:351— src/PhpSpreadsheet/Style/NumberFormat.php:351-358 | src/PhpSpreadsheet/Style/NumberFormat.php:371-378 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Style/NumberFormat.php:371` it does not close everything it opens, so those 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/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php:177— src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php:177-184 | src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php:185-192 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php:177` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/PhpSpreadsheet/Worksheet/AutoFilter.php:135— src/PhpSpreadsheet/Worksheet/AutoFilter.php:135-142 | src/PhpSpreadsheet/Worksheet/Table.php:304-311 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PhpSpreadsheet/Worksheet/Table.php:300` calls `setRange` and `src/PhpSpreadsheet/Worksheet/AutoFilter.php:132` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1063— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1063-1070 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1093-1100 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xls/Worksheet.php:701— src/PhpSpreadsheet/Writer/Xls/Worksheet.php:701-708 | src/PhpSpreadsheet/Writer/Xls/Worksheet.php:729-736 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xls/Worksheet.php:2953— src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2953-2960 | src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2968-2976 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:711— src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:711-718 | src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:721-728 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Database/DMax.php:36— src/PhpSpreadsheet/Calculation/Database/DMax.php:36-43 | src/PhpSpreadsheet/Calculation/Database/DMin.php:36-43 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) samples/Basic5/55_DefinedStyles.php:98— samples/Basic5/55_DefinedStyles.php:98-105 | samples/Basic5/55_DefinedStyles.php:113-120 — both copies are in the same file, so extract the 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 (10 lines × 2) src/PhpSpreadsheet/Calculation/DateTimeExcel/Time.php:89— src/PhpSpreadsheet/Calculation/DateTimeExcel/Time.php:89-98 | src/PhpSpreadsheet/Calculation/DateTimeExcel/Time.php:103-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/PhpSpreadsheet/Calculation/Engineering/BitWise.php:139— src/PhpSpreadsheet/Calculation/Engineering/BitWise.php:139-148 | src/PhpSpreadsheet/Calculation/Engineering/BitWise.php:174-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic.php:39— src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic.php:39-48 | src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic.php:78-87 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic.php:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php:73— src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php:73-82 | src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php:133-142 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.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. 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/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php:72` calls `validateFrequency` and `src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php:132` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) src/PhpSpreadsheet/Calculation/FormulaParser.php:521— src/PhpSpreadsheet/Calculation/FormulaParser.php:521-530 | src/PhpSpreadsheet/Calculation/FormulaParser.php:542-551 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/FormulaParser.php:521` 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/PhpSpreadsheet/Calculation/FormulaParser.php:531` calls `setTokenType` and `src/PhpSpreadsheet/Calculation/FormulaParser.php:552` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) src/PhpSpreadsheet/Calculation/Information/Value.php:81— src/PhpSpreadsheet/Calculation/Information/Value.php:81-90 | src/PhpSpreadsheet/Calculation/Information/Value.php:106-115 — both copies are in the same file, so extract the 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 (10 lines × 2) src/PhpSpreadsheet/Calculation/MathTrig/Factorial.php:74— src/PhpSpreadsheet/Calculation/MathTrig/Factorial.php:74-83 | src/PhpSpreadsheet/Calculation/MathTrig/Sqrt.php:51-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) src/PhpSpreadsheet/Calculation/Statistical/Permutations.php:35— src/PhpSpreadsheet/Calculation/Statistical/Permutations.php:35-44 | src/PhpSpreadsheet/Calculation/Statistical/Permutations.php:81-90 — both copies are in the same file, so extract the 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 (10 lines × 2) src/PhpSpreadsheet/Calculation/TextData/Extract.php:29— src/PhpSpreadsheet/Calculation/TextData/Extract.php:29-38 | src/PhpSpreadsheet/Calculation/TextData/Extract.php:88-97 — both copies are in the same file, so extract the 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 (10 lines × 2) src/PhpSpreadsheet/Calculation/TextData/Format.php:121— src/PhpSpreadsheet/Calculation/TextData/Format.php:121-130 | src/PhpSpreadsheet/Calculation/TextData/Text.php:56-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) src/PhpSpreadsheet/Reader/Xls.php:2728— src/PhpSpreadsheet/Reader/Xls.php:2728-2737 | src/PhpSpreadsheet/Reader/Xls.php:2773-2782 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xls.php:2728` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Reader/Xlsx.php:1548— src/PhpSpreadsheet/Reader/Xlsx.php:1548-1557 | src/PhpSpreadsheet/Reader/Xlsx.php:1646-1655 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xlsx.php:1548` it does not close everything it opens, so those 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/PhpSpreadsheet/Reader/Xlsx.php:1656` calls `isset`, `children`, `setSrcRect` and `src/PhpSpreadsheet/Reader/Xlsx.php:1558` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) src/PhpSpreadsheet/Reader/Xlsx/Styles.php:389— src/PhpSpreadsheet/Reader/Xlsx/Styles.php:389-398 | src/PhpSpreadsheet/Reader/Xlsx/Styles.php:412-421 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xlsx/Styles.php:389` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/ReferenceHelper.php:1245— src/PhpSpreadsheet/ReferenceHelper.php:1245-1254 | src/PhpSpreadsheet/ReferenceHelper.php:1328-1337 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Worksheet/Table.php:179— src/PhpSpreadsheet/Worksheet/Table.php:179-188 | src/PhpSpreadsheet/Worksheet/Table/Column.php:216-225 — 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/PhpSpreadsheet/Writer/Ods/Cell/Style.php:798— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:798-807 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:837-846 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xls/Parser.php:913— src/PhpSpreadsheet/Writer/Xls/Parser.php:913-922 | src/PhpSpreadsheet/Writer/Xls/Parser.php:958-967 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xlsx/Comments.php:31— src/PhpSpreadsheet/Writer/Xlsx/Comments.php:31-40 | src/PhpSpreadsheet/Writer/Xlsx/Comments.php:107-116 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xlsx/Comments.php:31` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Metadata.php:88— src/PhpSpreadsheet/Writer/Xlsx/Metadata.php:88-97 | src/PhpSpreadsheet/Writer/Xlsx/Metadata.php:110-119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Writer/Xlsx/Metadata.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 (10 lines × 2) src/PhpSpreadsheet/Calculation/LookupRef/Filter.php:41— src/PhpSpreadsheet/Calculation/LookupRef/Filter.php:41-50 | src/PhpSpreadsheet/Calculation/LookupRef/Sort.php:152-161 — 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.
Hotspot: src/PhpSpreadsheet/Reader/Xlsx.php src/PhpSpreadsheet/Reader/Xlsx.php:560— src/PhpSpreadsheet/Reader/Xlsx.php changed 10 times in last 90 days, max cyclomatic complexity 314 in Xlsx.loadSpreadsheetFromFile at line 560. 1 of those changes was a fix/bug commit, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Reader/Xlsx.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Calculation/Calculation.php src/PhpSpreadsheet/Calculation/Calculation.php:1724— src/PhpSpreadsheet/Calculation/Calculation.php changed 7 times in last 90 days, max cyclomatic complexity 203 in Calculation.processTokenStack at line 1724. 1 of those changes was a fix/bug commit, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Calculation/Calculation.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Reader/Ods.php src/PhpSpreadsheet/Reader/Ods.php:813— src/PhpSpreadsheet/Reader/Ods.php changed 7 times in last 90 days, max cyclomatic complexity 91 in Ods.processTableRow at line 813. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Reader/Ods.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Writer/Xls/Worksheet.php src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2806— src/PhpSpreadsheet/Writer/Xls/Worksheet.php changed 4 times in last 90 days, max cyclomatic complexity 86 in Worksheet.writeCFRule at line 2806. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Writer/Xls/Worksheet.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Reader/Xml.php src/PhpSpreadsheet/Reader/Xml.php:287— src/PhpSpreadsheet/Reader/Xml.php changed 3 times in last 90 days, max cyclomatic complexity 109 in Xml.loadIntoExisting at line 287. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Reader/Xml.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Writer/Xlsx.php src/PhpSpreadsheet/Writer/Xlsx.php:328— src/PhpSpreadsheet/Writer/Xlsx.php changed 6 times in last 90 days, max cyclomatic complexity 51 in Xlsx.save at line 328. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Writer/Xlsx.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php src/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php:106— src/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php changed 7 times in last 90 days, max cyclomatic complexity 40 in AgileEncryption.parse at line 106. 2 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:277— src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php changed 6 times in last 90 days, max cyclomatic complexity 38 in Worksheet.writeSheetViews at line 277. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Worksheet/Worksheet.php src/PhpSpreadsheet/Worksheet/Worksheet.php:3355— src/PhpSpreadsheet/Worksheet/Worksheet.php changed 8 times in last 90 days, max cyclomatic complexity 24 in Worksheet.rangeToArrayYieldRows at line 3355. 1 of those changes was a fix/bug commit, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Worksheet/Worksheet.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Reader/Xls.php src/PhpSpreadsheet/Reader/Xls.php:4381— src/PhpSpreadsheet/Reader/Xls.php changed 2 times in last 90 days, max cyclomatic complexity 87 in Xls.getNextToken at line 4381. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Reader/Xls.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Writer/Ods/Content.php src/PhpSpreadsheet/Writer/Ods/Content.php:227— src/PhpSpreadsheet/Writer/Ods/Content.php changed 4 times in last 90 days, max cyclomatic complexity 31 in Content.writeCells at line 227. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Writer/Ods/Content.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Writer/Xls/Parser.php src/PhpSpreadsheet/Writer/Xls/Parser.php:1038— src/PhpSpreadsheet/Writer/Xls/Parser.php changed 2 times in last 90 days, max cyclomatic complexity 61 in Parser.match at line 1038. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Writer/Xls/Parser.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Worksheet/AutoFilter.php src/PhpSpreadsheet/Worksheet/AutoFilter.php:789— src/PhpSpreadsheet/Worksheet/AutoFilter.php changed 2 times in last 90 days, max cyclomatic complexity 50 in AutoFilter.showHideRows at line 789. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Worksheet/AutoFilter.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php:49— src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php changed 3 times in last 90 days, max cyclomatic complexity 20 in ChainedBlockStream.stream_open at line 49. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Writer/Xls/Workbook.php src/PhpSpreadsheet/Writer/Xls/Workbook.php:551— src/PhpSpreadsheet/Writer/Xls/Workbook.php changed 2 times in last 90 days, max cyclomatic complexity 22 in Workbook.writeAllDefinedNamesBiff8 at line 551. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Writer/Xls/Workbook.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Writer/Xls.php src/PhpSpreadsheet/Writer/Xls.php:107— src/PhpSpreadsheet/Writer/Xls.php changed 2 times in last 90 days, max cyclomatic complexity 19 in Xls.save at line 107. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Writer/Xls.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Writer/Xlsx/Rels.php src/PhpSpreadsheet/Writer/Xlsx/Rels.php:240— src/PhpSpreadsheet/Writer/Xlsx/Rels.php changed 2 times in last 90 days, max cyclomatic complexity 17 in Rels.writeWorksheetRelationships at line 240. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Writer/Xlsx/Rels.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Shared/StringHelper.php src/PhpSpreadsheet/Shared/StringHelper.php:279— src/PhpSpreadsheet/Shared/StringHelper.php changed 2 times in last 90 days, max cyclomatic complexity 15 in StringHelper.getIsIconvEnabled at line 279. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Shared/StringHelper.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/PhpSpreadsheet/Cell/Coordinate.php src/PhpSpreadsheet/Cell/Coordinate.php:342— src/PhpSpreadsheet/Cell/Coordinate.php changed 2 times in last 90 days, max cyclomatic complexity 15 in Coordinate.coordinateIsInsideRange at line 342. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-25 14:47:56 +00:00' --until='2026-09-23 14:47:56 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Cell/Coordinate.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Duplicated block (7 lines × 2) src/PhpSpreadsheet/Calculation/Calculation.php:1439— src/PhpSpreadsheet/Calculation/Calculation.php:1439-1445 | src/PhpSpreadsheet/Calculation/Calculation.php:1454-1460 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Calculation.php:1928— src/PhpSpreadsheet/Calculation/Calculation.php:1928-1934 | src/PhpSpreadsheet/Calculation/Calculation.php:1940-1946 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Calculation.php:1928` 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 (7 lines × 2) src/PhpSpreadsheet/Calculation/Calculation.php:2488— src/PhpSpreadsheet/Calculation/Calculation.php:2488-2494 | src/PhpSpreadsheet/Calculation/Calculation.php:2497-2503 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php:62— src/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php:62-68 | src/PhpSpreadsheet/Calculation/MathTrig/Random.php:72-78 — 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/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php:62` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Calculation/MathTrig/Random.php:81` calls `VALUE` and `src/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php:69` 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/PhpSpreadsheet/Reader/Xlsx.php:1529— src/PhpSpreadsheet/Reader/Xlsx.php:1529-1535 | src/PhpSpreadsheet/Reader/Xlsx.php:2823-2829 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xlsx.php:1529` 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/PhpSpreadsheet/Reader/Xlsx/Chart.php:212— src/PhpSpreadsheet/Reader/Xlsx/Chart.php:212-218 | src/PhpSpreadsheet/Reader/Xlsx/Chart.php:285-291 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xlsx/Chart.php:212` 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/PhpSpreadsheet/Spreadsheet.php:1736— src/PhpSpreadsheet/Spreadsheet.php:1736-1742 | src/PhpSpreadsheet/Spreadsheet.php:1744-1750 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Spreadsheet.php:1736` 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/PhpSpreadsheet/Writer/Ods/Cell/Style.php:558— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:558-564 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:571-577 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:578` calls `startElement`, `text`, `endElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:565` 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/PhpSpreadsheet/Writer/Ods/Cell/Style.php:575— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:575-581 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1153-1159 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Ods/Cell/Style.php:663— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:663-669 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:675-681 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1067— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1067-1073 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1122-1128 — both copies are in the same file, so extract the 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1065` calls `WriteElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1120` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1119— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1119-1125 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1147-1153 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Ods/Content.php:92— src/PhpSpreadsheet/Writer/Ods/Content.php:92-98 | src/PhpSpreadsheet/Writer/Ods/Styles.php:51-57 — before extracting anything, compare `src/PhpSpreadsheet/Writer/Ods/Content.php` and `src/PhpSpreadsheet/Writer/Ods/Styles.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Writer/Ods/Content.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. 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/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:91— src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:91-97 | src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:305-311 — both copies are in the same file, so extract the 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 (7 lines × 2) src/PhpSpreadsheet/Reader/XlsBase.php:354— src/PhpSpreadsheet/Reader/XlsBase.php:354-360 | src/PhpSpreadsheet/Shared/OLE.php:567-574 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) src/PhpSpreadsheet/Calculation/Calculation.php:2145— src/PhpSpreadsheet/Calculation/Calculation.php:2145-2150 | src/PhpSpreadsheet/Calculation/Calculation.php:2177-2182 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Calculation.php:2145` it does not close everything it opens, so those 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/PhpSpreadsheet/Calculation/Calculation.php:2579— src/PhpSpreadsheet/Calculation/Calculation.php:2579-2584 | src/PhpSpreadsheet/Calculation/Calculation.php:2587-2592 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Calculation.php:2579` 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/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php:86— src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php:86-91 | src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php:99-104 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/PhpSpreadsheet/Calculation/TextData/Extract.php:155— src/PhpSpreadsheet/Calculation/TextData/Extract.php:155-160 | src/PhpSpreadsheet/Calculation/TextData/Extract.php:219-224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/PhpSpreadsheet/Reader/Xlsx.php:1596— src/PhpSpreadsheet/Reader/Xlsx.php:1596-1601 | src/PhpSpreadsheet/Reader/Xlsx.php:1707-1712 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xlsx.php:1596` 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/PhpSpreadsheet/Shared/OLE/PPS/Root.php:176— src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:176-181 | src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:354-359 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Shared/OLE/PPS/Root.php:176` 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/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php:281— src/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php:281-286 | src/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php:335-340 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php:288— src/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php:288-293 | src/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php:359-364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1871— src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1871-1876 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1879-1884 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xlsx/Chart.php:1871` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:198— src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:198-203 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:219-224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:322— src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:322-327 | src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:341-346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/PhpSpreadsheet/Calculation/Financial/FinancialValidations.php:115— src/PhpSpreadsheet/Calculation/Financial/FinancialValidations.php:115-120 | src/PhpSpreadsheet/Calculation/Financial/Securities/SecurityValidations.php:25-30 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php:86— src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php:86-91 | src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php:58-63 — before extracting anything, compare `src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php` and `src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) src/PhpSpreadsheet/Calculation/Engineering/BesselK.php:73— src/PhpSpreadsheet/Calculation/Engineering/BesselK.php:73-78 | src/PhpSpreadsheet/Calculation/Engineering/BesselY.php:72-77 — before extracting anything, compare `src/PhpSpreadsheet/Calculation/Engineering/BesselK.php` and `src/PhpSpreadsheet/Calculation/Engineering/BesselY.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 (6 lines × 2) src/PhpSpreadsheet/Writer/Xls.php:751— src/PhpSpreadsheet/Writer/Xls.php:751-756 | src/PhpSpreadsheet/Writer/Xls.php:891-896 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Calculation.php:1753— src/PhpSpreadsheet/Calculation/Calculation.php:1753-1765 | src/PhpSpreadsheet/Calculation/Calculation.php:1788-1800 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Calculation.php:1753` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php:82— src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php:82-94 | src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php:135-147 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php:82` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php:43— src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php:43-55 | src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php:150-162 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Financial/InterestRate.php:25— src/PhpSpreadsheet/Calculation/Financial/InterestRate.php:25-37 | src/PhpSpreadsheet/Calculation/Financial/InterestRate.php:54-66 — both copies are in the same file, so extract the 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 (13 lines × 2) src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php:46— src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php:46-58 | src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php:45-57 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:50— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:50-62 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:103-115 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:50` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php:82— src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php:82-94 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/NewtonRaphson.php:48-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php:82` 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/PhpSpreadsheet/Calculation/Statistical/Maximum.php:61— src/PhpSpreadsheet/Calculation/Statistical/Maximum.php:61-73 | src/PhpSpreadsheet/Calculation/Statistical/Minimum.php:61-73 — 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/PhpSpreadsheet/Calculation/Statistical/Maximum.php:61` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Reader/Gnumeric.php:135— src/PhpSpreadsheet/Reader/Gnumeric.php:135-147 | src/PhpSpreadsheet/Reader/Gnumeric.php:166-178 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Gnumeric.php:135` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Reader/Xls.php:2196— src/PhpSpreadsheet/Reader/Xls.php:2196-2208 | src/PhpSpreadsheet/Reader/Xls.php:2223-2235 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xls.php:2196` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Reader/Xls/Biff5.php:31— src/PhpSpreadsheet/Reader/Xls/Biff5.php:31-43 | src/PhpSpreadsheet/Reader/Xls/Biff8.php:222-234 — 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 (13 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Comments.php:145— src/PhpSpreadsheet/Writer/Xlsx/Comments.php:145-157 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:480-492 — before extracting anything, compare `src/PhpSpreadsheet/Writer/Xlsx/Comments.php` and `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 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/PhpSpreadsheet/Writer/Xlsx/Comments.php:145` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Writer/Xlsx/Drawing.php:462— src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:462-474 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:539-551 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php:76— src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php:76-84 | src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php:100-108 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Engineering/BesselJ.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 (9 lines × 2) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:243— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:243-251 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:255-263 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:110— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:110-118 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php:38-46 — 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/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:110` 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 (9 lines × 2) src/PhpSpreadsheet/Reader/Xls.php:2313— src/PhpSpreadsheet/Reader/Xls.php:2313-2321 | src/PhpSpreadsheet/Reader/Xls.php:2332-2340 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xls.php:2313` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Reader/XlsBase.php:408— src/PhpSpreadsheet/Reader/XlsBase.php:408-416 | src/PhpSpreadsheet/Shared/OLERead.php:323-331 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) src/PhpSpreadsheet/Reader/Xml.php:348— src/PhpSpreadsheet/Reader/Xml.php:348-356 | src/PhpSpreadsheet/Reader/Xml.php:723-731 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xml.php:348` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/ReferenceHelper.php:1276— src/PhpSpreadsheet/ReferenceHelper.php:1276-1284 | src/PhpSpreadsheet/ReferenceHelper.php:1359-1367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/PhpSpreadsheet/Shared/OLERead.php:213— src/PhpSpreadsheet/Shared/OLERead.php:213-221 | src/PhpSpreadsheet/Shared/OLERead.php:235-243 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:188— src/PhpSpreadsheet/Writer/Xlsx/Chart.php:188-196 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:225-233 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xlsx/Drawing.php:144— src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:144-152 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:465-478 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:153` calls `startElement`, `writeAttribute` and `src/PhpSpreadsheet/Writer/Xlsx/Theme.php:480` 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/PhpSpreadsheet/Writer/Xlsx/Drawing.php:400— src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:400-408 | src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:99-107 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) src/PhpSpreadsheet/Calculation/DateTimeExcel/Week.php:194— src/PhpSpreadsheet/Calculation/DateTimeExcel/Week.php:194-202 | src/PhpSpreadsheet/Calculation/Financial/FinancialValidations.php:71-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. 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 (12 lines × 2) src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php:39— src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php:39-50 | src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php:83-94 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:67— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:67-78 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Weibull.php:38-49 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The 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/PhpSpreadsheet/Calculation/Statistical/Maximum.php:23— src/PhpSpreadsheet/Calculation/Statistical/Maximum.php:23-34 | src/PhpSpreadsheet/Calculation/Statistical/Minimum.php:23-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Calculation/Statistical/Maximum.php:23` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Calculation/Statistical/Trends.php:222— src/PhpSpreadsheet/Calculation/Statistical/Trends.php:222-233 | src/PhpSpreadsheet/Calculation/Statistical/Trends.php:283-294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) src/PhpSpreadsheet/Reader/Xlsx.php:1608— src/PhpSpreadsheet/Reader/Xlsx.php:1608-1619 | src/PhpSpreadsheet/Reader/Xlsx.php:1719-1730 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xlsx.php:1608` 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/PhpSpreadsheet/ReferenceHelper.php:1208— src/PhpSpreadsheet/ReferenceHelper.php:1208-1219 | src/PhpSpreadsheet/ReferenceHelper.php:1292-1303 — both copies are in the same file, so extract the 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/PhpSpreadsheet/ReferenceHelper.php:1208` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Worksheet/Worksheet.php:1730— src/PhpSpreadsheet/Worksheet/Worksheet.php:1730-1741 | src/PhpSpreadsheet/Worksheet/Worksheet.php:1768-1779 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Worksheet/Worksheet.php:1730` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1130— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1130-1141 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1155-1166 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1127` calls `startElement`, `writeAttribute`, `endElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1154` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Comments.php:138— src/PhpSpreadsheet/Writer/Xlsx/Comments.php:138-149 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:401-412 — before extracting anything, compare `src/PhpSpreadsheet/Writer/Xlsx/Comments.php` and `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 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/PhpSpreadsheet/Writer/Xlsx/Drawing.php:399` calls `writeAttribute` and `src/PhpSpreadsheet/Writer/Xlsx/Comments.php:138` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Comments.php:197— src/PhpSpreadsheet/Writer/Xlsx/Comments.php:197-208 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:474-485 — before extracting anything, compare `src/PhpSpreadsheet/Writer/Xlsx/Comments.php` and `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Metadata.php:131— src/PhpSpreadsheet/Writer/Xlsx/Metadata.php:131-142 | src/PhpSpreadsheet/Writer/Xlsx/Metadata.php:147-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/PhpSpreadsheet/Calculation/Calculation.php:902— src/PhpSpreadsheet/Calculation/Calculation.php:902-915 | src/PhpSpreadsheet/Calculation/Calculation.php:917-930 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Calculation/Calculation.php:943` calls `resizeMatricesExtend` and `src/PhpSpreadsheet/Calculation/Calculation.php:917` 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/PhpSpreadsheet/Calculation/Functions.php:229— src/PhpSpreadsheet/Calculation/Functions.php:229-242 | src/PhpSpreadsheet/Calculation/Functions.php:255-268 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (14 lines × 2) src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php:38— src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php:38-51 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php:81-94 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php:38` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php:80` calls `validateBool` and `src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php:37` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php:129— src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php:129-142 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php:166-179 — both copies are in the same file, so extract the 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 (14 lines × 2) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php:33— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php:33-46 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Poisson.php:35-48 — 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/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php:33` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) src/PhpSpreadsheet/Cell/AdvancedValueBinder.php:118— src/PhpSpreadsheet/Cell/AdvancedValueBinder.php:118-131 | src/PhpSpreadsheet/Cell/AdvancedValueBinder.php:139-152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:303— src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:303-316 | src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:382-395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:303` 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/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:318` calls `getPlotArea`, `getPlotGroupByIndex`, `getPlotValuesByIndex` and `src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:397` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:951— src/PhpSpreadsheet/Reader/Xlsx/Chart.php:951-964 | src/PhpSpreadsheet/Reader/Xlsx/Chart.php:991-1004 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xlsx/Chart.php:951` it does not close everything it opens, so those 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/PhpSpreadsheet/Reader/Xlsx/Chart.php:990` calls `foreach` and `src/PhpSpreadsheet/Reader/Xlsx/Chart.php:949` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:976— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:976-989 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1024-1037 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Style.php:126— src/PhpSpreadsheet/Writer/Xlsx/Style.php:126-139 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:443-456 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) src/PhpSpreadsheet/Calculation/Engineering/ConvertOctal.php:49— src/PhpSpreadsheet/Calculation/Engineering/ConvertOctal.php:49-59 | src/PhpSpreadsheet/Calculation/Engineering/ConvertOctal.php:147-157 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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/PhpSpreadsheet/Calculation/Financial/Amortization.php:53— src/PhpSpreadsheet/Calculation/Financial/Amortization.php:53-63 | src/PhpSpreadsheet/Calculation/Financial/Amortization.php:138-148 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Financial/Amortization.php:53` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Calculation/Financial/Depreciation.php:38— src/PhpSpreadsheet/Calculation/Financial/Depreciation.php:38-48 | src/PhpSpreadsheet/Calculation/Financial/Depreciation.php:102-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Calculation/Financial/Depreciation.php:38` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Reader/Html.php:812— src/PhpSpreadsheet/Reader/Html.php:812-822 | src/PhpSpreadsheet/Reader/Html.php:942-952 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Html.php:812` 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/PhpSpreadsheet/Reader/Xls/Escher.php:264— src/PhpSpreadsheet/Reader/Xls/Escher.php:264-274 | src/PhpSpreadsheet/Reader/Xls/Escher.php:305-315 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:220— src/PhpSpreadsheet/Reader/Xlsx/Chart.php:220-230 | src/PhpSpreadsheet/Reader/Xlsx/Chart.php:293-303 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xlsx/Chart.php:220` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) src/PhpSpreadsheet/ReferenceHelper.php:784— src/PhpSpreadsheet/ReferenceHelper.php:784-794 | src/PhpSpreadsheet/ReferenceHelper.php:833-844 — both copies are in the same file, so extract the 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/PhpSpreadsheet/ReferenceHelper.php:784` 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/PhpSpreadsheet/Style/Style.php:564— src/PhpSpreadsheet/Style/Style.php:564-574 | src/PhpSpreadsheet/Style/Style.php:587-597 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Style/Style.php:564` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) src/PhpSpreadsheet/Worksheet/Worksheet.php:928— src/PhpSpreadsheet/Worksheet/Worksheet.php:928-938 | src/PhpSpreadsheet/Worksheet/Worksheet.php:4101-4111 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Worksheet/Worksheet.php:928` 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/PhpSpreadsheet/Worksheet/Worksheet.php:1948— src/PhpSpreadsheet/Worksheet/Worksheet.php:1948-1958 | src/PhpSpreadsheet/Worksheet/Worksheet.php:1973-1983 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Worksheet/Worksheet.php:1948` 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/PhpSpreadsheet/Chart/Properties.php:797— src/PhpSpreadsheet/Chart/Properties.php:797-801 | src/PhpSpreadsheet/Chart/Properties.php:805-809 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Chart/Properties.php:797` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Chart/Properties.php:803— src/PhpSpreadsheet/Chart/Properties.php:803-807 | src/PhpSpreadsheet/Chart/Properties.php:811-815 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Chart/Properties.php:803` 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/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:300— src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:300-304 | src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:591-595 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/PhpSpreadsheet/Reader/Html.php:742— src/PhpSpreadsheet/Reader/Html.php:742-746 | src/PhpSpreadsheet/Reader/Html.php:1028-1032 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xlsx/Chart.php:202— src/PhpSpreadsheet/Reader/Xlsx/Chart.php:202-206 | src/PhpSpreadsheet/Reader/Xlsx/Chart.php:275-279 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xls.php:744— src/PhpSpreadsheet/Writer/Xls.php:744-748 | src/PhpSpreadsheet/Writer/Xls.php:884-888 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xls.php:744` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PhpSpreadsheet/Writer/Xls.php:742` calls `elseif`, `pack` and `src/PhpSpreadsheet/Writer/Xls.php:882` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php:207— src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php:207-211 | src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php:169-173 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) src/PhpSpreadsheet/Calculation/CalculationLocale.php:144— src/PhpSpreadsheet/Calculation/CalculationLocale.php:144-148 | src/PhpSpreadsheet/Calculation/CalculationLocale.php:222-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/PhpSpreadsheet/Calculation/CalculationLocale.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.
Duplicated block (5 lines × 2) src/PhpSpreadsheet/Reader/Ods.php:361— src/PhpSpreadsheet/Reader/Ods.php:361-365 | src/PhpSpreadsheet/Reader/Ods.php:425-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/PhpSpreadsheet/Reader/Ods.php:361` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Writer/Html.php:1444— src/PhpSpreadsheet/Writer/Html.php:1444-1448 | src/PhpSpreadsheet/Writer/Html.php:1491-1495 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Html.php:1444` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
FixmeComment src/PhpSpreadsheet/Reader/Xls.php:3446— //FIXME: set $firstVisibleRow and $firstVisibleColumn — 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.
FixmeComment src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php:602— // FIXME: what if sheetname contains comma? — 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.
FixmeComment src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php:634— // FIXME: what if sheetname contains comma? — 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.
FixmeComment src/PhpSpreadsheet/Reader/Xml/DataValidations.php:158— // FIXME missing FIXME — 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.
FixmeComment src/PhpSpreadsheet/Writer/Xls/Worksheet.php:1254— // FIXME !!! — 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.
FixmeComment src/PhpSpreadsheet/Writer/Xls/Workbook.php:862— //$supbook_index = 0; // FIXME: only using internal SUPBOOK record — 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.
FixmeComment src/PhpSpreadsheet/Writer/Xls/Parser.php:928— // FIXME: maximum possible value for Excel 5 (change this!!!) — 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.
FixmeComment src/PhpSpreadsheet/Writer/Xls/Parser.php:930— // FIXME: this changes for BIFF8 — 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 (6 lines × 5) src/PhpSpreadsheet/Calculation/Statistical/Distributions/F.php:35— src/PhpSpreadsheet/Calculation/Statistical/Distributions/F.php:35-40 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:63-68 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php:72-77 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Normal.php:38-43 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Weibull.php:34-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Calculation/Statistical/Distributions/F.php:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 5) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:711— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:711-716 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:741-746 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:820-825 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:883-888 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:901-906 — 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. 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 × 5) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:726— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:726-731 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:805-810 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:825-830 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:844-849 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1053-1058 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:802` calls `startElement`, `endElement`, `writeElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:725` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 5) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:725— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:725-730 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:804-809 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:818-823 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:843-848 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1052-1057 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:802` calls `startElement`, `endElement`, `writeElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:725` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 5) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:819— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:819-824 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:882-887 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:896-901 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:927-932 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:972-977 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:817` calls `writeElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:881` 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 × 5) src/PhpSpreadsheet/Writer/Ods/Content.php:63— src/PhpSpreadsheet/Writer/Ods/Content.php:63-68 | src/PhpSpreadsheet/Writer/Ods/Meta.php:32-38 | src/PhpSpreadsheet/Writer/Ods/Styles.php:27-32 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:397-402 | src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:70-75 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Writer/Ods/Meta.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Writer/Ods/Content.php:68` calls `writeAttribute` and `src/PhpSpreadsheet/Writer/Ods/Meta.php:38` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 5) src/PhpSpreadsheet/Calculation/Financial/Depreciation.php:248— src/PhpSpreadsheet/Calculation/Financial/Depreciation.php:248-253 | src/PhpSpreadsheet/Calculation/Financial/FinancialValidations.php:47-52 | src/PhpSpreadsheet/Calculation/Financial/FinancialValidations.php:85-90 | src/PhpSpreadsheet/Calculation/Financial/FinancialValidations.php:95-100 | src/PhpSpreadsheet/Calculation/Financial/FinancialValidations.php:105-110 — 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 4) src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php:60— src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php:60-70 | src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php:446-456 | src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php:479-489 | src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php:512-522 — 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/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 4) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:64— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:64-74 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php:73-83 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Normal.php:39-49 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Weibull.php:35-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 4) src/PhpSpreadsheet/Writer/Ods/Formula.php:114— src/PhpSpreadsheet/Writer/Ods/Formula.php:114-124 | src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php:98-108 | src/PhpSpreadsheet/Writer/Xls/Workbook.php:513-523 | src/PhpSpreadsheet/Writer/Xlsx/DefinedNames.php:210-220 — 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/PhpSpreadsheet/Writer/Ods/Formula.php:114` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PhpSpreadsheet/Writer/Ods/Formula.php:113` calls `str_replace` and `src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php:96` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 4) src/PhpSpreadsheet/Writer/Xlsx/Comments.php:131— src/PhpSpreadsheet/Writer/Xlsx/Comments.php:131-141 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:391-401 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:293-303 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:317-327 — before extracting anything, compare `src/PhpSpreadsheet/Writer/Xlsx/Comments.php` and `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:401` calls `writeAttribute` and `src/PhpSpreadsheet/Writer/Xlsx/Theme.php:303` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 4) src/PhpSpreadsheet/Writer/Xlsx/Theme.php:261— src/PhpSpreadsheet/Writer/Xlsx/Theme.php:261-271 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:355-365 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:385-395 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:415-425 — 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/PhpSpreadsheet/Writer/Xlsx/Theme.php:349` calls `startElement` and `src/PhpSpreadsheet/Writer/Xlsx/Theme.php:258` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 4) src/PhpSpreadsheet/Calculation/MathTrig/Absolute.php:25— src/PhpSpreadsheet/Calculation/MathTrig/Absolute.php:25-35 | src/PhpSpreadsheet/Calculation/MathTrig/Exp.php:25-35 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosine.php:26-36 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Sine.php:26-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php:50— src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php:50-60 | src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php:107-117 | src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php:183-193 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) src/PhpSpreadsheet/Calculation/Financial/Coupons.php:52— src/PhpSpreadsheet/Calculation/Financial/Coupons.php:52-62 | src/PhpSpreadsheet/Calculation/Financial/Coupons.php:111-121 | src/PhpSpreadsheet/Calculation/Financial/Coupons.php:178-188 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) src/PhpSpreadsheet/Calculation/Financial/Coupons.php:241— src/PhpSpreadsheet/Calculation/Financial/Coupons.php:241-251 | src/PhpSpreadsheet/Calculation/Financial/Coupons.php:291-301 | src/PhpSpreadsheet/Calculation/Financial/Coupons.php:348-358 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:104— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:104-114 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php:119-129 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Normal.php:80-90 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) src/PhpSpreadsheet/Writer/Ods/Formula.php:97— src/PhpSpreadsheet/Writer/Ods/Formula.php:97-107 | src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php:85-95 | src/PhpSpreadsheet/Writer/Xlsx/DefinedNames.php:197-207 — 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 after the matched lines, `src/PhpSpreadsheet/Writer/Ods/Formula.php:113` calls `str_replace` and `src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php:98` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 3) src/PhpSpreadsheet/Writer/Xlsx/Theme.php:264— src/PhpSpreadsheet/Writer/Xlsx/Theme.php:264-274 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:299-309 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:323-333 — 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 (7 lines × 3) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php:32— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php:32-38 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php:32-38 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Poisson.php:34-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.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.
Duplicated block (7 lines × 3) src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php:177— src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php:177-183 | src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php:185-191 | src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php:193-199 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 3) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:589— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:589-595 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:602-608 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:615-621 — 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 (7 lines × 3) src/PhpSpreadsheet/Writer/Ods/Meta.php:36— src/PhpSpreadsheet/Writer/Ods/Meta.php:36-42 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:400-407 | src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:99-106 — 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/PhpSpreadsheet/Writer/Ods/Meta.php:36` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 3) src/PhpSpreadsheet/Writer/Ods/MetaInf.php:40— src/PhpSpreadsheet/Writer/Ods/MetaInf.php:40-46 | src/PhpSpreadsheet/Writer/Xlsx/Comments.php:200-208 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:477-485 — before extracting anything, compare `src/PhpSpreadsheet/Writer/Ods/MetaInf.php` and `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 3) src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Blanks.php:87— src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Blanks.php:87-93 | src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Duplicates.php:66-72 | src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Errors.php:83-89 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The `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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×5
Members sharing a duplicated core (4 members, 50+ identical tokens) src/PhpSpreadsheet/Calculation/Engineering/BesselI.php:40— src/PhpSpreadsheet/Calculation/Engineering/BesselI.php:40-57 | src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php:39-56 | src/PhpSpreadsheet/Calculation/Engineering/BesselK.php:37-54 | src/PhpSpreadsheet/Calculation/Engineering/BesselY.php:36-53 — 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/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php:60— src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php:60-74 | src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php:446-460 | src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php:479-493 | src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php:512-526 — 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/PhpSpreadsheet/Reader/Xls.php:2134— src/PhpSpreadsheet/Reader/Xls.php:2134-2144 | src/PhpSpreadsheet/Reader/Xls.php:2195-2214 | src/PhpSpreadsheet/Reader/Xls.php:2222-2241 | src/PhpSpreadsheet/Reader/Xls.php:3640-3657 — 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/PhpSpreadsheet/Reader/Xls.php:2351— src/PhpSpreadsheet/Reader/Xls.php:2351-2360 | src/PhpSpreadsheet/Reader/Xls.php:2368-2377 | src/PhpSpreadsheet/Reader/Xls.php:2385-2394 | src/PhpSpreadsheet/Reader/Xls.php:2402-2411 — 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/PhpSpreadsheet/Reader/Xls/Escher.php:196— src/PhpSpreadsheet/Reader/Xls/Escher.php:196-251 | src/PhpSpreadsheet/Reader/Xls/Escher.php:262-292 | src/PhpSpreadsheet/Reader/Xls/Escher.php:303-333 | src/PhpSpreadsheet/Reader/Xls/Escher.php:344-352 — 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 (20 lines × 2) src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Cumulative.php:39— src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Cumulative.php:39-58 | src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Cumulative.php:102-121 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Cumulative.php:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:75— src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:75-94 | src/PhpSpreadsheet/Calculation/MathTrig/Floor.php:80-99 — before extracting anything, compare `src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php` and `src/PhpSpreadsheet/Calculation/MathTrig/Floor.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `null` to `$significance =` in one and `mixed $significance =` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (20 lines × 2) src/PhpSpreadsheet/Calculation/TextData/Extract.php:131— src/PhpSpreadsheet/Calculation/TextData/Extract.php:131-150 | src/PhpSpreadsheet/Calculation/TextData/Extract.php:195-214 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/TextData/Extract.php:131` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Reader/Xlsx.php:804— src/PhpSpreadsheet/Reader/Xlsx.php:804-824 | src/PhpSpreadsheet/Reader/Xlsx.php:855-874 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xlsx.php:804` 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 (20 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:792— src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:792-811 | src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:840-859 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:792` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php:54— src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php:54-68 | src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php:113-127 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php:54` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/PhpSpreadsheet/Reader/Ods.php:112— src/PhpSpreadsheet/Reader/Ods.php:112-126 | src/PhpSpreadsheet/Reader/Ods.php:169-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) src/PhpSpreadsheet/Reader/Xls.php:2249— src/PhpSpreadsheet/Reader/Xls.php:2249-2263 | src/PhpSpreadsheet/Reader/Xls.php:2281-2295 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xls.php:2249` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Writer/Xlsx/Theme.php:252— src/PhpSpreadsheet/Writer/Xlsx/Theme.php:252-266 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:463-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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Theme.php:302— src/PhpSpreadsheet/Writer/Xlsx/Theme.php:302-316 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:326-340 — both copies are in the same file, so extract the 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 × 4) src/PhpSpreadsheet/Reader/Xls.php:2134— src/PhpSpreadsheet/Reader/Xls.php:2134-2140 | src/PhpSpreadsheet/Reader/Xls.php:2195-2201 | src/PhpSpreadsheet/Reader/Xls.php:2222-2228 | src/PhpSpreadsheet/Reader/Xls.php:3640-3646 — 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/PhpSpreadsheet/Reader/Xls.php:2134` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Reader/Xls.php:2351— src/PhpSpreadsheet/Reader/Xls.php:2351-2357 | src/PhpSpreadsheet/Reader/Xls.php:2368-2374 | src/PhpSpreadsheet/Reader/Xls.php:2385-2391 | src/PhpSpreadsheet/Reader/Xls.php:2402-2408 — 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/PhpSpreadsheet/Reader/Xls.php:2351` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Reader/Xls.php:2728— src/PhpSpreadsheet/Reader/Xls.php:2728-2734 | src/PhpSpreadsheet/Reader/Xls.php:2773-2779 | src/PhpSpreadsheet/Reader/Xls.php:2927-2933 | src/PhpSpreadsheet/Reader/Xls.php:3153-3159 — 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/PhpSpreadsheet/Reader/Xls.php:2728` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Writer/Ods/Cell/Style.php:880— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:880-886 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:894-900 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:912-918 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:925-931 — 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 after the matched lines, `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:887` calls `writeElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:919` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 4) src/PhpSpreadsheet/Writer/Ods/MetaInf.php:42— src/PhpSpreadsheet/Writer/Ods/MetaInf.php:42-48 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:150-156 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:479-487 | src/PhpSpreadsheet/Writer/Xlsx/RichDataDrawing.php:92-99 — before extracting anything, compare `src/PhpSpreadsheet/Writer/Ods/MetaInf.php` and `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 (25 lines × 2) src/PhpSpreadsheet/Calculation/Financial/TreasuryBill.php:29— src/PhpSpreadsheet/Calculation/Financial/TreasuryBill.php:29-53 | src/PhpSpreadsheet/Calculation/Financial/TreasuryBill.php:74-98 — both copies are in the same file, so extract the 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 (25 lines × 2) src/PhpSpreadsheet/Calculation/Statistical/Variances.php:66— src/PhpSpreadsheet/Calculation/Statistical/Variances.php:66-90 | src/PhpSpreadsheet/Calculation/Statistical/Variances.php:155-179 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Statistical/Variances.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 (25 lines × 2) src/PhpSpreadsheet/Writer/Xls/Escher.php:210— src/PhpSpreadsheet/Writer/Xls/Escher.php:210-234 | src/PhpSpreadsheet/Writer/Xls/Escher.php:237-261 — both copies are in the same file, so extract the 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 (25 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Theme.php:569— src/PhpSpreadsheet/Writer/Xlsx/Theme.php:569-593 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:638-662 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) src/PhpSpreadsheet/Calculation/Calculation.php:945— src/PhpSpreadsheet/Calculation/Calculation.php:945-961 | src/PhpSpreadsheet/Calculation/Calculation.php:963-979 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Calculation.php:943` calls `resizeMatricesExtend` and `src/PhpSpreadsheet/Calculation/Calculation.php:961` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17 lines × 2) src/PhpSpreadsheet/Calculation/Engineering/BesselI.php:41— src/PhpSpreadsheet/Calculation/Engineering/BesselI.php:41-57 | src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php:40-56 — 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/PhpSpreadsheet/Calculation/Engineering/BesselI.php:41` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/PhpSpreadsheet/Calculation/Engineering/BesselK.php:38— src/PhpSpreadsheet/Calculation/Engineering/BesselK.php:38-54 | src/PhpSpreadsheet/Calculation/Engineering/BesselY.php:37-53 — before extracting anything, compare `src/PhpSpreadsheet/Calculation/Engineering/BesselK.php` and `src/PhpSpreadsheet/Calculation/Engineering/BesselY.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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/PhpSpreadsheet/Calculation/Engineering/BesselK.php:38` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/PhpSpreadsheet/Style/ConditionalFormatting/CellMatcher.php:179— src/PhpSpreadsheet/Style/ConditionalFormatting/CellMatcher.php:179-195 | src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/WizardAbstract.php:152-168 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 3) src/PhpSpreadsheet/Calculation/MathTrig/Operations.php:64— src/PhpSpreadsheet/Calculation/MathTrig/Operations.php:64-73 | src/PhpSpreadsheet/Calculation/MathTrig/Round.php:29-38 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Tangent.php:143-152 — 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 (10 lines × 3) src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php:68— src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php:68-77 | src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php:96-105 | src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php:124-133 — 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/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php:68` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Writer/Xlsx/Comments.php:130— src/PhpSpreadsheet/Writer/Xlsx/Comments.php:130-139 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:390-399 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:449-458 — before extracting anything, compare `src/PhpSpreadsheet/Writer/Xlsx/Comments.php` and `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 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 (10 lines × 3) src/PhpSpreadsheet/Writer/Xlsx/Style.php:127— src/PhpSpreadsheet/Writer/Xlsx/Style.php:127-136 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:444-453 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:458-467 — 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 (19 lines × 2) src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php:107— src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php:107-125 | src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php:212-230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) src/PhpSpreadsheet/Calculation/MathTrig/Round.php:57— src/PhpSpreadsheet/Calculation/MathTrig/Round.php:57-75 | src/PhpSpreadsheet/Calculation/MathTrig/Round.php:103-121 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/MathTrig/Round.php:57` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2017— src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2017-2035 | src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2044-2062 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xls/Worksheet.php:2017` 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/PhpSpreadsheet/Writer/Xls/Worksheet.php:2041` calls `array_slice` and `src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2015` 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 (18 lines × 2) src/PhpSpreadsheet/Calculation/DateTimeExcel/DateParts.php:74— src/PhpSpreadsheet/Calculation/DateTimeExcel/DateParts.php:74-91 | src/PhpSpreadsheet/Calculation/DateTimeExcel/DateParts.php:113-130 — both copies are in the same file, so extract the 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 (18 lines × 2) src/PhpSpreadsheet/Reader/Xlsx.php:2576— src/PhpSpreadsheet/Reader/Xlsx.php:2576-2593 | src/PhpSpreadsheet/Reader/Xlsx.php:2608-2625 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xlsx.php:2576` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Worksheet/Column.php:83— src/PhpSpreadsheet/Worksheet/Column.php:83-100 | src/PhpSpreadsheet/Worksheet/Row.php:83-100 — 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 (16 lines × 2) src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:36— src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:36-51 | src/PhpSpreadsheet/Calculation/MathTrig/Floor.php:41-56 — before extracting anything, compare `src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php` and `src/PhpSpreadsheet/Calculation/MathTrig/Floor.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 first that the copies are not typed on the same thing: the declarations holding them bind `null` to `$significance =` in one and `mixed $significance =` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (16 lines × 2) src/PhpSpreadsheet/Calculation/TextData/Search.php:30— src/PhpSpreadsheet/Calculation/TextData/Search.php:30-45 | src/PhpSpreadsheet/Calculation/TextData/Search.php:72-87 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/TextData/Search.php:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) src/PhpSpreadsheet/Reader/Xlsx.php:1628— src/PhpSpreadsheet/Reader/Xlsx.php:1628-1643 | src/PhpSpreadsheet/Reader/Xlsx.php:1738-1753 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xlsx.php:1628` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PhpSpreadsheet/Reader/Xlsx.php:1625` calls `EMUToPixels`, `getArrayItemIntOrSxml`, `getAttributes` and `src/PhpSpreadsheet/Reader/Xlsx.php:1737` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–10 lines × 2) src/PhpSpreadsheet/Calculation/Calculation.php:2737— src/PhpSpreadsheet/Calculation/Calculation.php:2737-2745 | src/PhpSpreadsheet/Calculation/Calculation.php:2758-2767 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Calculation.php:2737` 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/PhpSpreadsheet/Shared/OLE/PPS/Root.php:158— src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:158-167 | src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:338-346 — both copies are in the same file, so extract the 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–10 lines × 2) src/PhpSpreadsheet/Writer/Ods/MetaInf.php:36— src/PhpSpreadsheet/Writer/Ods/MetaInf.php:36-44 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:456-465 — 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 × 3) src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php:41— src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php:41-45 | src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Payments.php:81-85 | src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php:58-62 — 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 (5 lines × 3) src/PhpSpreadsheet/Reader/Ods/PageSettings.php:55— src/PhpSpreadsheet/Reader/Ods/PageSettings.php:55-59 | src/PhpSpreadsheet/Reader/Ods/PageSettings.php:96-100 | src/PhpSpreadsheet/Reader/Ods/PageSettings.php:108-112 — 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/PhpSpreadsheet/Reader/Ods/PageSettings.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 (5 lines × 3) src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php:102— src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php:102-106 | src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php:74-78 | src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php:92-96 — before extracting anything, compare `src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php` and `src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Change coupling: Dompdf.php ↔ Tcpdf.php src/PhpSpreadsheet/Writer/Pdf/Dompdf.php— `src/PhpSpreadsheet/Writer/Pdf/Dompdf.php` and `src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php` change together 74% of the time (17 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `15fbc9a9` Headers and Footers in Pdf; `580c741c` Improve PDF Support for Page Size and Orientation (#2410); `97a80f38` Improve HTML Writer (#1464) — run `git show` on any of them.
Change coupling: BaseReader.php ↔ IReader.php src/PhpSpreadsheet/Reader/BaseReader.php— `src/PhpSpreadsheet/Reader/BaseReader.php` and `src/PhpSpreadsheet/Reader/IReader.php` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `a9c6cbe1` All Readers - Allow or Forbid Fetching of External Images; `dd56df2b` :wastebasket: Deprecate `IReader::SKIP_EMPTY_CELLS`; `0c2708b1` Xlsx Reader Optionally Ignore Rows With No Cells — run `git show` on any of them.
Duplicated block (31 lines × 2) src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php:42— src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php:42-72 | src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Payments.php:82-112 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (31 lines × 2) src/PhpSpreadsheet/Writer/Xls.php:581— src/PhpSpreadsheet/Writer/Xls.php:581-611 | src/PhpSpreadsheet/Writer/Xls.php:813-843 — both copies are in the same file, so extract the 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 (23 lines × 2) src/PhpSpreadsheet/Calculation/Financial/Dollar.php:55— src/PhpSpreadsheet/Calculation/Financial/Dollar.php:55-77 | src/PhpSpreadsheet/Calculation/Financial/Dollar.php:103-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (23 lines × 2) src/PhpSpreadsheet/ReferenceHelper.php:951— src/PhpSpreadsheet/ReferenceHelper.php:951-973 | src/PhpSpreadsheet/ReferenceHelper.php:990-1012 — both copies are in the same file, so extract the 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/PhpSpreadsheet/ReferenceHelper.php:951` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (21 lines × 2) src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:193— src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:193-213 | src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php:123-143 — before extracting anything, compare `src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php` and `src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 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 (21 lines × 2) src/PhpSpreadsheet/Calculation/Statistical/Variances.php:24— src/PhpSpreadsheet/Calculation/Statistical/Variances.php:24-44 | src/PhpSpreadsheet/Calculation/Statistical/Variances.php:113-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Calculation/Statistical/Variances.php:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 3) src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:187— src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:187-201 | src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php:54-68 | src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php:117-131 — before extracting anything, compare `src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php` and `src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 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/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:187` 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/PhpSpreadsheet/Writer/Xlsx/Style.php:93— src/PhpSpreadsheet/Writer/Xlsx/Style.php:93-107 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:577-591 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:646-660 — 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 (14 lines × 3) src/PhpSpreadsheet/Reader/Xls.php:2477— src/PhpSpreadsheet/Reader/Xls.php:2477-2490 | src/PhpSpreadsheet/Reader/Xls.php:2499-2512 | src/PhpSpreadsheet/Reader/Xls.php:2522-2535 — 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 (14 lines × 3) src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:467— src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:467-480 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:289-302 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:313-326 — 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. 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/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:121— src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:121-134 | src/PhpSpreadsheet/Calculation/MathTrig/Floor.php:142-154 — before extracting anything, compare `src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php` and `src/PhpSpreadsheet/Calculation/MathTrig/Floor.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13–14 lines × 2) src/PhpSpreadsheet/Reader/Xlsx.php:294— src/PhpSpreadsheet/Reader/Xlsx.php:294-307 | src/PhpSpreadsheet/Reader/Xlsx.php:348-360 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xlsx.php:294` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/ReferenceHelper.php:918— src/PhpSpreadsheet/ReferenceHelper.php:918-930 | src/PhpSpreadsheet/ReferenceHelper.php:959-971 | src/PhpSpreadsheet/ReferenceHelper.php:998-1010 — 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/PhpSpreadsheet/ReferenceHelper.php:918` it does not close everything it opens, so those 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/PhpSpreadsheet/ReferenceHelper.php:958` calls `array_map`, `array_column` and `src/PhpSpreadsheet/ReferenceHelper.php:917` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 3) src/PhpSpreadsheet/Writer/Xlsx/Comments.php:132— src/PhpSpreadsheet/Writer/Xlsx/Comments.php:132-144 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:294-306 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:318-330 — 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 (12 lines × 3) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:166— src/PhpSpreadsheet/Writer/Xlsx/Chart.php:166-177 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:676-687 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:896-907 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 3) samples/Reader/11_Reading_a_workbook_in_chunks_using_a_configurable_read_filter_version_1.php:25— samples/Reader/11_Reading_a_workbook_in_chunks_using_a_configurable_read_filter_version_1.php:25-36 | samples/Reader/12_Reading_a_workbook_in_chunks_using_a_configurable_read_filter_version_2.php:25-36 | samples/Reader2/14_Reading_a_large_CSV_file_in_chunks_to_split_across_multiple_worksheets.php:25-36 — 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 `samples/Reader/11_Reading_a_workbook_in_chunks_using_a_configurable_read_filter_version_1.php:25` 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 (10–12 lines × 2) src/PhpSpreadsheet/Calculation/Statistical/Conditional.php:39— src/PhpSpreadsheet/Calculation/Statistical/Conditional.php:39-48 | src/PhpSpreadsheet/Calculation/Statistical/Conditional.php:204-215 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Statistical/Conditional.php:39` 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/PhpSpreadsheet/Writer/Xlsx/Chart.php:1560— src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1560-1571 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1609-1618 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xlsx/Chart.php:1560` it does not close everything it opens, so those exact lines 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–11 lines × 2) src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php:586— src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php:586-594 | src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php:597-607 — both copies are in the same file, so extract the 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php:596` calls `substr` and `src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php:610` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–11 lines × 2) src/PhpSpreadsheet/Writer/Ods/MetaInf.php:40— src/PhpSpreadsheet/Writer/Ods/MetaInf.php:40-48 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:477-487 — before extracting anything, compare `src/PhpSpreadsheet/Writer/Ods/MetaInf.php` and `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 (10 lines × 4) src/PhpSpreadsheet/Calculation/Engineering/BesselI.php:40— src/PhpSpreadsheet/Calculation/Engineering/BesselI.php:40-49 | src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php:39-48 | src/PhpSpreadsheet/Calculation/Engineering/BesselK.php:37-46 | src/PhpSpreadsheet/Calculation/Engineering/BesselY.php:36-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 4) src/PhpSpreadsheet/Writer/Ods/Formula.php:99— src/PhpSpreadsheet/Writer/Ods/Formula.php:99-108 | src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php:87-96 | src/PhpSpreadsheet/Writer/Xls/Workbook.php:502-511 | src/PhpSpreadsheet/Writer/Xlsx/DefinedNames.php:199-208 — 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/PhpSpreadsheet/Writer/Ods/Formula.php:99` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Writer/Ods/Formula.php:113` calls `str_replace` and `src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php:98` 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 lines × 4) src/PhpSpreadsheet/Writer/Xlsx/Comments.php:137— src/PhpSpreadsheet/Writer/Xlsx/Comments.php:137-145 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:358-366 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:388-396 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:418-426 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PhpSpreadsheet/Writer/Xlsx/Theme.php:349` calls `startElement` and `src/PhpSpreadsheet/Writer/Xlsx/Comments.php:134` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 4) src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:100— src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:100-108 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:359-369 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:389-399 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:419-429 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 4) src/PhpSpreadsheet/Writer/Ods/Settings.php:34— src/PhpSpreadsheet/Writer/Ods/Settings.php:34-41 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:265-275 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:300-310 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:324-334 — 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/PhpSpreadsheet/Writer/Ods/Settings.php:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PhpSpreadsheet/Writer/Xlsx/Theme.php:261` calls `startElement` and `src/PhpSpreadsheet/Writer/Xlsx/Theme.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 (8 lines × 4) src/PhpSpreadsheet/Writer/Xlsx/RichDataDrawing.php:112— src/PhpSpreadsheet/Writer/Xlsx/RichDataDrawing.php:112-119 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:264-274 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:299-309 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:323-333 — 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/PhpSpreadsheet/Writer/Xlsx/RichDataDrawing.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. 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 × 11) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:626— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:626-631 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:644-649 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:706-711 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:736-741 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:752-757 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:770-775 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:784-789 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:854-859 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:941-946 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:956-961 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1042-1047 — all 11 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 (6 lines × 11) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:634— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:634-639 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:652-657 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:760-765 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:774-779 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:870-875 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:931-936 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:945-950 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:960-965 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:976-981 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1006-1011 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1024-1029 — all 11 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 after the matched lines, `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:642` calls `formatDateDdmmyyyy` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:982` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 4) src/PhpSpreadsheet/Reader/Xls/Escher.php:198— src/PhpSpreadsheet/Reader/Xls/Escher.php:198-202 | src/PhpSpreadsheet/Reader/Xls/Escher.php:264-268 | src/PhpSpreadsheet/Reader/Xls/Escher.php:305-309 | src/PhpSpreadsheet/Reader/Xls/Escher.php:346-350 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 4) src/PhpSpreadsheet/Calculation/Engineering/BesselI.php:62— src/PhpSpreadsheet/Calculation/Engineering/BesselI.php:62-66 | src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php:61-65 | src/PhpSpreadsheet/Calculation/Engineering/BesselK.php:59-63 | src/PhpSpreadsheet/Calculation/Engineering/BesselY.php:58-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 all 4 call sites, so a change lands once.
Xlsx.loadSpreadsheetFromFile (cyclomatic 314) src/PhpSpreadsheet/Reader/Xlsx.php:560— Xlsx.loadSpreadsheetFromFile has cyclomatic complexity 314 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Calculation.processTokenStack (cyclomatic 203) src/PhpSpreadsheet/Calculation/Calculation.php:1724— Calculation.processTokenStack has cyclomatic complexity 203 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Calculation.internalParseFormula (cyclomatic 145) src/PhpSpreadsheet/Calculation/Calculation.php:1186— Calculation.internalParseFormula has cyclomatic complexity 145 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LoadSpreadsheet.loadSpreadsheetFromFile2 (cyclomatic 140) src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php:24— LoadSpreadsheet.loadSpreadsheetFromFile2 has cyclomatic complexity 140 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Xml.loadIntoExisting (cyclomatic 109) src/PhpSpreadsheet/Reader/Xml.php:287— Xml.loadIntoExisting has cyclomatic complexity 109 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Chart.readChart (cyclomatic 104) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:78— Chart.readChart has cyclomatic complexity 104 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FormulaParser.parseToTokens (cyclomatic 96) src/PhpSpreadsheet/Calculation/FormulaParser.php:123— FormulaParser.parseToTokens has cyclomatic complexity 96 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
Ods.processTableRow (cyclomatic 91) src/PhpSpreadsheet/Reader/Ods.php:813— Ods.processTableRow has cyclomatic complexity 91 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Chart.writePlotGroup (cyclomatic 88) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1150— Chart.writePlotGroup 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.
Xls.getNextToken (cyclomatic 87) src/PhpSpreadsheet/Reader/Xls.php:4381— Xls.getNextToken has cyclomatic complexity 87 (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.
Worksheet.writeCFRule (cyclomatic 86) src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2806— Worksheet.writeCFRule has cyclomatic complexity 86 (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.
Chart.chartDataSeries (cyclomatic 75) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:599— Chart.chartDataSeries has cyclomatic complexity 75 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Ods.loadIntoExisting (cyclomatic 70) src/PhpSpreadsheet/Reader/Ods.php:326— Ods.loadIntoExisting has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Style.applyFromArray (cyclomatic 62) src/PhpSpreadsheet/Style/Style.php:200— Style.applyFromArray 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.
Parser.match (cyclomatic 61) src/PhpSpreadsheet/Writer/Xls/Parser.php:1038— Parser.match has cyclomatic complexity 61 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Html.generateRowWriteCell (cyclomatic 59) src/PhpSpreadsheet/Writer/Html.php:1713— Html.generateRowWriteCell 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.
Xls.createFormulaFromTokens (cyclomatic 57) src/PhpSpreadsheet/Reader/Xls.php:4198— Xls.createFormulaFromTokens has cyclomatic complexity 57 (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.
Cell.getCalculatedValue (cyclomatic 56) src/PhpSpreadsheet/Cell/Cell.php:449— Cell.getCalculatedValue 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.
ContentTypes.writeContentTypes (cyclomatic 56) src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:23— ContentTypes.writeContentTypes 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.
Xlsx.save (cyclomatic 51) src/PhpSpreadsheet/Writer/Xlsx.php:328— Xlsx.save 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.
AutoFilter.showHideRows (cyclomatic 50) src/PhpSpreadsheet/Worksheet/AutoFilter.php:789— AutoFilter.showHideRows has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Worksheet.close (cyclomatic 50) src/PhpSpreadsheet/Writer/Xls/Worksheet.php:201— Worksheet.close has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Xlsx.loadSheetData (cyclomatic 48) src/PhpSpreadsheet/Reader/Xlsx.php:2062— Xlsx.loadSheetData 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.
Chart.writePlotArea (cyclomatic 47) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:321— Chart.writePlotArea 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.
Html.applyInlineStyle (cyclomatic 43) src/PhpSpreadsheet/Reader/Html.php:1019— Html.applyInlineStyle has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AgileEncryption.parse (cyclomatic 40) src/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php:106— AgileEncryption.parse has cyclomatic complexity 40 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Worksheet.writeSheetViews (cyclomatic 38) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:277— Worksheet.writeSheetViews 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.
Chart.parseRichText (cyclomatic 37) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1024— Chart.parseRichText 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.
ReferenceHelper.insertNewBefore (cyclomatic 35) src/PhpSpreadsheet/ReferenceHelper.php:431— ReferenceHelper.insertNewBefore 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.
CurrencyBase.format (cyclomatic 35) src/PhpSpreadsheet/Style/NumberFormat/Wizard/CurrencyBase.php:125— CurrencyBase.format 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.
Worksheet.writeSheetData (cyclomatic 35) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:1385— Worksheet.writeSheetData 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.
Calculation.executeNumericBinaryOperation (cyclomatic 34) src/PhpSpreadsheet/Calculation/Calculation.php:2545— Calculation.executeNumericBinaryOperation 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.
Chart.writeValueAxis (cyclomatic 34) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:827— Chart.writeValueAxis 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.
AutoFilter.filterTestInCustomDataSet (cyclomatic 32) src/PhpSpreadsheet/Worksheet/AutoFilter.php:378— AutoFilter.filterTestInCustomDataSet has cyclomatic complexity 32 (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.
Chart.writeCategoryAxis (cyclomatic 32) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:602— Chart.writeCategoryAxis has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Xls.readXf (cyclomatic 31) src/PhpSpreadsheet/Reader/Xls.php:1179— Xls.readXf 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.
Content.writeCells (cyclomatic 31) src/PhpSpreadsheet/Writer/Ods/Content.php:227— Content.writeCells 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.
Xlsx.parseRichText (cyclomatic 29) src/PhpSpreadsheet/Reader/Xlsx.php:2254— Xlsx.parseRichText 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.
Chart.setAxisProperties (cyclomatic 29) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1561— Chart.setAxisProperties has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DefaultValueBinder.dataTypeForValue (cyclomatic 28) src/PhpSpreadsheet/Cell/DefaultValueBinder.php:56— DefaultValueBinder.dataTypeForValue 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.
ReferenceHelper.updateFormulaReferences (cyclomatic 28) src/PhpSpreadsheet/ReferenceHelper.php:743— ReferenceHelper.updateFormulaReferences 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.
Xls.readDocumentSummaryInformation (cyclomatic 27) src/PhpSpreadsheet/Reader/Xls.php:546— Xls.readDocumentSummaryInformation has cyclomatic complexity 27 (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. This is NOT this file's highest cyclomatic complexity: Xls.readSummaryInformation (cyclomatic 28) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Xls.readXfExt (cyclomatic 27) src/PhpSpreadsheet/Reader/Xls.php:1431— Xls.readXfExt 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. This is NOT this file's highest cyclomatic complexity: Xls.readSummaryInformation (cyclomatic 28) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Escher.close (cyclomatic 27) src/PhpSpreadsheet/Writer/Xls/Escher.php:52— Escher.close 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.
Style.writeCellStyleXf (cyclomatic 27) src/PhpSpreadsheet/Writer/Xlsx/Style.php:433— Style.writeCellStyleXf 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.
Cell.setValueExplicit (cyclomatic 26) src/PhpSpreadsheet/Cell/Cell.php:292— Cell.setValueExplicit 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.
Drawing.setPath (cyclomatic 26) src/PhpSpreadsheet/Worksheet/Drawing.php:100— Drawing.setPath 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.
Formatter.toFormattedString (cyclomatic 25) src/PhpSpreadsheet/Style/NumberFormat/Formatter.php:126— Formatter.toFormattedString 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.
Calculation.calculateCellValue (cyclomatic 24) src/PhpSpreadsheet/Calculation/Calculation.php:525— Calculation.calculateCellValue 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.
DataValidations.loadDataValidations (cyclomatic 24) src/PhpSpreadsheet/Reader/Xml/DataValidations.php:39— DataValidations.loadDataValidations has cyclomatic complexity 24 (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.
Worksheet.rangeToArrayYieldRows (cyclomatic 24) src/PhpSpreadsheet/Worksheet/Worksheet.php:3355— Worksheet.rangeToArrayYieldRows 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.
Xls.readSst (cyclomatic 23) src/PhpSpreadsheet/Reader/Xls.php:1930— Xls.readSst 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. This is NOT this file's highest cyclomatic complexity: Xls.readSummaryInformation (cyclomatic 28) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Styles.readFontStyle (cyclomatic 23) src/PhpSpreadsheet/Reader/Xlsx/Styles.php:90— Styles.readFontStyle 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.
Style.parseStyles (cyclomatic 23) src/PhpSpreadsheet/Reader/Xml/Style.php:23— Style.parseStyles 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.
Xlsx.listWorksheetInfoFromFile (cyclomatic 22) src/PhpSpreadsheet/Reader/Xlsx.php:346— Xlsx.listWorksheetInfoFromFile 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.
AgileEncryption.writeEcma376Container (cyclomatic 22) src/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php:447— AgileEncryption.writeEcma376Container 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.
Worksheet.calculateColumnWidths (cyclomatic 22) src/PhpSpreadsheet/Worksheet/Worksheet.php:721— Worksheet.calculateColumnWidths 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.
Workbook.writeAllDefinedNamesBiff8 (cyclomatic 22) src/PhpSpreadsheet/Writer/Xls/Workbook.php:551— Workbook.writeAllDefinedNamesBiff8 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.
Worksheet.writeCell (cyclomatic 22) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:1715— Worksheet.writeCell 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.
CalculationLocale.setLocale (cyclomatic 21) src/PhpSpreadsheet/Calculation/CalculationLocale.php:167— CalculationLocale.setLocale 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.
Matrix.index (cyclomatic 21) src/PhpSpreadsheet/Calculation/LookupRef/Matrix.php:87— Matrix.index 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.
Html.loadProperties (cyclomatic 21) src/PhpSpreadsheet/Reader/Html.php:830— Html.loadProperties 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.
Ods.listWorksheetInfo (cyclomatic 21) src/PhpSpreadsheet/Reader/Ods.php:167— Ods.listWorksheetInfo 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.
Xls.readFormula (cyclomatic 21) src/PhpSpreadsheet/Reader/Xls.php:2956— Xls.readFormula 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. This is NOT this file's highest cyclomatic complexity: Xls.readSummaryInformation (cyclomatic 28) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
ColumnAndRowAttributes.readRowAttributes (cyclomatic 21) src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php:209— ColumnAndRowAttributes.readRowAttributes 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.
Root.saveBbd (cyclomatic 21) src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:336— Root.saveBbd 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.
Html.generateRow (cyclomatic 21) src/PhpSpreadsheet/Writer/Html.php:1909— Html.generateRow 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.
Style.writeFont (cyclomatic 21) src/PhpSpreadsheet/Writer/Xlsx/Style.php:289— Style.writeFont has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Worksheet.writeConditionalFormatting (cyclomatic 21) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:925— Worksheet.writeConditionalFormatting has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Worksheet.writeCellFormula (cyclomatic 21) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:1593— Worksheet.writeCellFormula 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.
Calculation.calculateFormulaValue (cyclomatic 20) src/PhpSpreadsheet/Calculation/Calculation.php:725— Calculation.calculateFormulaValue 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.
Calculation.extractCellRange (cyclomatic 20) src/PhpSpreadsheet/Calculation/Calculation.php:2708— Calculation.extractCellRange 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.
Xls.readHyperLink (cyclomatic 20) src/PhpSpreadsheet/Reader/Xls.php:3663— Xls.readHyperLink 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. This is NOT this file's highest cyclomatic complexity: Xls.readSummaryInformation (cyclomatic 28) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
ListFunctions.listWorksheetInfo2 (cyclomatic 20) src/PhpSpreadsheet/Reader/Xls/ListFunctions.php:65— ListFunctions.listWorksheetInfo2 has cyclomatic complexity 20 (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.
ReferenceHelper.updatePrintArea (cyclomatic 20) src/PhpSpreadsheet/ReferenceHelper.php:655— ReferenceHelper.updatePrintArea 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.
Font.getTrueTypeFontFileFromFont (cyclomatic 20) src/PhpSpreadsheet/Shared/Font.php:541— Font.getTrueTypeFontFileFromFont 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.
ChainedBlockStream.stream_open (cyclomatic 20) src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php:49— ChainedBlockStream.stream_open 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.
Trend.calculate (cyclomatic 20) src/PhpSpreadsheet/Shared/Trend/Trend.php:55— Trend.calculate has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Table.writeTable (cyclomatic 20) src/PhpSpreadsheet/Writer/Xlsx/Table.php:20— Table.writeTable 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.
Worksheet.writeColorScaleElements (cyclomatic 20) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:785— Worksheet.writeColorScaleElements 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.
Calculation.resizeMatricesExtend (cyclomatic 19) src/PhpSpreadsheet/Calculation/Calculation.php:943— Calculation.resizeMatricesExtend 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.
XLookup.lookup (cyclomatic 19) src/PhpSpreadsheet/Calculation/LookupRef/XLookup.php:31— XLookup.lookup has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Xls.save (cyclomatic 19) src/PhpSpreadsheet/Writer/Xls.php:107— Xls.save 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.
Xf.writeXf (cyclomatic 19) src/PhpSpreadsheet/Writer/Xls/Xf.php:107— Xf.writeXf has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ExcelMatch.matchSmallestValue (cyclomatic 18) src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php:156— ExcelMatch.matchSmallestValue 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.
StringValueBinder.bindValue (cyclomatic 18) src/PhpSpreadsheet/Cell/StringValueBinder.php:79— StringValueBinder.bindValue has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
JpGraphRendererBase.renderPieChart (cyclomatic 18) src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:648— JpGraphRendererBase.renderPieChart 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. This is NOT this file's highest cyclomatic complexity: JpGraphRendererBase.render (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Xls.readLabelSst (cyclomatic 18) src/PhpSpreadsheet/Reader/Xls.php:2760— Xls.readLabelSst 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. This is NOT this file's highest cyclomatic complexity: Xls.readSummaryInformation (cyclomatic 28) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Chart.readChartAttributes (cyclomatic 18) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1265— Chart.readChartAttributes 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.
Chart.readEffects (cyclomatic 18) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1396— Chart.readEffects 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.
Font.applyFromArray (cyclomatic 18) src/PhpSpreadsheet/Style/Font.php:201— Font.applyFromArray 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.
Html.generateRowCellDataValue (cyclomatic 18) src/PhpSpreadsheet/Writer/Html.php:1562— Html.generateRowCellDataValue 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.
Chart.writePlotSeriesValues (cyclomatic 18) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1496— Chart.writePlotSeriesValues 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.
Functions.convertArrayToCellRange (cyclomatic 17) src/PhpSpreadsheet/Calculation/Functions.php:366— Functions.convertArrayToCellRange 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.
JpGraphRendererBase.renderPlotBar (cyclomatic 17) src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:361— JpGraphRendererBase.renderPlotBar 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. This is NOT this file's highest cyclomatic complexity: JpGraphRendererBase.render (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Styles.readFillStyle (cyclomatic 17) src/PhpSpreadsheet/Reader/Xlsx/Styles.php:176— Styles.readFillStyle 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.
Spreadsheet.garbageCollect (cyclomatic 17) src/PhpSpreadsheet/Spreadsheet.php:1428— Spreadsheet.garbageCollect has cyclomatic complexity 17 (threshold 15). 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.
Protection.isProtectionEnabled (cyclomatic 17) src/PhpSpreadsheet/Worksheet/Protection.php:130— Protection.isProtectionEnabled has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Worksheet.removeRow (cyclomatic 17) src/PhpSpreadsheet/Worksheet/Worksheet.php:2644— Worksheet.removeRow 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.
Html.generateRowCellData (cyclomatic 17) src/PhpSpreadsheet/Writer/Html.php:1624— Html.generateRowCellData 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.
Style.writeCellProperties (cyclomatic 17) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:175— Style.writeCellProperties 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.
Parser.convert (cyclomatic 17) src/PhpSpreadsheet/Writer/Xls/Parser.php:495— Parser.convert 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.
Parser.fact (cyclomatic 17) src/PhpSpreadsheet/Writer/Xls/Parser.php:1371— Parser.fact 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.
Parser.toReversePolish (cyclomatic 17) src/PhpSpreadsheet/Writer/Xls/Parser.php:1583— Parser.toReversePolish 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.
Chart.writeLabelFont (cyclomatic 17) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1935— Chart.writeLabelFont 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.
Rels.writeWorksheetRelationships (cyclomatic 17) src/PhpSpreadsheet/Writer/Xlsx/Rels.php:240— Rels.writeWorksheetRelationships 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.
StringTable.writeRichTextForCharts (cyclomatic 17) src/PhpSpreadsheet/Writer/Xlsx/StringTable.php:207— StringTable.writeRichTextForCharts 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.
Calculation.extractNamedRange (cyclomatic 16) src/PhpSpreadsheet/Calculation/Calculation.php:2783— Calculation.extractNamedRange 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.
ExcelMatch.matchLargestValue (cyclomatic 16) src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php:121— ExcelMatch.matchLargestValue 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.
AdvancedValueBinder.bindValue (cyclomatic 16) src/PhpSpreadsheet/Cell/AdvancedValueBinder.php:19— AdvancedValueBinder.bindValue 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.
Ods.getFontStyles (cyclomatic 16) src/PhpSpreadsheet/Reader/Ods.php:1605— Ods.getFontStyles 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.
Chart.chartTitle (cyclomatic 16) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:520— Chart.chartTitle 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.
Worksheet.setTitle (cyclomatic 16) src/PhpSpreadsheet/Worksheet/Worksheet.php:904— Worksheet.setTitle 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.
Worksheet.removeColumn (cyclomatic 16) src/PhpSpreadsheet/Worksheet/Worksheet.php:2750— Worksheet.removeColumn 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.
AutoFilter.writeAutoFilterColumnRule (cyclomatic 16) src/PhpSpreadsheet/Writer/Xlsx/AutoFilter.php:71— AutoFilter.writeAutoFilterColumnRule 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.
StringTable.writeRichText (cyclomatic 16) src/PhpSpreadsheet/Writer/Xlsx/StringTable.php:116— StringTable.writeRichText 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.
Worksheet.writeDataValidations (cyclomatic 16) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:1012— Worksheet.writeDataValidations 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.
XxxComment src/PhpSpreadsheet/Shared/Font.php:44— // XXX: Constants created! — 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.
Xlsx.loadSpreadsheetFromFile (cognitive 1747) src/PhpSpreadsheet/Reader/Xlsx.php:560— Xlsx.loadSpreadsheetFromFile has cognitive complexity 1747 (threshold 15). Drivers by points: if/else 190 (1342 pts), loops 49 (304 pts), boolean chains 48, match/switch 7 (29 pts), ternaries 3 (17 pts), error handling 1 (7 pts) (nesting depth added 1449). 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.
Calculation.processTokenStack (cognitive 629) src/PhpSpreadsheet/Calculation/Calculation.php:1724— Calculation.processTokenStack has cognitive complexity 629 (threshold 15). Drivers by points: if/else 129 (465 pts), loops 11 (48 pts), boolean chains 47, ternaries 11 (45 pts), error handling 4 (21 pts), match/switch 1 (3 pts) (nesting depth added 426). 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.
Xml.loadIntoExisting (cognitive 370) src/PhpSpreadsheet/Reader/Xml.php:287— Xml.loadIntoExisting has cognitive complexity 370 (threshold 15). Drivers by points: if/else 78 (295 pts), loops 10 (33 pts), ternaries 2 (15 pts), boolean chains 12, error handling 1 (8 pts), match/switch 1 (7 pts) (nesting depth added 266). 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.
Calculation.internalParseFormula (cognitive 336) src/PhpSpreadsheet/Calculation/Calculation.php:1186— Calculation.internalParseFormula has cognitive complexity 336 (threshold 15). Drivers by points: if/else 59 (218 pts), boolean chains 53, loops 9 (28 pts), ternaries 4 (21 pts), error handling 3 (11 pts), match/switch 1 (5 pts) (nesting depth added 207). 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.
Chart.readChart (cognitive 335) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:78— Chart.readChart has cognitive complexity 335 (threshold 15). Drivers by points: if/else 47 (276 pts), match/switch 6 (34 pts), loops 5 (22 pts), boolean chains 3 (nesting depth added 274). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ods.processTableRow (cognitive 245) src/PhpSpreadsheet/Reader/Ods.php:813— Ods.processTableRow has cognitive complexity 245 (threshold 15). Drivers by points: if/else 56 (175 pts), loops 11 (35 pts), ternaries 5 (22 pts), boolean chains 10, match/switch 1 (3 pts) (nesting depth added 162). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Chart.chartDataSeries (cognitive 241) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:599— Chart.chartDataSeries has cognitive complexity 241 (threshold 15). Drivers by points: if/else 53 (225 pts), match/switch 2 (6 pts), ternaries 1 (5 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 182). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LoadSpreadsheet.loadSpreadsheetFromFile2 (cognitive 205) src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php:24— LoadSpreadsheet.loadSpreadsheetFromFile2 has cognitive complexity 205 (threshold 15). Drivers by points: if/else 42 (143 pts), loops 11 (25 pts), match/switch 5 (20 pts), ternaries 3 (11 pts), boolean chains 6 (nesting depth added 138). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
FormulaParser.parseToTokens (cognitive 200) src/PhpSpreadsheet/Calculation/FormulaParser.php:123— FormulaParser.parseToTokens has cognitive complexity 200 (threshold 15). Drivers by points: if/else 72 (167 pts), boolean chains 27, loops 4 (6 pts) (nesting depth added 97). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
Chart.writePlotGroup (cognitive 200) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1150— Chart.writePlotGroup has cognitive complexity 200 (threshold 15). Drivers by points: if/else 49 (138 pts), boolean chains 32, ternaries 6 (22 pts), loops 3 (8 pts) (nesting depth added 110). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Style.applyFromArray (cognitive 191) src/PhpSpreadsheet/Style/Style.php:200— Style.applyFromArray has cognitive complexity 191 (threshold 15). Drivers by points: if/else 40 (115 pts), loops 12 (42 pts), ternaries 5 (23 pts), match/switch 2 (8 pts), boolean chains 3 (nesting depth added 129). 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.
Cell.getCalculatedValue (cognitive 173) src/PhpSpreadsheet/Cell/Cell.php:449— Cell.getCalculatedValue has cognitive complexity 173 (threshold 15). Drivers by points: if/else 31 (121 pts), loops 7 (34 pts), boolean chains 16, error handling 1 (2 pts) (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.
Ods.loadIntoExisting (cognitive 145) src/PhpSpreadsheet/Reader/Ods.php:326— Ods.loadIntoExisting has cognitive complexity 145 (threshold 15). Drivers by points: if/else 27 (87 pts), loops 16 (36 pts), match/switch 2 (8 pts), boolean chains 7, ternaries 7 (nesting depth added 86). 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.
Xlsx.loadSheetData (cognitive 137) src/PhpSpreadsheet/Reader/Xlsx.php:2062— Xlsx.loadSheetData has cognitive complexity 137 (threshold 15). Drivers by points: if/else 33 (112 pts), boolean chains 14, ternaries 1 (5 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 86). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AutoFilter.showHideRows (cognitive 131) src/PhpSpreadsheet/Worksheet/AutoFilter.php:789— AutoFilter.showHideRows has cognitive complexity 131 (threshold 15). Drivers by points: if/else 23 (83 pts), loops 9 (25 pts), boolean chains 13, ternaries 2 (8 pts), match/switch 1 (2 pts) (nesting depth added 83). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Xlsx.parseRichText (cognitive 114) src/PhpSpreadsheet/Reader/Xlsx.php:2254— Xlsx.parseRichText has cognitive complexity 114 (threshold 15). Drivers by points: if/else 22 (105 pts), boolean chains 6, loops 1 (3 pts) (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.
Worksheet.close (cognitive 107) src/PhpSpreadsheet/Writer/Xls/Worksheet.php:201— Worksheet.close has cognitive complexity 107 (threshold 15). Drivers by points: if/else 24 (65 pts), ternaries 6 (21 pts), loops 6 (9 pts), match/switch 2 (8 pts), boolean chains 4 (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.
ReferenceHelper.updateFormulaReferences (cognitive 102) src/PhpSpreadsheet/ReferenceHelper.php:743— ReferenceHelper.updateFormulaReferences has cognitive complexity 102 (threshold 15). Drivers by points: if/else 17 (67 pts), loops 5 (17 pts), ternaries 4 (16 pts), boolean chains 2 (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.
Xlsx.save (cognitive 102) src/PhpSpreadsheet/Writer/Xlsx.php:328— Xlsx.save has cognitive complexity 102 (threshold 15). Drivers by points: if/else 29 (63 pts), loops 13 (31 pts), boolean chains 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Html.generateRowWriteCell (cognitive 100) src/PhpSpreadsheet/Writer/Html.php:1713— Html.generateRowWriteCell has cognitive complexity 100 (threshold 15). Drivers by points: if/else 30 (65 pts), boolean chains 15, loops 4 (11 pts), ternaries 2 (6 pts), error handling 1 (3 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.
Worksheet.writeSheetData (cognitive 100) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:1385— Worksheet.writeSheetData has cognitive complexity 100 (threshold 15). Drivers by points: if/else 20 (80 pts), loops 4 (9 pts), boolean chains 8, ternaries 1 (3 pts) (nesting depth added 67). 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.
Worksheet.writeCFRule (cognitive 94) src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2806— Worksheet.writeCFRule has cognitive complexity 94 (threshold 15). Drivers by points: if/else 30 (40 pts), ternaries 28 (33 pts), boolean chains 17, match/switch 2 (4 pts) (nesting depth added 17). 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.
ContentTypes.writeContentTypes (cognitive 90) src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:23— ContentTypes.writeContentTypes has cognitive complexity 90 (threshold 15). Drivers by points: if/else 27 (50 pts), loops 15 (26 pts), boolean chains 8, match/switch 1 (4 pts), ternaries 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.
Chart.writePlotArea (cognitive 86) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:321— Chart.writePlotArea has cognitive complexity 86 (threshold 15). Drivers by points: if/else 23 (57 pts), boolean chains 15, ternaries 2 (8 pts), loops 3 (6 pts) (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.
Xls.readXfExt (cognitive 78) src/PhpSpreadsheet/Reader/Xls.php:1431— Xls.readXfExt has cognitive complexity 78 (threshold 15). Drivers by points: if/else 17 (73 pts), match/switch 1 (3 pts), loops 1 (2 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.
Chart.parseRichText (cognitive 76) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1024— Chart.parseRichText has cognitive complexity 76 (threshold 15). Drivers by points: if/else 34 (74 pts), boolean chains 1, loops 1 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Content.writeCells (cognitive 76) src/PhpSpreadsheet/Writer/Ods/Content.php:227— Content.writeCells has cognitive complexity 76 (threshold 15). Drivers by points: if/else 18 (52 pts), ternaries 4 (14 pts), error handling 1 (4 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Xlsx.listWorksheetInfoFromFile (cognitive 75) src/PhpSpreadsheet/Reader/Xlsx.php:346— Xlsx.listWorksheetInfoFromFile has cognitive complexity 75 (threshold 15). Drivers by points: if/else 8 (38 pts), ternaries 3 (18 pts), loops 4 (13 pts), boolean chains 6 (nesting depth added 54). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Worksheet.writeSheetViews (cognitive 71) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:277— Worksheet.writeSheetViews has cognitive complexity 71 (threshold 15). Drivers by points: if/else 32 (58 pts), boolean chains 5, ternaries 2 (5 pts), loops 1 (3 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Xls.readXf (cognitive 64) src/PhpSpreadsheet/Reader/Xls.php:1179— Xls.readXf has cognitive complexity 64 (threshold 15). Drivers by points: if/else 22 (48 pts), ternaries 4 (10 pts), match/switch 2 (6 pts) (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Ods.listWorksheetInfo (cognitive 63) src/PhpSpreadsheet/Reader/Ods.php:167— Ods.listWorksheetInfo has cognitive complexity 63 (threshold 15). Drivers by points: if/else 6 (28 pts), ternaries 4 (22 pts), loops 3 (9 pts), boolean chains 4 (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.
Xlsx.processIgnoredErrors (cognitive 62) src/PhpSpreadsheet/Reader/Xlsx.php:2973— Xlsx.processIgnoredErrors has cognitive complexity 62 (threshold 15). Drivers by points: if/else 11 (51 pts), loops 3 (11 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worksheet.rangeToArrayYieldRows (cognitive 62) src/PhpSpreadsheet/Worksheet/Worksheet.php:3355— Worksheet.rangeToArrayYieldRows has cognitive complexity 62 (threshold 15). Drivers by points: if/else 8 (30 pts), loops 6 (16 pts), ternaries 3 (10 pts), boolean chains 6 (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.
Xls.readLabelSst (cognitive 61) src/PhpSpreadsheet/Reader/Xls.php:2760— Xls.readLabelSst has cognitive complexity 61 (threshold 15). Drivers by points: if/else 16 (54 pts), boolean chains 4, loops 1 (3 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.
Style.parseStyles (cognitive 60) src/PhpSpreadsheet/Reader/Xml/Style.php:23— Style.parseStyles has cognitive complexity 60 (threshold 15). Drivers by points: if/else 10 (39 pts), ternaries 3 (14 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (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.
Worksheet.calculateColumnWidths (cognitive 60) src/PhpSpreadsheet/Worksheet/Worksheet.php:721— Worksheet.calculateColumnWidths has cognitive complexity 60 (threshold 15). Drivers by points: if/else 11 (40 pts), loops 6 (16 pts), boolean chains 4 (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.
CalculationLocale.setLocale (cognitive 56) src/PhpSpreadsheet/Calculation/CalculationLocale.php:167— CalculationLocale.setLocale has cognitive complexity 56 (threshold 15). Drivers by points: if/else 10 (29 pts), error handling 2 (6 pts), loops 2 (6 pts), match/switch 1 (6 pts), ternaries 2 (6 pts), boolean chains 3 (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Html.generateRowCellDataValue (cognitive 56) src/PhpSpreadsheet/Writer/Html.php:1562— Html.generateRowCellDataValue has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (27 pts), ternaries 4 (20 pts), error handling 2 (7 pts), boolean chains 2 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Chart.writeValueAxis (cognitive 56) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:827— Chart.writeValueAxis has cognitive complexity 56 (threshold 15). Drivers by points: if/else 28 (45 pts), ternaries 3 (8 pts), boolean chains 3 (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.
Worksheet.writeColorScaleElements (cognitive 55) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:785— Worksheet.writeColorScaleElements has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (52 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.
Calculation.extractCellRange (cognitive 54) src/PhpSpreadsheet/Calculation/Calculation.php:2708— Calculation.extractCellRange has cognitive complexity 54 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 3 (14 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Html.flushCell (cognitive 53) src/PhpSpreadsheet/Reader/Html.php:296— Html.flushCell has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (45 pts), error handling 1 (4 pts), ternaries 1 (4 pts) (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Calculation.executeNumericBinaryOperation (cognitive 49) src/PhpSpreadsheet/Calculation/Calculation.php:2545— Calculation.executeNumericBinaryOperation has cognitive complexity 49 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 4 (11 pts), boolean chains 8, match/switch 2 (6 pts) (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.
ReferenceHelper.insertNewBefore (cognitive 49) src/PhpSpreadsheet/ReferenceHelper.php:431— ReferenceHelper.insertNewBefore has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 12, loops 4 (5 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.
Xls.readSst (cognitive 48) src/PhpSpreadsheet/Reader/Xls.php:1930— Xls.readSst has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 6 (14 pts), ternaries 2 (5 pts), boolean chains 3 (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.
JpGraphRendererBase.renderPieChart (cognitive 47) src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:648— JpGraphRendererBase.renderPieChart has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 4 (10 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColumnAndRowAttributes.readRowAttributes (cognitive 47) src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php:209— ColumnAndRowAttributes.readRowAttributes has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (38 pts), boolean chains 8, loops 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.
CurrencyBase.format (cognitive 47) src/PhpSpreadsheet/Style/NumberFormat/Wizard/CurrencyBase.php:125— CurrencyBase.format has cognitive complexity 47 (threshold 15). Drivers by points: if/else 27 (41 pts), boolean chains 4, ternaries 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.
Calculation.resizeMatricesExtend (cognitive 46) src/PhpSpreadsheet/Calculation/Calculation.php:943— Calculation.resizeMatricesExtend has cognitive complexity 46 (threshold 15). Drivers by points: loops 6 (20 pts), ternaries 4 (14 pts), if/else 6 (10 pts), boolean chains 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Drawing.setPath (cognitive 46) src/PhpSpreadsheet/Worksheet/Drawing.php:100— Drawing.setPath has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (39 pts), boolean chains 7 (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.
Parser.match (cognitive 46) src/PhpSpreadsheet/Writer/Xls/Parser.php:1038— Parser.match has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 27, if/else 16 (18 pts), match/switch 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Html.generateRow (cognitive 45) src/PhpSpreadsheet/Writer/Html.php:1909— Html.generateRow has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (27 pts), ternaries 2 (8 pts), boolean chains 5, loops 2 (5 pts) (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.
Workbook.writeAllDefinedNamesBiff8 (cognitive 45) src/PhpSpreadsheet/Writer/Xls/Workbook.php:551— Workbook.writeAllDefinedNamesBiff8 has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 5 (8 pts), boolean chains 4, ternaries 1 (4 pts), error handling 1 (3 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.
ReferenceHelper.updatePrintArea (cognitive 43) src/PhpSpreadsheet/ReferenceHelper.php:655— ReferenceHelper.updatePrintArea has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (36 pts), boolean chains 7 (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.
Style.writeCellStyleXf (cognitive 43) src/PhpSpreadsheet/Writer/Xlsx/Style.php:433— Style.writeCellStyleXf has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (26 pts), ternaries 8 (14 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worksheet.writeDataValidations (cognitive 42) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:1012— Worksheet.writeDataValidations has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (28 pts), ternaries 4 (12 pts), loops 1 (2 pts) (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.
Html.applyInlineStyle (cognitive 40) src/PhpSpreadsheet/Reader/Html.php:1019— Html.applyInlineStyle has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 3 (5 pts), match/switch 2 (5 pts), boolean chains 2, ternaries 1 (2 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.
Chart.readChartAttributes (cognitive 39) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1265— Chart.readChartAttributes has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (39 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.
AgileEncryption.parse (cognitive 39) src/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php:106— AgileEncryption.parse has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 28, if/else 6, ternaries 5. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Html.generateSheetData (cognitive 39) src/PhpSpreadsheet/Writer/Html.php:566— Html.generateSheetData has cognitive complexity 39 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 5 (12 pts), ternaries 1 (6 pts), boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Chart.writeCategoryAxis (cognitive 39) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:602— Chart.writeCategoryAxis has cognitive complexity 39 (threshold 15). Drivers by points: if/else 26 (33 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 8). 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.
StringTable.writeRichTextForCharts (cognitive 39) src/PhpSpreadsheet/Writer/Xlsx/StringTable.php:207— StringTable.writeRichTextForCharts has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (22 pts), ternaries 4 (13 pts), match/switch 1 (3 pts), loops 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.
Worksheet.setTitle (cognitive 38) src/PhpSpreadsheet/Worksheet/Worksheet.php:904— Worksheet.setTitle has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 1 (4 pts), boolean chains 2 (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.
Xls.save (cognitive 38) src/PhpSpreadsheet/Writer/Xls.php:107— Xls.save has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 8 (12 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.
DefaultValueBinder.dataTypeForValue (cognitive 37) src/PhpSpreadsheet/Cell/DefaultValueBinder.php:56— DefaultValueBinder.dataTypeForValue has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 7, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Chart.setAxisProperties (cognitive 37) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1561— Chart.setAxisProperties has cognitive complexity 37 (threshold 15). Drivers by points: if/else 28 (37 pts) (nesting depth added 9). 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.
Worksheet.changeChartSheetNames (cognitive 36) src/PhpSpreadsheet/Worksheet/Worksheet.php:964— Worksheet.changeChartSheetNames has cognitive complexity 36 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 6 (18 pts) (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.
Escher.close (cognitive 36) src/PhpSpreadsheet/Writer/Xls/Escher.php:52— Escher.close has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 5 (13 pts), match/switch 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 19). 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.
Root.saveBbd (cognitive 35) src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:336— Root.saveBbd has cognitive complexity 35 (threshold 15). Drivers by points: loops 9 (15 pts), if/else 7 (12 pts), ternaries 4 (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.
Formatter.toFormattedString (cognitive 35) src/PhpSpreadsheet/Style/NumberFormat/Formatter.php:126— Formatter.toFormattedString has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 7, ternaries 3 (6 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Chart.writePlotSeriesValues (cognitive 35) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1496— Chart.writePlotSeriesValues has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (9 pts), boolean chains 7 (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.
StringTable.writeRichText (cognitive 35) src/PhpSpreadsheet/Writer/Xlsx/StringTable.php:116— StringTable.writeRichText has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (22 pts), ternaries 4 (11 pts), boolean chains 1, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Csv.loadStringOrFile2 (cognitive 34) src/PhpSpreadsheet/Reader/Csv.php:396— Csv.loadStringOrFile2 has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 3 (4 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReferenceHelper.adjustTable (cognitive 34) src/PhpSpreadsheet/ReferenceHelper.php:1287— ReferenceHelper.adjustTable has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (27 pts), ternaries 1 (6 pts), loops 1 (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.
Font.applyFromArray (cognitive 34) src/PhpSpreadsheet/Style/Font.php:201— Font.applyFromArray has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (34 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.
Worksheet.writeDataValidity (cognitive 34) src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2638— Worksheet.writeDataValidity has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 4 (10 pts), error handling 2 (6 pts), loops 3 (5 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.
Chart.chartTitle (cognitive 33) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:520— Chart.chartTitle has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (9 pts), match/switch 2 (7 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.
Chart.readEffects (cognitive 33) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1396— Chart.readEffects has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 3 (6 pts), 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.
Calculation.resizeMatricesShrink (cognitive 32) src/PhpSpreadsheet/Calculation/Calculation.php:900— Calculation.resizeMatricesShrink has cognitive complexity 32 (threshold 15). Drivers by points: loops 6 (20 pts), if/else 6 (10 pts), boolean chains 2 (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Xls.readFormula (cognitive 32) src/PhpSpreadsheet/Reader/Xls.php:2956— Xls.readFormula has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 7, error handling 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Styles.readFontStyle (cognitive 32) src/PhpSpreadsheet/Reader/Xlsx/Styles.php:90— Styles.readFontStyle has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (29 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.
ChainedBlockStream.stream_open (cognitive 32) src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php:49— ChainedBlockStream.stream_open has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 3 (6 pts), boolean chains 3, ternaries 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.
Worksheet.setCodeName (cognitive 32) src/PhpSpreadsheet/Worksheet/Worksheet.php:4075— Worksheet.setCodeName has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (28 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.
Table.writeTable (cognitive 32) src/PhpSpreadsheet/Writer/Xlsx/Table.php:20— Table.writeTable has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 8 (9 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Calculation.extractNamedRange (cognitive 31) src/PhpSpreadsheet/Calculation/Calculation.php:2783— Calculation.extractNamedRange has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 2 (5 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExcelMatch.matchLargestValue (cognitive 31) src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php:121— ExcelMatch.matchLargestValue has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (7 pts), boolean chains 5 (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.
DataSeriesValues.refresh (cognitive 31) src/PhpSpreadsheet/Chart/DataSeriesValues.php:436— DataSeriesValues.refresh has cognitive complexity 31 (threshold 15). Drivers by points: loops 4 (16 pts), if/else 6 (12 pts), boolean chains 3 (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AutoFilter.filterTestInCustomDataSet (cognitive 31) src/PhpSpreadsheet/Worksheet/AutoFilter.php:378— AutoFilter.filterTestInCustomDataSet has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 4 (11 pts), boolean chains 10, if/else 5 (9 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ods.canRead (cognitive 30) src/PhpSpreadsheet/Reader/Ods.php:60— Ods.canRead has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 1 (6 pts), boolean chains 2 (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.
Xls.readHyperLink (cognitive 30) src/PhpSpreadsheet/Reader/Xls.php:3663— Xls.readHyperLink has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 3 (9 pts), error handling 1 (2 pts), loops 1 (2 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.
AgileEncryption.writeEcma376Container (cognitive 30) src/PhpSpreadsheet/Shared/Xlsx/AgileEncryption.php:447— AgileEncryption.writeEcma376Container has cognitive complexity 30 (threshold 15). Drivers by points: loops 9 (11 pts), if/else 6 (9 pts), ternaries 3 (7 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Html.writeImageInCell (cognitive 30) src/PhpSpreadsheet/Writer/Html.php:745— Html.writeImageInCell has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (25 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Workbook.writeSharedStringsTable (cognitive 30) src/PhpSpreadsheet/Writer/Xls/Workbook.php:992— Workbook.writeSharedStringsTable has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (19 pts), ternaries 2 (6 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Chart.writeLabelFont (cognitive 30) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1935— Chart.writeLabelFont has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 5 (11 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.
Calculation.calculateCellValue (cognitive 29) src/PhpSpreadsheet/Calculation/Calculation.php:525— Calculation.calculateCellValue has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 8, ternaries 1 (3 pts), error handling 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.
Matrix.index (cognitive 29) src/PhpSpreadsheet/Calculation/LookupRef/Matrix.php:87— Matrix.index has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 7, loops 1 (3 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Coordinate.mergeRangesInCollection (cognitive 29) src/PhpSpreadsheet/Cell/Coordinate.php:690— Coordinate.mergeRangesInCollection has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 4 (6 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Styles.tableStyles (cognitive 29) src/PhpSpreadsheet/Reader/Xlsx/Styles.php:504— Styles.tableStyles has cognitive complexity 29 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (8 pts), match/switch 1 (7 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worksheet.removeRow (cognitive 29) src/PhpSpreadsheet/Worksheet/Worksheet.php:2644— Worksheet.removeRow has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 5 (nesting depth added 14). 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.
AutoFilter.writeAutoFilterColumnRule (cognitive 29) src/PhpSpreadsheet/Writer/Xlsx/AutoFilter.php:71— AutoFilter.writeAutoFilterColumnRule has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 1 (4 pts), ternaries 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.
Styles.readFillStyle (cognitive 28) src/PhpSpreadsheet/Reader/Xlsx/Styles.php:176— Styles.readFillStyle has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Spreadsheet.garbageCollect (cognitive 28) src/PhpSpreadsheet/Spreadsheet.php:1428— Spreadsheet.garbageCollect has cognitive complexity 28 (threshold 15). Drivers by points: loops 11 (17 pts), if/else 5 (10 pts), boolean chains 1 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PageSettings.pageSetup (cognitive 27) src/PhpSpreadsheet/Reader/Xml/PageSettings.php:72— PageSettings.pageSetup has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 2 (12 pts), if/else 2 (5 pts), loops 2 (5 pts), match/switch 1 (5 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.
ReferenceHelper.adjustProtectedCells (cognitive 27) src/PhpSpreadsheet/ReferenceHelper.php:330— ReferenceHelper.adjustProtectedCells has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (10 pts), ternaries 1 (4 pts), boolean chains 1 (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.
BaseDrawing.setWorksheet (cognitive 27) src/PhpSpreadsheet/Worksheet/BaseDrawing.php:201— BaseDrawing.setWorksheet has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (7 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.
Worksheet.removeColumn (cognitive 27) src/PhpSpreadsheet/Worksheet/Worksheet.php:2750— Worksheet.removeColumn has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 4 (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.
Worksheet.writeConditionalFormatting (cognitive 27) src/PhpSpreadsheet/Writer/Xls/Worksheet.php:522— Worksheet.writeConditionalFormatting has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worksheet.writeCellFormula (cognitive 27) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:1593— Worksheet.writeCellFormula has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 5, ternaries 3 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worksheet.writeCell (cognitive 27) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:1715— Worksheet.writeCell has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 2 (6 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Functions.convertArrayToCellRange (cognitive 26) src/PhpSpreadsheet/Calculation/Functions.php:366— Functions.convertArrayToCellRange has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 7, loops 2 (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.
JpGraphRendererBase.renderPlotScatter (cognitive 26) src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:445— JpGraphRendererBase.renderPlotScatter has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (7 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.
ReferenceHelper.adjustAutoFilter (cognitive 26) src/PhpSpreadsheet/ReferenceHelper.php:1205— ReferenceHelper.adjustAutoFilter has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (21 pts), ternaries 1 (5 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PageSetup.setPrintArea (cognitive 26) src/PhpSpreadsheet/Worksheet/PageSetup.php:656— PageSetup.setPrintArea has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worksheet.__clone (cognitive 26) src/PhpSpreadsheet/Worksheet/Worksheet.php:4014— Worksheet.__clone has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (17 pts), if/else 4 (8 pts), boolean chains 1 (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ExcelMatch.matchSmallestValue (cognitive 25) src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php:156— ExcelMatch.matchSmallestValue has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cell.setValueExplicit (cognitive 25) src/PhpSpreadsheet/Cell/Cell.php:292— Cell.setValueExplicit has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 6, ternaries 1 (2 pts), match/switch 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.
JpGraphRendererBase.renderPlotBar (cognitive 25) src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:361— JpGraphRendererBase.renderPlotBar has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConditionalFormattingRuleExtension.parseExtDataBarElementChildrenFromXml (cognitive 25) src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php:123— ConditionalFormattingRuleExtension.parseExtDataBarElementChildrenFromXml has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 2 (6 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Html.generateRowCellData (cognitive 25) src/PhpSpreadsheet/Writer/Html.php:1624— Html.generateRowCellData has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, error handling 1 (3 pts), ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OLE.copyDataByName (cognitive 24) src/PhpSpreadsheet/Shared/OLE.php:516— OLE.copyDataByName has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 5, 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.
Root.makeSmallData (cognitive 24) src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:268— Root.makeSmallData has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (7 pts), ternaries 1 (4 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.
Style.getOldXfIndexes (cognitive 24) src/PhpSpreadsheet/Style/Style.php:554— Style.getOldXfIndexes has cognitive complexity 24 (threshold 15). Drivers by points: loops 8 (19 pts), if/else 2 (4 pts), match/switch 1 (nesting depth added 13). 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.
Csv.writeLine (cognitive 24) src/PhpSpreadsheet/Writer/Csv.php:281— Csv.writeLine 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, 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.
Worksheet.writeConditionalFormatting (cognitive 24) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:925— Worksheet.writeConditionalFormatting has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, loops 4 (6 pts), if/else 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
XLookup.searchLinear (cognitive 23) src/PhpSpreadsheet/Calculation/LookupRef/XLookup.php:117— XLookup.searchLinear has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 4, 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.
AdvancedValueBinder.bindValue (cognitive 23) src/PhpSpreadsheet/Cell/AdvancedValueBinder.php:19— AdvancedValueBinder.bindValue has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (22 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.
Ods.listWorksheetNames (cognitive 23) src/PhpSpreadsheet/Reader/Ods.php:110— Ods.listWorksheetNames has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (9 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.
PageSetup.pageSetup (cognitive 23) src/PhpSpreadsheet/Reader/Xlsx/PageSetup.php:59— PageSetup.pageSetup has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (20 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.
Xml.listWorksheetInfo (cognitive 23) src/PhpSpreadsheet/Reader/Xml.php:190— Xml.listWorksheetInfo has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (8 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.
Root.saveHeader (cognitive 23) src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:156— Root.saveHeader has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 6 (8 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worksheet.getConditionalStyles (cognitive 23) src/PhpSpreadsheet/Worksheet/Worksheet.php:1578— Worksheet.getConditionalStyles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 4 (6 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.
Drawing.collectDrawings (cognitive 23) src/PhpSpreadsheet/Writer/Ods/Drawing.php:44— Drawing.collectDrawings has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 1, 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.
Calculation.calculateFormulaValue (cognitive 22) src/PhpSpreadsheet/Calculation/Calculation.php:725— Calculation.calculateFormulaValue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, ternaries 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.
Html.getStyleArray (cognitive 22) src/PhpSpreadsheet/Reader/Html.php:1289— Html.getStyleArray has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 1 (2 pts) (nesting depth added 14). 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.
Ods.processTableColumn (cognitive 22) src/PhpSpreadsheet/Reader/Ods.php:1379— Ods.processTableColumn has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (6 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Slk.processFormula (cognitive 22) src/PhpSpreadsheet/Reader/Slk.php:179— Slk.processFormula has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 2 (4 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.
ListFunctions.listWorksheetDimensions2 (cognitive 22) src/PhpSpreadsheet/Reader/Xls/ListFunctions.php:174— ListFunctions.listWorksheetDimensions2 has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (13 pts), match/switch 2 (5 pts), loops 3 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Font.getTrueTypeFontFileFromFont (cognitive 22) src/PhpSpreadsheet/Shared/Font.php:541— Font.getTrueTypeFontFileFromFont has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 7 (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.
Spreadsheet.__clone (cognitive 22) src/PhpSpreadsheet/Spreadsheet.php:1171— Spreadsheet.__clone has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 5 (7 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Drawing.writeDrawing (cognitive 22) src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:180— Drawing.writeDrawing has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Style.writeFont (cognitive 22) src/PhpSpreadsheet/Writer/Xlsx/Style.php:289— Style.writeFont has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worksheet.writeCols (cognitive 22) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:482— Worksheet.writeCols has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NonPeriodic.xnpvOrdered (cognitive 21) src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php:258— NonPeriodic.xnpvOrdered has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (4 pts), error handling 2 (3 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.
XLookup.lookup (cognitive 21) src/PhpSpreadsheet/Calculation/LookupRef/XLookup.php:31— XLookup.lookup has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 2 (4 pts), error handling 2, match/switch 1, ternaries 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Styles.dxfs (cognitive 21) src/PhpSpreadsheet/Reader/Xlsx/Styles.php:471— Styles.dxfs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
BestFit.calculateGoodnessOfFit (cognitive 21) src/PhpSpreadsheet/Shared/Trend/BestFit.php:309— BestFit.calculateGoodnessOfFit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Worksheet.fromArray (cognitive 21) src/PhpSpreadsheet/Worksheet/Worksheet.php:3177— Worksheet.fromArray has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (10 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Html.adjustRendererPositions (cognitive 21) src/PhpSpreadsheet/Writer/Html.php:890— Html.adjustRendererPositions has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (10 pts), loops 2 (6 pts), if/else 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Style.writeCellProperties (cognitive 21) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:175— Style.writeCellProperties has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CalculationLocale.getFalseTrueArray (cognitive 20) src/PhpSpreadsheet/Calculation/CalculationLocale.php:119— CalculationLocale.getFalseTrueArray has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExcelMatch.matchFirstValue (cognitive 20) src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php:81— ExcelMatch.matchFirstValue has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, 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.
Html.buildTextRun (cognitive 20) src/PhpSpreadsheet/Helper/Html.php:662— Html.buildTextRun has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (20 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.
Ods.lookForSelectedCells (cognitive 20) src/PhpSpreadsheet/Reader/Ods.php:1465— Ods.lookForSelectedCells has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (8 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.
Xls.readWindow2 (cognitive 20) src/PhpSpreadsheet/Reader/Xls.php:3378— Xls.readWindow2 has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 2 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Biff8.readBIFF8CellRangeAddressB (cognitive 20) src/PhpSpreadsheet/Reader/Xls/Biff8.php:295— Biff8.readBIFF8CellRangeAddressB has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 8 (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.
ColumnAndRowAttributes.load (cognitive 20) src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php:84— ColumnAndRowAttributes.load has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, 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.
PageSettings.printSetup (cognitive 20) src/PhpSpreadsheet/Reader/Xml/PageSettings.php:105— PageSettings.printSetup has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 2 (10 pts), loops 2 (5 pts), match/switch 1 (4 pts), if/else 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.
DateFormatter.format (cognitive 20) src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php:123— DateFormatter.format has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 1, error handling 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.
Csv.save (cognitive 20) src/PhpSpreadsheet/Writer/Csv.php:80— Csv.save has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (4 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.
Rels.writeWorksheetRelationships (cognitive 20) src/PhpSpreadsheet/Writer/Xlsx/Rels.php:240— Rels.writeWorksheetRelationships has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3, loops 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Calculation.convertMatrixReferences (cognitive 19) src/PhpSpreadsheet/Calculation/Calculation.php:1066— Calculation.convertMatrixReferences has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NonPeriodic.rate (cognitive 19) src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php:34— NonPeriodic.rate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2, boolean chains 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Concatenate.concatenate2Args (cognitive 19) src/PhpSpreadsheet/Calculation/TextData/Concatenate.php:94— Concatenate.concatenate2Args has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (5 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.
Html.processDomElementSpanEtc (cognitive 19) src/PhpSpreadsheet/Reader/Html.php:449— Html.processDomElementSpanEtc has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 2 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Xls.createFormulaFromTokens (cognitive 19) src/PhpSpreadsheet/Reader/Xls.php:4198— Xls.createFormulaFromTokens has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 3 (5 pts), match/switch 2 (5 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ConditionalStyles.readStyleRules (cognitive 19) src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php:232— ConditionalStyles.readStyleRules has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 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.
Date.excelToDateTimeObject (cognitive 19) src/PhpSpreadsheet/Shared/Date.php:197— Date.excelToDateTimeObject has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (5 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.
Date.isDateTimeFormatCode (cognitive 19) src/PhpSpreadsheet/Shared/Date.php:421— Date.isDateTimeFormatCode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (3 pts), ternaries 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.
ConditionalFormattingRuleExtension.parseExtLstXml (cognitive 19) src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php:51— ConditionalFormattingRuleExtension.parseExtLstXml has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Html.writeChartInCell (cognitive 19) src/PhpSpreadsheet/Writer/Html.php:836— Html.writeChartInCell has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 2 (4 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.
Html.generateTableTag (cognitive 19) src/PhpSpreadsheet/Writer/Html.php:1397— Html.generateTableTag has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (14 pts), if/else 4 (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.
Html.calculateSpans (cognitive 19) src/PhpSpreadsheet/Writer/Html.php:2160— Html.calculateSpans has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (7 pts), boolean chains 1, ternaries 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.
Parser.fact (cognitive 19) src/PhpSpreadsheet/Writer/Xls/Parser.php:1371— Parser.fact has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Parser.toReversePolish (cognitive 19) src/PhpSpreadsheet/Writer/Xls/Parser.php:1583— Parser.toReversePolish has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Xf.writeXf (cognitive 19) src/PhpSpreadsheet/Writer/Xls/Xf.php:107— Xf.writeXf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7, ternaries 7, boolean chains 5. 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.
Workbook.writeWorkbookProtection (cognitive 19) src/PhpSpreadsheet/Writer/Xlsx/Workbook.php:159— Workbook.writeWorkbookProtection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 3 (6 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.
Functions.ifCondition (cognitive 18) src/PhpSpreadsheet/Calculation/Functions.php:154— Functions.ifCondition has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Functions.flattenArrayIndexed (cognitive 18) src/PhpSpreadsheet/Calculation/Functions.php:291— Functions.flattenArrayIndexed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (9 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TorowTocol.byRow (cognitive 18) src/PhpSpreadsheet/Calculation/LookupRef/TorowTocol.php:70— TorowTocol.byRow has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 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.
Averages.modeCalc (cognitive 18) src/PhpSpreadsheet/Calculation/Statistical/Averages.php:226— Averages.modeCalc has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), 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.
JpGraphRendererBase.renderPlotLine (cognitive 18) src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:294— JpGraphRendererBase.renderPlotLine has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 3 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Csv.convertFormattedNumber (cognitive 18) src/PhpSpreadsheet/Reader/Csv.php:491— Csv.convertFormattedNumber has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 2 (7 pts), boolean chains 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Gnumeric.loadIntoExisting (cognitive 18) src/PhpSpreadsheet/Reader/Gnumeric.php:285— Gnumeric.loadIntoExisting has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ods.getBorderStyles (cognitive 18) src/PhpSpreadsheet/Reader/Ods.php:1819— Ods.getBorderStyles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 1 (4 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.
ListFunctions.listWorksheetInfo2 (cognitive 18) src/PhpSpreadsheet/Reader/Xls/ListFunctions.php:65— ListFunctions.listWorksheetInfo2 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 2 (5 pts), loops 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Xlsx.readRibbon (cognitive 18) src/PhpSpreadsheet/Reader/Xlsx.php:2339— Xlsx.readRibbon has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 1 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConditionalStyles.readConditionalsFromExt (cognitive 18) src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php:85— ConditionalStyles.readConditionalsFromExt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Root.calcSize (cognitive 18) src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:109— Root.calcSize has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 3 (6 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.
StringHelper.convertToString (cognitive 18) src/PhpSpreadsheet/Shared/StringHelper.php:739— StringHelper.convertToString has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (5 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Trend.calculate (cognitive 18) src/PhpSpreadsheet/Shared/Trend/Trend.php:55— Trend.calculate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Spreadsheet.getDefinedName (cognitive 18) src/PhpSpreadsheet/Spreadsheet.php:1043— Spreadsheet.getDefinedName has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Alignment.applyFromArray (cognitive 18) src/PhpSpreadsheet/Style/Alignment.php:201— Alignment.applyFromArray has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (18 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.
Formatter.splitFormatForSectionSelection (cognitive 18) src/PhpSpreadsheet/Style/NumberFormat/Formatter.php:53— Formatter.splitFormatForSectionSelection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1, match/switch 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.
Calculation.showValue (cognitive 17) src/PhpSpreadsheet/Calculation/Calculation.php:987— Calculation.showValue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 1 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArrayArgumentProcessor.evaluateVectorMatrixPair (cognitive 17) src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentProcessor.php:64— ArrayArgumentProcessor.evaluateVectorMatrixPair has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (12 pts), loops 2 (3 pts), if/else 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.
Periodic.rate (cognitive 17) src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/Periodic.php:32— Periodic.rate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Conditional.statementSwitch (cognitive 17) src/PhpSpreadsheet/Calculation/Logical/Conditional.php:89— Conditional.statementSwitch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (5 pts), 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.
Chart.readColor (cognitive 17) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1477— Chart.readColor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PageSetup.headerFooter (cognitive 17) src/PhpSpreadsheet/Reader/Xlsx/PageSetup.php:103— PageSetup.headerFooter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OLE.readPpsWks (cognitive 17) src/PhpSpreadsheet/Shared/OLE.php:298— OLE.readPpsWks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (5 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Html.extendRowsAndColumns (cognitive 17) src/PhpSpreadsheet/Writer/Html.php:694— Html.extendRowsAndColumns has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Content.writeRows (cognitive 17) src/PhpSpreadsheet/Writer/Ods/Content.php:169— Content.writeRows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, 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.
NamedExpressions.convertAddress (cognitive 17) src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php:83— NamedExpressions.convertAddress has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 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.
Xlsx.addPassThroughMediaFiles (cognitive 17) src/PhpSpreadsheet/Writer/Xlsx.php:966— Xlsx.addPassThroughMediaFiles has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Style.writeStyles (cognitive 17) src/PhpSpreadsheet/Writer/Xlsx/Style.php:25— Style.writeStyles has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 6 (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.
Calculation.validateBinaryOperand (cognitive 16) src/PhpSpreadsheet/Calculation/Calculation.php:2444— Calculation.validateBinaryOperand has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NonPeriodic.xirrBisection (cognitive 16) src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php:221— NonPeriodic.xirrBisection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, 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.
Deviations.kurtosis (cognitive 16) src/PhpSpreadsheet/Calculation/Statistical/Deviations.php:60— Deviations.kurtosis has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChiSquared.distributionLeftTail (cognitive 16) src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php:71— ChiSquared.distributionLeftTail has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 2 (4 pts), boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Format.NUMBERVALUE (cognitive 16) src/PhpSpreadsheet/Calculation/TextData/Format.php:311— Format.NUMBERVALUE has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Styles.readStyles (cognitive 16) src/PhpSpreadsheet/Reader/Gnumeric/Styles.php:102— Styles.readStyles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Html.loadProperties (cognitive 16) src/PhpSpreadsheet/Reader/Html.php:830— Html.loadProperties has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 2 (8 pts), if/else 3 (7 pts), loops 1 (nesting depth added 10). 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.
Ods.getFontStyles (cognitive 16) src/PhpSpreadsheet/Reader/Ods.php:1605— Ods.getFontStyles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Xls.getNextToken (cognitive 16) src/PhpSpreadsheet/Reader/Xls.php:4381— Xls.getNextToken has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (6 pts), error handling 2 (4 pts), if/else 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 8). 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.
Root.saveBigData (cognitive 16) src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:238— Root.saveBigData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Spreadsheet.addSheet (cognitive 16) src/PhpSpreadsheet/Spreadsheet.php:616— Spreadsheet.addSheet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Borders.applyFromArray (cognitive 16) src/PhpSpreadsheet/Style/Borders.php:176— Borders.applyFromArray 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.
Protection.isProtectionEnabled (cognitive 16) src/PhpSpreadsheet/Worksheet/Protection.php:130— Protection.isProtectionEnabled has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 16. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Worksheet.setSelectedCellsActivePane (cognitive 16) src/PhpSpreadsheet/Worksheet/Worksheet.php:3126— Worksheet.setSelectedCellsActivePane has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Html.generateHTMLHeader (cognitive 16) src/PhpSpreadsheet/Writer/Html.php:444— Html.generateHTMLHeader has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.convert (cognitive 16) src/PhpSpreadsheet/Writer/Xls/Parser.php:495— Parser.convert has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Worksheet.writeFormula (cognitive 16) src/PhpSpreadsheet/Writer/Xls/Worksheet.php:819— Worksheet.writeFormula has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worksheet.writeCFHeader (cognitive 16) src/PhpSpreadsheet/Writer/Xls/Worksheet.php:3196— Worksheet.writeCFHeader has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Chart.writeShadow (cognitive 16) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1770— Chart.writeShadow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worksheet.writeSheetPr (cognitive 16) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:213— Worksheet.writeSheetPr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 1 (2 pts), ternaries 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.
D22 · Internal API Consistency· Redundant factory methods with ambiguous null-handling semantics. `getInstance` likely throws or returns a default if no spreadsheet is provided, while `getInstanceOrNull` explicitly returns null. This forces consumers to guess which method to use based on error handling preferences rather than clear intent. · ×1
Redundant factory methods with ambiguous null-handling semantics. `getInstance` likely throws or returns a default if no spreadsheet is provided, while `getInstanceOrNull` explicitly returns null. This forces consumers to guess which method to use based on error handling preferences rather than clear intent. — Remove `getInstanceOrNull` and rely on `getInstance` with a clear contract (e.g., throw on null input), or remove `getInstance` and keep only `getInstanceOrNull` if null is a valid state. Alternatively, use a single `getInstance` that accepts an optional spreadsheet and returns `?self`. (signatures: Calculation.getInstance(spreadsheet: ?Spreadsheet): self | Calculation.getInstanceOrNull(spreadsheet: ?Spreadsheet): ?self)
D22 · Internal API Consistency· Duplicate configuration methods for global vs. instance state without clear distinction in naming convention. The prefix `Instance` is inconsistent with other methods like `setCalculationCacheEnabled` which likely applies to the instance but doesn't have an `Instance` prefix. This creates confusion about scope (global static state vs. instance state). · ×1
Duplicate configuration methods for global vs. instance state without clear distinction in naming convention. The prefix `Instance` is inconsistent with other methods like `setCalculationCacheEnabled` which likely applies to the instance but doesn't have an `Instance` prefix. This creates confusion about scope (global static state vs. instance state). — Unify naming. If these methods operate on the current instance, drop the `Instance` prefix. If they operate on a global/static configuration, use a `Global` prefix or move them to a dedicated `Configuration` class. Ensure consistency with other cache/pruning methods. (signatures: Calculation.setArrayReturnType(returnType: string): bool | Calculation.getArrayReturnType(): string | Calculation.setInstanceArrayReturnType(returnType: string): bool | Calculation.getInstanceArrayReturnType(): string)
D22 · Internal API Consistency· Inconsistent boolean configuration pattern. Some settings use `setXEnabled(bool)` (standard), while others provide separate `enableX()` and `disableX()` methods. This forces developers to remember which pattern applies to which feature. · ×1
Inconsistent boolean configuration pattern. Some settings use `setXEnabled(bool)` (standard), while others provide separate `enableX()` and `disableX()` methods. This forces developers to remember which pattern applies to which feature. — Standardize on `setXEnabled(bool)` for all boolean configuration options to reduce cognitive load and API surface area. (signatures: Calculation.enableCalculationCache() | Calculation.disableCalculationCache() | Calculation.setCalculationCacheEnabled(calculationCacheEnabled: bool): self)
D22 · Internal API Consistency· Same inconsistency as cache · ×1
Same inconsistency as cache: mixed boolean configuration patterns. `setBranchPruningEnabled` takes `mixed` (likely bool or truthy/falsy), while separate enable/disable methods exist. — Remove `enableBranchPruning` and `disableBranchPruning`, keeping only `setBranchPruningEnabled(bool)`. Also, fix the type hint from `mixed` to `bool` for clarity. (signatures: Calculation.enableBranchPruning() | Calculation.disableBranchPruning() | Calculation.setBranchPruningEnabled(enabled: mixed): self)
D22 · Internal API Consistency· Overlapping calculation methods with unclear distinction. `calculateFormula` and `calculateFormulaValue` have nearly identical signatures. The presence of a private/protected `_calculateFormulaValue` suggests refactoring debt or internal vs. external usage confusion. It is unclear when to use `calculateFormula` vs `calculateFormulaValue`. · ×1
Overlapping calculation methods with unclear distinction. `calculateFormula` and `calculateFormulaValue` have nearly identical signatures. The presence of a private/protected `_calculateFormulaValue` suggests refactoring debt or internal vs. external usage confusion. It is unclear when to use `calculateFormula` vs `calculateFormulaValue`. — Consolidate into a single public method `calculateFormula` (or `evaluateFormula`). Remove `calculateFormulaValue` if it is redundant, or clearly distinguish their purposes (e.g., one handles raw strings, the other handles parsed tokens) and document it. Remove the leading underscore method if it's just an internal implementation detail of the other. (signatures: Calculation.calculateFormula(formula: string, cellID: ?string, cell: ?Cell): mixed | Calculation.calculateFormulaValue(formula: string, cellID: ?string, cell: ?Cell, ignoreQuotePrefix: bool): mixed | Calculation._calculateFormulaValue(formula: string, cellID: ?string, cell: ?Cell, ignoreQuotePrefix: bool): mixed)
D4 · Code Duplication· Near-duplicate member family (4 members, 21 shared lines) · ×1
Near-duplicate member family (4 members, 21 shared lines) src/PhpSpreadsheet/Writer/Ods/Formula.php:97— src/PhpSpreadsheet/Writer/Ods/Formula.php:97-150 | src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php:85-136 | src/PhpSpreadsheet/Writer/Xls/Workbook.php:499-544 | src/PhpSpreadsheet/Writer/Xlsx/DefinedNames.php:196-241 — These 4 members are variants of one another: a block of 21 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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.
Near-duplicate member pair (145 shared lines) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:606— src/PhpSpreadsheet/Writer/Xlsx/Chart.php:606-819 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:829-1041 — These two members are variants of one another: 145 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 (70 shared lines) src/PhpSpreadsheet/Writer/Xls.php:581— src/PhpSpreadsheet/Writer/Xls.php:581-776 | src/PhpSpreadsheet/Writer/Xls.php:813-917 — These two members are variants of one another: 70 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 (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:158— src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:158-230 | src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:338-414 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (22 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (22 members, 50+ identical tokens) src/PhpSpreadsheet/Writer/Xlsx/Comments.php:29— src/PhpSpreadsheet/Writer/Xlsx/Comments.php:29-72 | src/PhpSpreadsheet/Writer/Xlsx/Comments.php:105-164 | src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:26-271 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:21-108 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:119-177 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:187-248 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:27-80 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:365-499 | src/PhpSpreadsheet/Writer/Xlsx/FeaturePropertyBag.php:13-64 | src/PhpSpreadsheet/Writer/Xlsx/Metadata.php:17-61 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:23-84 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:95-191 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:243-384 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:419-480 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:491-518 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:524-555 | src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php:19-45 | src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php:18-38 | src/PhpSpreadsheet/Writer/Xlsx/StringTable.php:72-108 | src/PhpSpreadsheet/Writer/Xlsx/Style.php:28-162 | src/PhpSpreadsheet/Writer/Xlsx/Table.php:23-113 | src/PhpSpreadsheet/Writer/Xlsx/Workbook.php:25-68 — These 22 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 22 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 22 times.
D4 · Code Duplication· Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (11 members, 50+ identical tokens) src/PhpSpreadsheet/Reader/Xls.php:2717— src/PhpSpreadsheet/Reader/Xls.php:2717-2748 | src/PhpSpreadsheet/Reader/Xls.php:2762-2849 | src/PhpSpreadsheet/Reader/Xls.php:2862-2903 | src/PhpSpreadsheet/Reader/Xls.php:2916-2945 | src/PhpSpreadsheet/Reader/Xls.php:2958-3073 | src/PhpSpreadsheet/Reader/Xls.php:3142-3189 | src/PhpSpreadsheet/Reader/Xls.php:3202-3231 | src/PhpSpreadsheet/Reader/Xls.php:3248-3285 | src/PhpSpreadsheet/Reader/Xls.php:3293-3318 | src/PhpSpreadsheet/Reader/Xls.php:3465-3493 | src/PhpSpreadsheet/Reader/Xls.php:3502-3515 — These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times.
D4 · Code Duplication· Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (10 members, 50+ identical tokens) src/PhpSpreadsheet/Calculation/Financial/Amortization.php:51— src/PhpSpreadsheet/Calculation/Financial/Amortization.php:51-99 | src/PhpSpreadsheet/Calculation/Financial/Amortization.php:136-190 | src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:50-86 | src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:117-140 | src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:173-217 | src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:248-274 | src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php:43-70 | src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php:102-129 | src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php:42-70 | src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php:103-148 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (8 members, 50+ identical tokens) src/PhpSpreadsheet/Reader/Xls.php:1140— src/PhpSpreadsheet/Reader/Xls.php:1140-1162 | src/PhpSpreadsheet/Reader/Xls.php:1433-1601 | src/PhpSpreadsheet/Reader/Xls.php:1609-1638 | src/PhpSpreadsheet/Reader/Xls.php:1646-1661 | src/PhpSpreadsheet/Reader/Xls.php:2419-2468 | src/PhpSpreadsheet/Reader/Xls.php:2581-2626 | src/PhpSpreadsheet/Reader/Xls.php:2641-2701 | src/PhpSpreadsheet/Reader/Xls.php:3523-3549 — These 8 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 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) src/PhpSpreadsheet/Calculation/Financial/Coupons.php:49— src/PhpSpreadsheet/Calculation/Financial/Coupons.php:49-74 | src/PhpSpreadsheet/Calculation/Financial/Coupons.php:108-141 | src/PhpSpreadsheet/Calculation/Financial/Coupons.php:175-202 | src/PhpSpreadsheet/Calculation/Financial/Coupons.php:238-253 | src/PhpSpreadsheet/Calculation/Financial/Coupons.php:288-309 | src/PhpSpreadsheet/Calculation/Financial/Coupons.php:345-360 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) src/PhpSpreadsheet/Calculation/Statistical/Distributions/F.php:35— src/PhpSpreadsheet/Calculation/Statistical/Distributions/F.php:35-72 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:63-80 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php:72-94 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Normal.php:38-59 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Weibull.php:34-55 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Duplicated block (83–89 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:614— src/PhpSpreadsheet/Writer/Xlsx/Chart.php:614-696 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:830-918 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xlsx/Chart.php:614` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (51–53 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:701— src/PhpSpreadsheet/Writer/Xlsx/Chart.php:701-751 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:925-977 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xlsx/Chart.php:701` 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 (31–33 lines × 3) src/PhpSpreadsheet/Reader/Xls/ListFunctions.php:20— src/PhpSpreadsheet/Reader/Xls/ListFunctions.php:20-50 | src/PhpSpreadsheet/Reader/Xls/ListFunctions.php:67-99 | src/PhpSpreadsheet/Reader/Xls/ListFunctions.php:176-208 — 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/PhpSpreadsheet/Reader/Xls/ListFunctions.php:20` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (29–30 lines × 2) src/PhpSpreadsheet/Writer/Xls.php:714— src/PhpSpreadsheet/Writer/Xls.php:714-742 | src/PhpSpreadsheet/Writer/Xls.php:856-885 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xls.php:714` it does not close everything it opens, so those 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/PhpSpreadsheet/Writer/Xls.php:743` calls `pack`, `elseif` and `src/PhpSpreadsheet/Writer/Xls.php:887` 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–28 lines × 2) src/PhpSpreadsheet/Writer/Xls/Parser.php:1386— src/PhpSpreadsheet/Writer/Xls/Parser.php:1386-1405 | src/PhpSpreadsheet/Writer/Xls/Parser.php:1419-1446 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Writer/Xls/Parser.php:1386` 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 (26 lines × 2) src/PhpSpreadsheet/Reader/Xlsx.php:1562— src/PhpSpreadsheet/Reader/Xlsx.php:1562-1587 | src/PhpSpreadsheet/Reader/Xlsx.php:1666-1691 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xlsx.php:1562` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 3) src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeParts.php:34— src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeParts.php:34-58 | src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeParts.php:80-104 | src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeParts.php:126-150 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (23 lines × 4) src/PhpSpreadsheet/Writer/Xlsx/Theme.php:88— src/PhpSpreadsheet/Writer/Xlsx/Theme.php:88-110 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:171-193 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:495-517 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:591-613 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (22 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Comments.php:119— src/PhpSpreadsheet/Writer/Xlsx/Comments.php:119-140 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:379-400 — before extracting anything, compare `src/PhpSpreadsheet/Writer/Xlsx/Comments.php` and `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 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 (16–21 lines × 12) src/PhpSpreadsheet/Writer/Xlsx/Theme.php:104— src/PhpSpreadsheet/Writer/Xlsx/Theme.php:104-119 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:126-141 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:148-163 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:187-202 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:209-224 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:231-246 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:274-289 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:511-526 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:533-553 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:560-575 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:607-622 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:629-644 — all 12 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 after the matched lines, `src/PhpSpreadsheet/Writer/Xlsx/Theme.php:165` calls `endElement` and `src/PhpSpreadsheet/Writer/Xlsx/Theme.php:122` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (21 lines × 3) src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php:88— src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php:88-108 | src/PhpSpreadsheet/Writer/Xls/Workbook.php:503-523 | src/PhpSpreadsheet/Writer/Xlsx/DefinedNames.php:200-220 — 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/PhpSpreadsheet/Writer/Ods/NamedExpressions.php:88` 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–20 lines × 3) src/PhpSpreadsheet/Reader/Xls/Biff8.php:174— src/PhpSpreadsheet/Reader/Xls/Biff8.php:174-192 | src/PhpSpreadsheet/Reader/Xls/Biff8.php:310-329 | src/PhpSpreadsheet/Reader/Xls/Biff8.php:340-359 — 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/PhpSpreadsheet/Reader/Xls/Biff8.php:174` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19–20 lines × 2) src/PhpSpreadsheet/Calculation/Calculation.php:1767— src/PhpSpreadsheet/Calculation/Calculation.php:1767-1786 | src/PhpSpreadsheet/Calculation/Calculation.php:1802-1820 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Calculation.php:1767` 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–19 lines × 11) src/PhpSpreadsheet/Reader/Xls.php:2717— src/PhpSpreadsheet/Reader/Xls.php:2717-2727 | src/PhpSpreadsheet/Reader/Xls.php:2762-2772 | src/PhpSpreadsheet/Reader/Xls.php:2862-2872 | src/PhpSpreadsheet/Reader/Xls.php:2916-2926 | src/PhpSpreadsheet/Reader/Xls.php:2958-2968 | src/PhpSpreadsheet/Reader/Xls.php:3142-3152 | src/PhpSpreadsheet/Reader/Xls.php:3202-3212 | src/PhpSpreadsheet/Reader/Xls.php:3248-3258 | src/PhpSpreadsheet/Reader/Xls.php:3293-3303 | src/PhpSpreadsheet/Reader/Xls.php:3465-3483 | src/PhpSpreadsheet/Reader/Xls.php:3502-3512 — all 11 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–19 lines × 3) src/PhpSpreadsheet/Writer/Xlsx/Theme.php:370— src/PhpSpreadsheet/Writer/Xlsx/Theme.php:370-388 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:400-418 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:430-440 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12–18 lines × 3) src/PhpSpreadsheet/Reader/Xls.php:752— src/PhpSpreadsheet/Reader/Xls.php:752-768 | src/PhpSpreadsheet/Reader/Xls.php:3895-3912 | src/PhpSpreadsheet/Reader/Xls/ConditionalFormatting.php:81-92 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8–17 lines × 8) src/PhpSpreadsheet/Reader/Xls.php:1140— src/PhpSpreadsheet/Reader/Xls.php:1140-1147 | src/PhpSpreadsheet/Reader/Xls.php:1433-1449 | src/PhpSpreadsheet/Reader/Xls.php:1609-1617 | src/PhpSpreadsheet/Reader/Xls.php:1646-1654 | src/PhpSpreadsheet/Reader/Xls.php:2419-2427 | src/PhpSpreadsheet/Reader/Xls.php:2581-2589 | src/PhpSpreadsheet/Reader/Xls.php:2641-2649 | src/PhpSpreadsheet/Reader/Xls.php:3523-3531 — all 8 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/PhpSpreadsheet/Reader/Xls.php:1140` it does not close everything it opens, so those 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/PhpSpreadsheet/Reader/Xls.php:2592` calls `getUInt2d` and `src/PhpSpreadsheet/Reader/Xls.php:2658` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16–17 lines × 2) src/PhpSpreadsheet/Writer/Xls.php:292— src/PhpSpreadsheet/Writer/Xls.php:292-308 | src/PhpSpreadsheet/Writer/Xls.php:353-368 — both copies are in the same file, so extract the 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–16 lines × 4) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:638— src/PhpSpreadsheet/Writer/Xlsx/Chart.php:638-646 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:714-729 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:856-865 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:938-953 — 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/PhpSpreadsheet/Writer/Xlsx/Chart.php:638` 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–16 lines × 2) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php:38— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php:38-44 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/HyperGeometric.php:34-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php:38` it does not close everything it opens, so those exact lines 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/PhpSpreadsheet/Style/Style.php:257— src/PhpSpreadsheet/Style/Style.php:257-267 | src/PhpSpreadsheet/Style/Style.php:269-284 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Style/Style.php:257` it does not close everything it opens, so those 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–16 lines × 2) src/PhpSpreadsheet/Writer/Ods/Styles.php:76— src/PhpSpreadsheet/Writer/Ods/Styles.php:76-84 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:467-482 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14–15 lines × 4) src/PhpSpreadsheet/Writer/Ods/Content.php:55— src/PhpSpreadsheet/Writer/Ods/Content.php:55-68 | src/PhpSpreadsheet/Writer/Ods/Meta.php:24-38 | src/PhpSpreadsheet/Writer/Ods/Settings.php:24-37 | src/PhpSpreadsheet/Writer/Ods/Styles.php:19-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Writer/Ods/Content.php:55` 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/PhpSpreadsheet/Writer/Ods/Content.php:68` calls `writeAttribute` and `src/PhpSpreadsheet/Writer/Ods/Meta.php:38` 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–15 lines × 2) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1059— src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1059-1073 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:417-430 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–14 lines × 5) src/PhpSpreadsheet/Writer/Ods/Content.php:53— src/PhpSpreadsheet/Writer/Ods/Content.php:53-65 | src/PhpSpreadsheet/Writer/Ods/Meta.php:22-35 | src/PhpSpreadsheet/Writer/Ods/MetaInf.php:26-38 | src/PhpSpreadsheet/Writer/Ods/Settings.php:22-34 | src/PhpSpreadsheet/Writer/Ods/Styles.php:17-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Writer/Ods/Meta.php:22` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PhpSpreadsheet/Writer/Ods/Meta.php:19` calls `getParentWriter`, `getSpreadsheet` and `src/PhpSpreadsheet/Writer/Ods/Content.php:51` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–14 lines × 2) src/PhpSpreadsheet/Writer/Ods/Settings.php:35— src/PhpSpreadsheet/Writer/Ods/Settings.php:35-43 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:266-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/PhpSpreadsheet/Writer/Ods/Settings.php:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–13 lines × 3) src/PhpSpreadsheet/Calculation/Engineering/BitWise.php:41— src/PhpSpreadsheet/Calculation/Engineering/BitWise.php:41-52 | src/PhpSpreadsheet/Calculation/Engineering/BitWise.php:73-85 | src/PhpSpreadsheet/Calculation/Engineering/BitWise.php:106-118 — 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–13 lines × 3) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1061— src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1061-1071 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:415-427 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:537-549 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:415` calls `startElement` and `src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1061` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12–13 lines × 2) src/PhpSpreadsheet/Calculation/Statistical/Size.php:25— src/PhpSpreadsheet/Calculation/Statistical/Size.php:25-36 | src/PhpSpreadsheet/Calculation/Statistical/Size.php:61-73 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/Statistical/Size.php:25` it does not close everything it opens, so those 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–12 lines × 9) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:631— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:631-636 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:649-654 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:757-762 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:859-864 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:897-902 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:928-933 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:973-978 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:997-1008 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1018-1026 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:997` 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 (10–12 lines × 3) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:629— src/PhpSpreadsheet/Writer/Xlsx/Chart.php:629-638 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:845-856 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1016-1027 — 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/PhpSpreadsheet/Writer/Xlsx/Chart.php:629` 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/PhpSpreadsheet/Worksheet/Worksheet.php:3019— src/PhpSpreadsheet/Worksheet/Worksheet.php:3019-3029 | src/PhpSpreadsheet/Worksheet/Worksheet.php:3044-3055 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Worksheet/Worksheet.php:3019` it does not close everything it opens, so those exact lines 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 × 18) src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:27— src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:27-37 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:22-32 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:120-130 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:194-204 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:33-43 | src/PhpSpreadsheet/Writer/Xlsx/FeaturePropertyBag.php:18-28 | src/PhpSpreadsheet/Writer/Xlsx/Metadata.php:22-32 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:24-34 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:96-106 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:244-254 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:426-436 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:492-502 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:525-535 | src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php:20-30 | src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php:19-29 | src/PhpSpreadsheet/Writer/Xlsx/StringTable.php:73-83 | src/PhpSpreadsheet/Writer/Xlsx/Style.php:29-39 | src/PhpSpreadsheet/Writer/Xlsx/Workbook.php:25-35 — there are 18 copies across 11 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 18 sites; resolving a subset leaves the remainder to drift apart. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PhpSpreadsheet/Writer/Xlsx/StringTable.php:69` calls `writeStringTable` and `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:29` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 5) src/PhpSpreadsheet/Reader/Xls.php:1511— src/PhpSpreadsheet/Reader/Xls.php:1511-1521 | src/PhpSpreadsheet/Reader/Xls.php:1527-1537 | src/PhpSpreadsheet/Reader/Xls.php:1543-1553 | src/PhpSpreadsheet/Reader/Xls.php:1559-1569 | src/PhpSpreadsheet/Reader/Xls.php:1575-1585 — 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/PhpSpreadsheet/Reader/Xls.php:1511` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 4) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:632— src/PhpSpreadsheet/Writer/Xlsx/Chart.php:632-641 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:753-763 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:849-859 | src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1020-1030 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10–11 lines × 3) src/PhpSpreadsheet/Reader/Xls/Biff8.php:142— src/PhpSpreadsheet/Reader/Xls/Biff8.php:142-151 | src/PhpSpreadsheet/Reader/Xls/Biff8.php:256-266 | src/PhpSpreadsheet/Reader/Xls/Biff8.php:271-281 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8–11 lines × 3) src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:150— src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:150-157 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:479-489 | src/PhpSpreadsheet/Writer/Xlsx/RichDataDrawing.php:92-101 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:492` calls `foreach`, `writeVMLHeaderFooterImage` and `src/PhpSpreadsheet/Writer/Xlsx/RichDataDrawing.php:103` 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–11 lines × 2) src/PhpSpreadsheet/Reader/Xls.php:1818— src/PhpSpreadsheet/Reader/Xls.php:1818-1827 | src/PhpSpreadsheet/Reader/Xls.php:1854-1864 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xls.php:1818` it does not close everything it opens, so those exact lines 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 × 8) src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:52— src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:52-61 | src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:117-126 | src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:174-183 | src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:248-257 | src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php:43-52 | src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php:102-111 | src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php:42-51 | src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php:104-113 — before extracting anything, compare `src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php` and `src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 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/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:52` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:184` calls `validateIssueDate` and `src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:62` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 6) src/PhpSpreadsheet/Calculation/Financial/Coupons.php:49— src/PhpSpreadsheet/Calculation/Financial/Coupons.php:49-58 | src/PhpSpreadsheet/Calculation/Financial/Coupons.php:108-117 | src/PhpSpreadsheet/Calculation/Financial/Coupons.php:175-184 | src/PhpSpreadsheet/Calculation/Financial/Coupons.php:238-247 | src/PhpSpreadsheet/Calculation/Financial/Coupons.php:288-297 | src/PhpSpreadsheet/Calculation/Financial/Coupons.php:345-354 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Calculation/Financial/Coupons.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.
Duplicated block (10 lines × 5) src/PhpSpreadsheet/Writer/Xlsx/Comments.php:131— src/PhpSpreadsheet/Writer/Xlsx/Comments.php:131-140 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:391-400 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:471-480 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:293-302 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:317-326 — before extracting anything, compare `src/PhpSpreadsheet/Writer/Xlsx/Comments.php` and `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Writer/Xlsx/Comments.php:141` calls `writeAttribute`, `startElement` and `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:481` 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 × 21) src/PhpSpreadsheet/Writer/Xlsx/Comments.php:29— src/PhpSpreadsheet/Writer/Xlsx/Comments.php:29-37 | src/PhpSpreadsheet/Writer/Xlsx/Comments.php:105-113 | src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:26-34 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:21-29 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:119-127 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:193-201 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:32-40 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:365-373 | src/PhpSpreadsheet/Writer/Xlsx/FeaturePropertyBag.php:17-25 | src/PhpSpreadsheet/Writer/Xlsx/Metadata.php:21-29 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:23-31 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:95-103 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:243-251 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:425-433 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:491-499 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:524-532 | src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php:19-27 | src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php:18-26 | src/PhpSpreadsheet/Writer/Xlsx/StringTable.php:72-80 | src/PhpSpreadsheet/Writer/Xlsx/Style.php:28-36 | src/PhpSpreadsheet/Writer/Xlsx/Table.php:23-31 — before extracting anything, compare `src/PhpSpreadsheet/Writer/Xlsx/Comments.php` and `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 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/PhpSpreadsheet/Writer/Xlsx/Table.php:35` calls `rangeWithRoomForData` and `src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:37` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 8) src/PhpSpreadsheet/Reader/Xls.php:1469— src/PhpSpreadsheet/Reader/Xls.php:1469-1477 | src/PhpSpreadsheet/Reader/Xls.php:1485-1493 | src/PhpSpreadsheet/Reader/Xls.php:1501-1509 | src/PhpSpreadsheet/Reader/Xls.php:1517-1525 | src/PhpSpreadsheet/Reader/Xls.php:1533-1541 | src/PhpSpreadsheet/Reader/Xls.php:1549-1557 | src/PhpSpreadsheet/Reader/Xls.php:1565-1573 | src/PhpSpreadsheet/Reader/Xls.php:1581-1589 — all 8 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/PhpSpreadsheet/Reader/Xls.php:1469` 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/PhpSpreadsheet/Writer/Ods/MetaInf.php:45— src/PhpSpreadsheet/Writer/Ods/MetaInf.php:45-52 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:149-156 | src/PhpSpreadsheet/Writer/Xlsx/RichDataDrawing.php:91-99 — before extracting anything, compare `src/PhpSpreadsheet/Writer/Ods/MetaInf.php` and `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 (9 lines × 3) src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1055— src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1055-1063 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:306-318 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:330-342 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Writer/Xlsx/Chart.php:1065` calls `startElement`, `writeAttribute` and `src/PhpSpreadsheet/Writer/Xlsx/Theme.php:320` 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–9 lines × 2) src/PhpSpreadsheet/Reader/Xls.php:2841— src/PhpSpreadsheet/Reader/Xls.php:2841-2848 | src/PhpSpreadsheet/Reader/Xls.php:3277-3285 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Reader/Xls.php:2841` 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 × 5) src/PhpSpreadsheet/Calculation/Financial/Amortization.php:52— src/PhpSpreadsheet/Calculation/Financial/Amortization.php:52-59 | src/PhpSpreadsheet/Calculation/Financial/Amortization.php:137-144 | src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:51-58 | src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:173-180 | src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php:103-110 — before extracting anything, compare `src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php` and `src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 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/PhpSpreadsheet/Calculation/Financial/Amortization.php:52` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:806— src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:806-813 | src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:830-837 | src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:854-861 — 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/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:806` 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/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:814` calls `getMidpointConditionalFormatValueObject`, `getMidpointColor`, `getARGB` and `src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:862` 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 × 2) src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:168— src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:168-175 | src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:347-353 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Shared/OLE/PPS/Root.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.
Duplicated block (6–7 lines × 15) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:628— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:628-633 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:646-651 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:708-713 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:738-743 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:754-759 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:772-777 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:856-861 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:898-903 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:929-934 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:943-948 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:958-963 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:974-979 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:999-1005 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1018-1023 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1044-1049 — all 15 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:999` 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/PhpSpreadsheet/Writer/Ods/Cell/Style.php:896` calls `writeElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:627` 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–7 lines × 2) src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php:66— src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php:66-72 | src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php:177-182 — both copies are in the same file, so extract the 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/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php:66` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 7) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:533— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:533-538 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:545-550 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:557-562 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:570-575 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:587-592 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:600-605 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:613-618 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:563` calls `writeAttribute` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:539` 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 × 6) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:662— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:662-667 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:674-679 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:722-727 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:796-801 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:815-820 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:835-840 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:822` calls `writeAttribute` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:803` 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/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1066— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1066-1071 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1096-1101 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1121-1126 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1149-1154 — 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/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1065` calls `WriteElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1120` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (3–6 lines × 3) src/PhpSpreadsheet/Writer/Pdf/Dompdf.php:32— src/PhpSpreadsheet/Writer/Pdf/Dompdf.php:32-37 | src/PhpSpreadsheet/Writer/Pdf/Mpdf.php:32-37 | src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php:59-61 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php:59` calls `getSheet`, `getSheetIndex`, `getPageSetup` and `src/PhpSpreadsheet/Writer/Pdf/Dompdf.php:32` 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 (4–5 lines × 3) src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:96— src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:96-100 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:104-107 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:111-115 — 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. 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/PhpSpreadsheet/Writer/Xlsx/Drawing.php:100` calls `writeElement`, `stringEmu` and `src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:107` 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 (59 lines × 2) src/PhpSpreadsheet/Collection/Memory/SimpleCache1.php:27— src/PhpSpreadsheet/Collection/Memory/SimpleCache1.php:27-85 | src/PhpSpreadsheet/Collection/Memory/SimpleCache3.php:20-78 — 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/PhpSpreadsheet/Collection/Memory/SimpleCache1.php:27` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 6) src/PhpSpreadsheet/Comment.php:293— src/PhpSpreadsheet/Comment.php:293-300 | src/PhpSpreadsheet/DefinedName.php:260-267 | src/PhpSpreadsheet/Style/Conditional.php:359-366 | src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php:238-245 | src/PhpSpreadsheet/Worksheet/HeaderFooter.php:443-450 | src/PhpSpreadsheet/Worksheet/Protection.php:465-472 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times.
Duplicated block (6 lines × 3) src/PhpSpreadsheet/Reader/Gnumeric.php:274— src/PhpSpreadsheet/Reader/Gnumeric.php:274-279 | src/PhpSpreadsheet/Reader/Ods.php:268-273 | src/PhpSpreadsheet/Reader/Xml.php:274-279 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7–9 lines × 2) samples/Chart33a/33_Chart_create_line_dateaxis.php:359— samples/Chart33a/33_Chart_create_line_dateaxis.php:359-367 | samples/Chart33a/33_Chart_create_line_dateaxis.php:375-381 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
P12 · CI test-gate honesty· Coverage collected but not gated · ×1
Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 82 significant file(s) lose their only recent owner: src/PhpSpreadsheet/Writer/Html.php, src/PhpSpreadsheet/Writer/Xlsx/Chart.php, src/PhpSpreadsheet/Reader/Xlsx/Chart.php, src/PhpSpreadsheet/Reader/Ods.php, src/PhpSpreadsheet/ReferenceHelper.php, src/PhpSpreadsheet/Writer/Ods/Cell/Style.php, src/PhpSpreadsheet/Reader/Html.php, src/PhpSpreadsheet/Worksheet/AutoFilter.php (+74 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 5 significant file(s) lose their only recent owner: src/PhpSpreadsheet/Reader/Xlsx/Sparklines.php, src/PhpSpreadsheet/Worksheet/PivotTable/PivotTable.php, src/PhpSpreadsheet/Worksheet/PivotTable/PivotCacheDefinition.php, src/PhpSpreadsheet/Worksheet/PivotTable/PivotField.php, src/PhpSpreadsheet/Worksheet/PivotTable/PivotFieldGroup.php. Pair on, review, or document these before any departure.
Documentation: no installation or build instructions README.md— The installation link points to readthedocs.io (https://phpspreadsheet.readthedocs.io/en/latest/#installation) rather than the current package repository. Update the install instructions to point to https://packagist.org/packages/phpoffice/phpspreadsheet or the Composer homepage.
Documentation: no usage examples README.md— The README does not show any working example of how to run PhpSpreadsheet. Add a short 'Hello World' example demonstrating instantiation and outputting a cell value, mirroring the faq's code fixes.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 4 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (92 single-owned of 369 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 369 of the 545 production source files in this repository met that bar). They are anonymized user #3 (2 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
REDACTED
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 142 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: src/PhpSpreadsheet/Calculation/Financial/Coupons.php, src/PhpSpreadsheet/Writer/Xls/Escher.php, src/PhpSpreadsheet/Calculation/Statistical/Trends.php, src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php, src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php, src/PhpSpreadsheet/Calculation/TextData/Extract.php, src/PhpSpreadsheet/Calculation/Engine/Operands/StructuredReference.php, src/PhpSpreadsheet/Shared/Xls.php (and 134 more) (147 orphaned of 369 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 369 of the 545 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
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.
README/code drift — README claims Patreon articles exist but the evidence shows no Patreon project — searched for: `Patreon`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
Skipped (documented): testIsRef tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsRefTest.php:14— Skipped with a documented reason — a deferral, not lazy debt: reported incomplete at run time by markTestIncomplete()
Skipped (documented): testLen tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HyperlinkTest.php:70— Skipped with a documented reason — a deferral, not lazy debt: reported incomplete at run time by markTestIncomplete()
Skipped (documented): testAboveCell tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectTest.php:177— Skipped with a documented reason — a deferral, not lazy debt: reported incomplete at run time by markTestIncomplete()
Skipped (documented): testMATCH tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatchTest.php:14— Skipped with a documented reason — a deferral, not lazy debt: reported incomplete at run time by markTestIncomplete()
Skipped (documented): testMATCHLibre tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatchTest.php:44— Skipped with a documented reason — a deferral, not lazy debt: reported incomplete at run time by markTestIncomplete()
Skipped (documented): testSUMIF2 tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumIfTest.php:17— Skipped with a documented reason — a deferral, not lazy debt: reported incomplete at run time by markTestIncomplete()
Skipped (documented): testTdotINVLocale tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TDotInvTest.php:38— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testLowerWithLocaleBoolean tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LeftTest.php:43— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testLowerWithLocaleBoolean tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LowerTest.php:34— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testMiddleWithLocaleBoolean tests/PhpSpreadsheetTests/Calculation/Functions/TextData/MidTest.php:49— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testLowerWithLocaleBoolean tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ProperTest.php:34— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testLowerWithLocaleBoolean tests/PhpSpreadsheetTests/Calculation/Functions/TextData/RightTest.php:43— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testLowerWithLocaleBoolean tests/PhpSpreadsheetTests/Calculation/Functions/TextData/UpperTest.php:34— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testWEBSERVICE tests/PhpSpreadsheetTests/Calculation/Functions/Web/WebServiceTest.php:32— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testTranslation tests/PhpSpreadsheetTests/Calculation/TranslationTest.php:37— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testUpdateValueInSpillageRangeCell tests/PhpSpreadsheetTests/Cell/CellArrayFormulaTest.php:55— Skipped with a documented reason — a deferral, not lazy debt: reported incomplete at run time by markTestIncomplete()
Skipped (documented): testGenerateDocuments tests/PhpSpreadsheetTests/DocumentGeneratorTest.php:174— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testCrlfFile tests/PhpSpreadsheetTests/Issue4521Test.php:38— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testEndings tests/PhpSpreadsheetTests/Reader/Csv/CsvLineEndingTest.php:28— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testNumberFormatNoConversion tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatLocaleTest.php:56— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testNumberValueConversion tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatLocaleTest.php:97— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testCanInsertImageGoodProtocolAllowedNoWhitelist tests/PhpSpreadsheetTests/Reader/Html/HtmlImage2Test.php:21— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testCanInsertImageGoodProtocolAllowedWhitelist tests/PhpSpreadsheetTests/Reader/Html/HtmlImage2Test.php:60— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testCantInsertImageNotFoundAllowed tests/PhpSpreadsheetTests/Reader/Html/HtmlImage2Test.php:105— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
Skipped (documented): testLoadXlsx tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceStdTest.php:69— Skipped with a documented reason — a deferral, not lazy debt: reported incomplete at run time by markTestIncomplete()
Outdated: maennchen/zipstream-php — `maennchen/zipstream-php` is locked at 3.1.2 but 3.2.2 is the current stable release on Packagist, and it already satisfies the `^2.1 || ^3.0` constraint declared in composer.json — so the lockfile is behind this repository's own declared range. Run `composer update maennchen/zipstream-php` and commit the updated composer.lock.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 11 file(s) — `src/PhpSpreadsheet/Calculation/Calculation.php`, `src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentProcessor.php`, `src/PhpSpreadsheet/Calculation/Statistical/Distributions/StudentT.php`, `src/PhpSpreadsheet/Calculation/TextData/Thai.php`, `src/PhpSpreadsheet/Helper/Html.php`, … (+6 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a0db61-deb0-7ad0-b8e0-ec664288a199 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 36 · Warnings: 1015 · Recommendations: 12 · Info: 67 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 26-09-2026 @ 01:43 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.