Public report of PHPOffice/PhpSpreadsheet, published 13 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 13 November 2026, 21:35 UTC · Survey ID cd_3dbbbc77015248549df899071739ddea
PHPOffice/PhpSpreadsheet
Measured 13 November 2026, 21:34 UTC, at code version 8bff520
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Down 3 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 140,888 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 2.3 person-years · Weakest lens: Maturity, 58
Findings by how serious they are
39 critical1226 serious237 minor
17 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
13 November 2026, 21:34 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
43of 43 dimensions measured by tools.
1489of 1502 findings point to an exact file and line, so you can open each one in the code. The other 13 concern the repository as a whole, such as missing documentation.
43dimensions across 5 lenses, read from 140,888 lines of product code in 1 project.
PHPOffice/PhpSpreadsheet falls short of our standard for production because four files are no longer known to anyone active in the project. It scores 67 out of 100 and is rated Adequate, and 35 of its 39 critical findings are security problems.
Maturity, at 58, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 7 points. Having someone learn and document the four files no active contributor knows comes next, worth about 3 points. Raising Maturity to 70 would lift the score to about 72.
Twenty-eight pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Four parts of the code are no longer understood by anyone working on it, and three secrets can leak from the build pipeline. Having someone learn the forgotten files, pinning each tool to an exact version and limiting each secret to its own step would close these risks. Setting a waiting period for automatic updates would fix the automatic dependency update that takes a new release at once, and the two passwords or keys in the code's history and the password or key in the code need replacing, with the old ones switched off.
The product code is 140,888 lines, about €340,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Maturity rose from 58 to 70, the lowest score rated Strong, the score would rise from 67 to about 72.
Code composition: what the lines of code are
Product code 51%Tests 49%
New since the last survey: 201 findings
These 201 critical or serious findings weren't in the previous survey, on 24 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
God Classes · MethodTooLong: Ods.load2 src/PhpSpreadsheet/Reader/Ods.php
Code Duplication · Members sharing a duplicated core (23 members, 50+ identical tokens) src/PhpSpreadsheet/Writer/Xlsx/ChartEx.php
Code Duplication · Members sharing a duplicated core (11 members, 50+ identical tokens) src/PhpSpreadsheet/Reader/Xls.php
Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) src/PhpSpreadsheet/Reader/Xls.php
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) src/PhpSpreadsheet/Reader/Xls.php
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) src/PhpSpreadsheet/Reader/Xls.php
Code Duplication · Edited copy of a member (105 corresponding lines) src/PhpSpreadsheet/Writer/Xls.php
Code Duplication · Edited copy of a member (70 corresponding lines) src/PhpSpreadsheet/Writer/Ods/Content.php
Code Duplication · Edited copy of a member (131 corresponding lines) src/PhpSpreadsheet/Reader/Xls.php
Code Duplication · Edited copy of a member (90 corresponding lines) src/PhpSpreadsheet/Reader/Xls/ListFunctions.php
Code Duplication · Edited copy of a member (40 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (74 corresponding lines) src/PhpSpreadsheet/Worksheet/Worksheet.php
Code Duplication · Edited copy of a member (34 corresponding lines) src/PhpSpreadsheet/Calculation/TextData/Extract.php
Code Duplication · Edited copies of one member (3 members, 35+ corresponding lines) src/PhpSpreadsheet/ReferenceHelper.php
Code Duplication · Edited copy of a member (24 corresponding lines) src/PhpSpreadsheet/Reader/Xlsx.php
Code Duplication · Edited copy of a member (35 corresponding lines) src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Cumulative.php
Code Duplication · Edited copy of a member (34 corresponding lines) src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php
Code Duplication · Edited copy of a member (30 corresponding lines) infra/LocaleGenerator.php
Code Duplication · Edited copy of a member (31 corresponding lines) src/PhpSpreadsheet/ReferenceHelper.php
Code Duplication · Edited copy of a member (20 corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php
Code Duplication · Edited copy of a member (30 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php
Code Duplication · Edited copy of a member (32 corresponding lines) src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php
Code Duplication · Edited copy of a member (30 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Variances.php
Code Duplication · Edited copies of one member (4 members, 18+ corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php
Code Duplication · Edited copy of a member (24 corresponding lines) src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php
Code Duplication · Edited copy of a member (20 corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php
Code Duplication · Edited copy of a member (24 corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php
Code Duplication · Edited copy of a member (22 corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php
Code Duplication · Edited copy of a member (21 corresponding lines) src/PhpSpreadsheet/Calculation/CalculationLocale.php
Code Duplication · Edited copy of a member (27 corresponding lines) src/PhpSpreadsheet/Calculation/Financial/Dollar.php
Code Duplication · Edited copy of a member (29 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Deviations.php
Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php
Code Duplication · Edited copy of a member (24 corresponding lines) src/PhpSpreadsheet/Calculation/TextData/Search.php
Code Duplication · Edited copy of a member (29 corresponding lines) src/PhpSpreadsheet/Reader/Html.php
Code Duplication · Edited copy of a member (21 corresponding lines) src/PhpSpreadsheet/Calculation/TextData/Replace.php
Code Duplication · Edited copy of a member (28 corresponding lines) src/PhpSpreadsheet/Shared/Xls.php
Code Duplication · Edited copy of a member (29 corresponding lines) src/PhpSpreadsheet/Worksheet/AutoFilter.php
Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php
Code Duplication · Edited copy of a member (15 corresponding lines) src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php
Code Duplication · Edited copy of a member (29 corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Round.php
Code Duplication · Edited copy of a member (34 corresponding lines) src/PhpSpreadsheet/Reader/Xlsx/Chart.php
Code Duplication · Edited copy of a member (18 corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php
Code Duplication · Edited copy of a member (25 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php
Code Duplication · Edited copy of a member (19 corresponding lines) src/PhpSpreadsheet/Reader/Gnumeric.php
Code Duplication · Edited copy of a member (23 corresponding lines) src/PhpSpreadsheet/Calculation/Financial/TreasuryBill.php
Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php
Code Duplication · Edited copy of a member (21 corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php
Code Duplication · Edited copy of a member (24 corresponding lines) src/PhpSpreadsheet/Worksheet/Worksheet.php
Code Duplication · Edited copy of a member (20 corresponding lines) src/PhpSpreadsheet/Worksheet/Worksheet.php
Code Duplication · Edited copy of a member (21 corresponding lines) src/PhpSpreadsheet/Calculation/Financial/Depreciation.php
Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic.php
Code Duplication · Edited copy of a member (26 corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/BesselI.php
Code Duplication · Edited copy of a member (17 corresponding lines) src/PhpSpreadsheet/Writer/Xlsx/Metadata.php
Code Duplication · Edited copy of a member (25 corresponding lines) src/PhpSpreadsheet/Reader/Xls.php
Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php
Code Duplication · Edited copy of a member (44 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Trends.php
Code Duplication · Edited copy of a member (12 corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php
Code Duplication · Edited copy of a member (25 corresponding lines) src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php
Code Duplication · Edited copy of a member (16 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Conditional.php
Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/BesselI.php
Code Duplication · Edited copy of a member (14 corresponding lines) src/PhpSpreadsheet/Shared/Drawing.php
Code Duplication · Edited copy of a member (23 corresponding lines) src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php
Code Duplication · Edited copy of a member (29 corresponding lines) src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php
Code Duplication · Edited copy of a member (17 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Trends.php
Code Duplication · Edited copy of a member (26 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Variances.php
Code Duplication · Edited copy of a member (13 corresponding lines) src/PhpSpreadsheet/ReferenceHelper.php
Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php
Code Duplication · Edited copy of a member (22 corresponding lines) src/PhpSpreadsheet/Calculation/TextData/Format.php
Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php
Code Duplication · Edited copy of a member (20 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
Code Duplication · Edited copy of a member (17 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php
Code Duplication · Edited copy of a member (19 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Size.php
Code Duplication · Edited copy of a member (18 corresponding lines) src/PhpSpreadsheet/Calculation/LookupRef/ChooseRowsEtc.php
Code Duplication · Edited copy of a member (18 corresponding lines) src/PhpSpreadsheet/ReferenceHelper.php
Code Duplication · Edited copy of a member (26 corresponding lines) src/PhpSpreadsheet/Writer/Xls/Worksheet.php
Code Duplication · Edited copy of a member (43 corresponding lines) src/PhpSpreadsheet/Reader/Ods.php
Code Duplication · Edited copy of a member (25 corresponding lines) src/PhpSpreadsheet/Reader/Xls/Biff5.php
Code Duplication · Edited copy of a member (19 corresponding lines) src/PhpSpreadsheet/Worksheet/Worksheet.php
Code Duplication · Edited copy of a member (10 corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php
Code Duplication · Edited copy of a member (14 corresponding lines) src/PhpSpreadsheet/Worksheet/AutoFilter.php
Code Duplication · Edited copy of a member (15 corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php
Code Duplication · Edited copy of a member (12 corresponding lines) src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php
Code Duplication · Edited copies of one member (4 members, 24+ corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Maximum.php
Code Duplication · Edited copy of a member (15 corresponding lines) src/PhpSpreadsheet/Worksheet/Worksheet.php
Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php
Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) src/PhpSpreadsheet/Calculation/DateTimeExcel/Days.php
Code Duplication · Edited copy of a member (12 corresponding lines) src/PhpSpreadsheet/Reader/Ods/DefinedNames.php
Code Duplication · Edited copy of a member (13 corresponding lines) src/PhpSpreadsheet/Writer/Xls/Worksheet.php
Code Duplication · Edited copy of a member (11 corresponding lines) infra/LocaleGenerator.php
Code Duplication · Edited copy of a member (19 corresponding lines) src/PhpSpreadsheet/Calculation/DateTimeExcel/DateParts.php
Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) src/PhpSpreadsheet/Calculation/TextData/Extract.php
Code Duplication · Edited copy of a member (16 corresponding lines) src/PhpSpreadsheet/Reader/Xls.php
Code Duplication · Edited copy of a member (19 corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Factorial.php
Code Duplication · Edited copies of one member (5 members, 14+ corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/BitWise.php
Code Duplication · Edited copy of a member (13 corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 48 findings
These 48 critical or serious findings were in the previous survey, on 24 October 2026, and are gone from this one.
€110,000 to €560,000, for 1,860 to 5,900 hours of work, about 2.3 person-years for 1 to 5 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.9 at a score of 67. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 140,888 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Record your significant design decisions.
Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €340,000 to build again, about 2.3 person-years of work. Its weakest lens is Maturity, at 58 (Adequate). Maturity is about how well the project explains and looks after itself, which decides whether a new developer, or a new supplier, can take over. Because the weakest lens counts most in the score, work on Maturity also moves the score most.
Based on: the rebuild estimate · the Maturity grade · how much each lens counts
What to do: Start with the Maturity actions in Top priorities.
If you do one thing first · First action
Record your significant design decisions. Of all the actions in this report, it raises the score most for the work it takes: about 7 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.5 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 14% on every change. The history of the code shows how much it changes: about 26,311 lines over the last 90 days, which is about 106,706 lines a year. At that pace, the extra work comes to an estimated 16.5 to 99.1 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
77 modules, with 159 dependencies between them. 2 loops run through 29 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 37 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
PhpSpreadsheet.Calculation.Token uses PhpSpreadsheet.Calculation.Engine, so a change to PhpSpreadsheet.Calculation.Engine can break PhpSpreadsheet.Calculation.Token, while a change to PhpSpreadsheet.Calculation.Token can't break PhpSpreadsheet.Calculation.Engine.
Position
Below the diagonal: PhpSpreadsheet.Calculation.Token uses a module listed above it, which is the healthy direction.
7→34 PhpSpreadsheet.Reader.Security uses PhpSpreadsheet.Readerpart of a loop✕
Connections
1 pair of types, where a type in PhpSpreadsheet.Reader.Security uses a type in PhpSpreadsheet.Reader.
PhpSpreadsheet.Reader.Security uses PhpSpreadsheet.Reader, so a change to PhpSpreadsheet.Reader can break PhpSpreadsheet.Reader.Security, while a change to PhpSpreadsheet.Reader.Security can't break PhpSpreadsheet.Reader.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8→12 PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer.BSE uses PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainerpart of a loop✕
Connections
1 pair of types, where a type in PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer.BSE uses a type in PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer.
PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer.BSE uses PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer, so a change to PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer can break PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer.BSE, while a change to PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer.BSE can't break PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→13 PhpSpreadsheet.Style.ConditionalFormatting uses PhpSpreadsheet.Stylepart of a loop✕
Connections
10 pairs of types, where a type in PhpSpreadsheet.Style.ConditionalFormatting uses a type in PhpSpreadsheet.Style.
PhpSpreadsheet.Style.ConditionalFormatting uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet.Style.ConditionalFormatting, while a change to PhpSpreadsheet.Style.ConditionalFormatting can't break PhpSpreadsheet.Style.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→21 PhpSpreadsheet.Style.ConditionalFormatting uses PhpSpreadsheet.Worksheetpart of a loop✕
Connections
3 pairs of types, where a type in PhpSpreadsheet.Style.ConditionalFormatting uses a type in PhpSpreadsheet.Worksheet.
PhpSpreadsheet.Style.ConditionalFormatting uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Style.ConditionalFormatting, while a change to PhpSpreadsheet.Style.ConditionalFormatting can't break PhpSpreadsheet.Worksheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→23 PhpSpreadsheet.Style.ConditionalFormatting uses PhpSpreadsheet.Cellpart of a loop✕
Connections
2 pairs of types, where a type in PhpSpreadsheet.Style.ConditionalFormatting uses a type in PhpSpreadsheet.Cell.
PhpSpreadsheet.Style.ConditionalFormatting uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheet.Style.ConditionalFormatting, while a change to PhpSpreadsheet.Style.ConditionalFormatting can't break PhpSpreadsheet.Cell.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→24 PhpSpreadsheet.Style.ConditionalFormatting uses PhpSpreadsheet.Calculationpart of a loop✕
Connections
1 pair of types, where a type in PhpSpreadsheet.Style.ConditionalFormatting uses a type in PhpSpreadsheet.Calculation.
PhpSpreadsheet.Style.ConditionalFormatting uses PhpSpreadsheet.Calculation, so a change to PhpSpreadsheet.Calculation can break PhpSpreadsheet.Style.ConditionalFormatting, while a change to PhpSpreadsheet.Style.ConditionalFormatting can't break PhpSpreadsheet.Calculation.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→14 PhpSpreadsheet.Worksheet.AutoFilter.Column uses PhpSpreadsheet.Worksheet.AutoFilterpart of a loop✕
Connections
1 pair of types, where a type in PhpSpreadsheet.Worksheet.AutoFilter.Column uses a type in PhpSpreadsheet.Worksheet.AutoFilter.
PhpSpreadsheet.Worksheet.AutoFilter.Column uses PhpSpreadsheet.Worksheet.AutoFilter, so a change to PhpSpreadsheet.Worksheet.AutoFilter can break PhpSpreadsheet.Worksheet.AutoFilter.Column, while a change to PhpSpreadsheet.Worksheet.AutoFilter.Column can't break PhpSpreadsheet.Worksheet.AutoFilter.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→21 PhpSpreadsheet.Worksheet.PivotTable uses PhpSpreadsheet.Worksheetpart of a loop✕
Connections
2 pairs of types, where a type in PhpSpreadsheet.Worksheet.PivotTable uses a type in PhpSpreadsheet.Worksheet.
PhpSpreadsheet.Worksheet.PivotTable uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Worksheet.PivotTable, while a change to PhpSpreadsheet.Worksheet.PivotTable can't break PhpSpreadsheet.Worksheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
1 pair of types, where a type in PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer uses a type in PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer.BSE.
PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer uses PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer.BSE, so a change to PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer.BSE can break PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer, while a change to PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer can't break PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer.BSE.
Position
Below the diagonal: PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer uses a module listed above it, which is the healthy direction.
12→17 PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer uses PhpSpreadsheet.Shared.Escher.DggContainerpart of a loop✕
Connections
1 pair of types, where a type in PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer uses a type in PhpSpreadsheet.Shared.Escher.DggContainer.
PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer uses PhpSpreadsheet.Shared.Escher.DggContainer, so a change to PhpSpreadsheet.Shared.Escher.DggContainer can break PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer, while a change to PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer can't break PhpSpreadsheet.Shared.Escher.DggContainer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Style uses PhpSpreadsheet.Style.ConditionalFormatting, so a change to PhpSpreadsheet.Style.ConditionalFormatting can break PhpSpreadsheet.Style, while a change to PhpSpreadsheet.Style can't break PhpSpreadsheet.Style.ConditionalFormatting.
Position
Below the diagonal: PhpSpreadsheet.Style uses a module listed above it, which is the healthy direction.
13→15 PhpSpreadsheet.Style uses PhpSpreadsheet.Chartpart of a loop✕
Connections
1 pair of types, where a type in PhpSpreadsheet.Style uses a type in PhpSpreadsheet.Chart.
PhpSpreadsheet.Style uses PhpSpreadsheet.Chart, so a change to PhpSpreadsheet.Chart can break PhpSpreadsheet.Style, while a change to PhpSpreadsheet.Style can't break PhpSpreadsheet.Chart.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→21 PhpSpreadsheet.Style uses PhpSpreadsheet.Worksheetpart of a loop✕
Connections
1 pair of types, where a type in PhpSpreadsheet.Style uses a type in PhpSpreadsheet.Worksheet.
PhpSpreadsheet.Style uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Style, while a change to PhpSpreadsheet.Style can't break PhpSpreadsheet.Worksheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→36 PhpSpreadsheet.Style uses PhpSpreadsheetpart of a loop✕
Connections
4 pairs of types, where a type in PhpSpreadsheet.Style uses a type in PhpSpreadsheet.
PhpSpreadsheet.Style uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Style, while a change to PhpSpreadsheet.Style can't break PhpSpreadsheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Worksheet.AutoFilter uses PhpSpreadsheet.Worksheet.AutoFilter.Column, so a change to PhpSpreadsheet.Worksheet.AutoFilter.Column can break PhpSpreadsheet.Worksheet.AutoFilter, while a change to PhpSpreadsheet.Worksheet.AutoFilter can't break PhpSpreadsheet.Worksheet.AutoFilter.Column.
Position
Below the diagonal: PhpSpreadsheet.Worksheet.AutoFilter uses a module listed above it, which is the healthy direction.
14→21 PhpSpreadsheet.Worksheet.AutoFilter uses PhpSpreadsheet.Worksheetpart of a loop✕
Connections
1 pair of types, where a type in PhpSpreadsheet.Worksheet.AutoFilter uses a type in PhpSpreadsheet.Worksheet.
PhpSpreadsheet.Worksheet.AutoFilter uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Worksheet.AutoFilter, while a change to PhpSpreadsheet.Worksheet.AutoFilter can't break PhpSpreadsheet.Worksheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Chart uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet.Chart, while a change to PhpSpreadsheet.Chart can't break PhpSpreadsheet.Style.
Position
Below the diagonal: PhpSpreadsheet.Chart uses a module listed above it, which is the healthy direction.
15→21 PhpSpreadsheet.Chart uses PhpSpreadsheet.Worksheetpart of a loop✕
Connections
7 pairs of types, where a type in PhpSpreadsheet.Chart uses a type in PhpSpreadsheet.Worksheet.
PhpSpreadsheet.Chart uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Chart, while a change to PhpSpreadsheet.Chart can't break PhpSpreadsheet.Worksheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→36 PhpSpreadsheet.Chart uses PhpSpreadsheetpart of a loop✕
Connections
2 pairs of types, where a type in PhpSpreadsheet.Chart uses a type in PhpSpreadsheet.
PhpSpreadsheet.Chart uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Chart, while a change to PhpSpreadsheet.Chart can't break PhpSpreadsheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Reader.Xls uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet.Reader.Xls, while a change to PhpSpreadsheet.Reader.Xls can't break PhpSpreadsheet.Style.
Position
Below the diagonal: PhpSpreadsheet.Reader.Xls uses a module listed above it, which is the healthy direction.
16→34 PhpSpreadsheet.Reader.Xls uses PhpSpreadsheet.Readerpart of a loop✕
Connections
6 pairs of types, where a type in PhpSpreadsheet.Reader.Xls uses a type in PhpSpreadsheet.Reader.
PhpSpreadsheet.Reader.Xls uses PhpSpreadsheet.Reader, so a change to PhpSpreadsheet.Reader can break PhpSpreadsheet.Reader.Xls, while a change to PhpSpreadsheet.Reader.Xls can't break PhpSpreadsheet.Reader.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16→36 PhpSpreadsheet.Reader.Xls uses PhpSpreadsheetpart of a loop✕
Connections
1 pair of types, where a type in PhpSpreadsheet.Reader.Xls uses a type in PhpSpreadsheet.
PhpSpreadsheet.Reader.Xls uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Reader.Xls, while a change to PhpSpreadsheet.Reader.Xls can't break PhpSpreadsheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Shared.Escher.DggContainer uses PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer, so a change to PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer can break PhpSpreadsheet.Shared.Escher.DggContainer, while a change to PhpSpreadsheet.Shared.Escher.DggContainer can't break PhpSpreadsheet.Shared.Escher.DggContainer.BstoreContainer.
Position
Below the diagonal: PhpSpreadsheet.Shared.Escher.DggContainer uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Worksheet.Drawing uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet.Worksheet.Drawing, while a change to PhpSpreadsheet.Worksheet.Drawing can't break PhpSpreadsheet.Style.
Position
Below the diagonal: PhpSpreadsheet.Worksheet.Drawing uses a module listed above it, which is the healthy direction.
18→36 PhpSpreadsheet.Worksheet.Drawing uses PhpSpreadsheetpart of a loop✕
Connections
1 pair of types, where a type in PhpSpreadsheet.Worksheet.Drawing uses a type in PhpSpreadsheet.
PhpSpreadsheet.Worksheet.Drawing uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Worksheet.Drawing, while a change to PhpSpreadsheet.Worksheet.Drawing can't break PhpSpreadsheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Worksheet.Table uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet.Worksheet.Table, while a change to PhpSpreadsheet.Worksheet.Table can't break PhpSpreadsheet.Style.
Position
Below the diagonal: PhpSpreadsheet.Worksheet.Table uses a module listed above it, which is the healthy direction.
19→21 PhpSpreadsheet.Worksheet.Table uses PhpSpreadsheet.Worksheetpart of a loop✕
Connections
3 pairs of types, where a type in PhpSpreadsheet.Worksheet.Table uses a type in PhpSpreadsheet.Worksheet.
PhpSpreadsheet.Worksheet.Table uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Worksheet.Table, while a change to PhpSpreadsheet.Worksheet.Table can't break PhpSpreadsheet.Worksheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
19→36 PhpSpreadsheet.Worksheet.Table uses PhpSpreadsheetpart of a loop✕
Connections
1 pair of types, where a type in PhpSpreadsheet.Worksheet.Table uses a type in PhpSpreadsheet.
PhpSpreadsheet.Worksheet.Table uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Worksheet.Table, while a change to PhpSpreadsheet.Worksheet.Table can't break PhpSpreadsheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Shared.Escher uses PhpSpreadsheet.Shared.Escher.DgContainer, so a change to PhpSpreadsheet.Shared.Escher.DgContainer can break PhpSpreadsheet.Shared.Escher, while a change to PhpSpreadsheet.Shared.Escher can't break PhpSpreadsheet.Shared.Escher.DgContainer.
Position
Below the diagonal: PhpSpreadsheet.Shared.Escher uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Shared.Escher uses PhpSpreadsheet.Shared.Escher.DggContainer, so a change to PhpSpreadsheet.Shared.Escher.DggContainer can break PhpSpreadsheet.Shared.Escher, while a change to PhpSpreadsheet.Shared.Escher can't break PhpSpreadsheet.Shared.Escher.DggContainer.
Position
Below the diagonal: PhpSpreadsheet.Shared.Escher uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Worksheet uses PhpSpreadsheet.Worksheet.Sparkline, so a change to PhpSpreadsheet.Worksheet.Sparkline can break PhpSpreadsheet.Worksheet, while a change to PhpSpreadsheet.Worksheet can't break PhpSpreadsheet.Worksheet.Sparkline.
Position
Below the diagonal: PhpSpreadsheet.Worksheet uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Worksheet uses PhpSpreadsheet.Worksheet.PivotTable, so a change to PhpSpreadsheet.Worksheet.PivotTable can break PhpSpreadsheet.Worksheet, while a change to PhpSpreadsheet.Worksheet can't break PhpSpreadsheet.Worksheet.PivotTable.
Position
Below the diagonal: PhpSpreadsheet.Worksheet uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Worksheet uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet.Worksheet, while a change to PhpSpreadsheet.Worksheet can't break PhpSpreadsheet.Style.
Position
Below the diagonal: PhpSpreadsheet.Worksheet uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Worksheet uses PhpSpreadsheet.Worksheet.AutoFilter, so a change to PhpSpreadsheet.Worksheet.AutoFilter can break PhpSpreadsheet.Worksheet, while a change to PhpSpreadsheet.Worksheet can't break PhpSpreadsheet.Worksheet.AutoFilter.
Position
Below the diagonal: PhpSpreadsheet.Worksheet uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Worksheet uses PhpSpreadsheet.Chart, so a change to PhpSpreadsheet.Chart can break PhpSpreadsheet.Worksheet, while a change to PhpSpreadsheet.Worksheet can't break PhpSpreadsheet.Chart.
Position
Below the diagonal: PhpSpreadsheet.Worksheet uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Worksheet uses PhpSpreadsheet.Worksheet.Drawing, so a change to PhpSpreadsheet.Worksheet.Drawing can break PhpSpreadsheet.Worksheet, while a change to PhpSpreadsheet.Worksheet can't break PhpSpreadsheet.Worksheet.Drawing.
Position
Below the diagonal: PhpSpreadsheet.Worksheet uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Worksheet uses PhpSpreadsheet.Worksheet.Table, so a change to PhpSpreadsheet.Worksheet.Table can break PhpSpreadsheet.Worksheet, while a change to PhpSpreadsheet.Worksheet can't break PhpSpreadsheet.Worksheet.Table.
Position
Below the diagonal: PhpSpreadsheet.Worksheet uses a module listed above it, which is the healthy direction.
21→22 PhpSpreadsheet.Worksheet uses PhpSpreadsheet.Collectionpart of a loop✕
Connections
2 pairs of types, where a type in PhpSpreadsheet.Worksheet uses a type in PhpSpreadsheet.Collection.
PhpSpreadsheet.Worksheet uses PhpSpreadsheet.Collection, so a change to PhpSpreadsheet.Collection can break PhpSpreadsheet.Worksheet, while a change to PhpSpreadsheet.Worksheet can't break PhpSpreadsheet.Collection.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
21→23 PhpSpreadsheet.Worksheet uses PhpSpreadsheet.Cellpart of a loop✕
Connections
7 pairs of types, where a type in PhpSpreadsheet.Worksheet uses a type in PhpSpreadsheet.Cell.
PhpSpreadsheet.Worksheet uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheet.Worksheet, while a change to PhpSpreadsheet.Worksheet can't break PhpSpreadsheet.Cell.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
21→36 PhpSpreadsheet.Worksheet uses PhpSpreadsheetpart of a loop✕
Connections
6 pairs of types, where a type in PhpSpreadsheet.Worksheet uses a type in PhpSpreadsheet.
PhpSpreadsheet.Worksheet uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Worksheet, while a change to PhpSpreadsheet.Worksheet can't break PhpSpreadsheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Collection uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Collection, while a change to PhpSpreadsheet.Collection can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet.Collection uses a module listed above it, which is the healthy direction.
22→23 PhpSpreadsheet.Collection uses PhpSpreadsheet.Cellpart of a loop✕
Connections
1 pair of types, where a type in PhpSpreadsheet.Collection uses a type in PhpSpreadsheet.Cell.
PhpSpreadsheet.Collection uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheet.Collection, while a change to PhpSpreadsheet.Collection can't break PhpSpreadsheet.Cell.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Cell uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet.Cell, while a change to PhpSpreadsheet.Cell can't break PhpSpreadsheet.Style.
Position
Below the diagonal: PhpSpreadsheet.Cell uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Cell uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Cell, while a change to PhpSpreadsheet.Cell can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet.Cell uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Cell uses PhpSpreadsheet.Collection, so a change to PhpSpreadsheet.Collection can break PhpSpreadsheet.Cell, while a change to PhpSpreadsheet.Cell can't break PhpSpreadsheet.Collection.
Position
Below the diagonal: PhpSpreadsheet.Cell uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Calculation uses PhpSpreadsheet.Calculation.Engine, so a change to PhpSpreadsheet.Calculation.Engine can break PhpSpreadsheet.Calculation, while a change to PhpSpreadsheet.Calculation can't break PhpSpreadsheet.Calculation.Engine.
Position
Below the diagonal: PhpSpreadsheet.Calculation uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Calculation uses PhpSpreadsheet.Calculation.Token, so a change to PhpSpreadsheet.Calculation.Token can break PhpSpreadsheet.Calculation, while a change to PhpSpreadsheet.Calculation can't break PhpSpreadsheet.Calculation.Token.
Position
Below the diagonal: PhpSpreadsheet.Calculation uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Calculation uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Calculation, while a change to PhpSpreadsheet.Calculation can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet.Calculation uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Calculation uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheet.Calculation, while a change to PhpSpreadsheet.Calculation can't break PhpSpreadsheet.Cell.
Position
Below the diagonal: PhpSpreadsheet.Calculation uses a module listed above it, which is the healthy direction.
24→36 PhpSpreadsheet.Calculation uses PhpSpreadsheetpart of a loop✕
Connections
3 pairs of types, where a type in PhpSpreadsheet.Calculation uses a type in PhpSpreadsheet.
PhpSpreadsheet.Calculation uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Calculation, while a change to PhpSpreadsheet.Calculation can't break PhpSpreadsheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Calculation.Engine.Operands uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Calculation.Engine.Operands, while a change to PhpSpreadsheet.Calculation.Engine.Operands can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet.Calculation.Engine.Operands uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Calculation.Engine.Operands uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheet.Calculation.Engine.Operands, while a change to PhpSpreadsheet.Calculation.Engine.Operands can't break PhpSpreadsheet.Cell.
Position
Below the diagonal: PhpSpreadsheet.Calculation.Engine.Operands uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Calculation.LookupRef uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Calculation.LookupRef, while a change to PhpSpreadsheet.Calculation.LookupRef can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet.Calculation.LookupRef uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Calculation.LookupRef uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheet.Calculation.LookupRef, while a change to PhpSpreadsheet.Calculation.LookupRef can't break PhpSpreadsheet.Cell.
Position
Below the diagonal: PhpSpreadsheet.Calculation.LookupRef uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.RichText uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet.RichText, while a change to PhpSpreadsheet.RichText can't break PhpSpreadsheet.Style.
Position
Below the diagonal: PhpSpreadsheet.RichText uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.RichText uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheet.RichText, while a change to PhpSpreadsheet.RichText can't break PhpSpreadsheet.Cell.
Position
Below the diagonal: PhpSpreadsheet.RichText uses a module listed above it, which is the healthy direction.
27→36 PhpSpreadsheet.RichText uses PhpSpreadsheetpart of a loop✕
Connections
1 pair of types, where a type in PhpSpreadsheet.RichText uses a type in PhpSpreadsheet.
PhpSpreadsheet.RichText uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.RichText, while a change to PhpSpreadsheet.RichText can't break PhpSpreadsheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Shared uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet.Shared, while a change to PhpSpreadsheet.Shared can't break PhpSpreadsheet.Style.
Position
Below the diagonal: PhpSpreadsheet.Shared uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Shared uses PhpSpreadsheet.Shared.Escher, so a change to PhpSpreadsheet.Shared.Escher can break PhpSpreadsheet.Shared, while a change to PhpSpreadsheet.Shared can't break PhpSpreadsheet.Shared.Escher.
Position
Below the diagonal: PhpSpreadsheet.Shared uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Shared uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Shared, while a change to PhpSpreadsheet.Shared can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet.Shared uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Shared uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheet.Shared, while a change to PhpSpreadsheet.Shared can't break PhpSpreadsheet.Cell.
Position
Below the diagonal: PhpSpreadsheet.Shared uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader.Xlsx uses PhpSpreadsheet.Document, so a change to PhpSpreadsheet.Document can break PhpSpreadsheet.Reader.Xlsx, while a change to PhpSpreadsheet.Reader.Xlsx can't break PhpSpreadsheet.Document.
Position
Below the diagonal: PhpSpreadsheet.Reader.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader.Xlsx uses PhpSpreadsheet.Worksheet.Sparkline, so a change to PhpSpreadsheet.Worksheet.Sparkline can break PhpSpreadsheet.Reader.Xlsx, while a change to PhpSpreadsheet.Reader.Xlsx can't break PhpSpreadsheet.Worksheet.Sparkline.
Position
Below the diagonal: PhpSpreadsheet.Reader.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader.Xlsx uses PhpSpreadsheet.Reader.Security, so a change to PhpSpreadsheet.Reader.Security can break PhpSpreadsheet.Reader.Xlsx, while a change to PhpSpreadsheet.Reader.Xlsx can't break PhpSpreadsheet.Reader.Security.
Position
Below the diagonal: PhpSpreadsheet.Reader.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader.Xlsx uses PhpSpreadsheet.Style.ConditionalFormatting, so a change to PhpSpreadsheet.Style.ConditionalFormatting can break PhpSpreadsheet.Reader.Xlsx, while a change to PhpSpreadsheet.Reader.Xlsx can't break PhpSpreadsheet.Style.ConditionalFormatting.
Position
Below the diagonal: PhpSpreadsheet.Reader.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader.Xlsx uses PhpSpreadsheet.Worksheet.PivotTable, so a change to PhpSpreadsheet.Worksheet.PivotTable can break PhpSpreadsheet.Reader.Xlsx, while a change to PhpSpreadsheet.Reader.Xlsx can't break PhpSpreadsheet.Worksheet.PivotTable.
Position
Below the diagonal: PhpSpreadsheet.Reader.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader.Xlsx uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet.Reader.Xlsx, while a change to PhpSpreadsheet.Reader.Xlsx can't break PhpSpreadsheet.Style.
Position
Below the diagonal: PhpSpreadsheet.Reader.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader.Xlsx uses PhpSpreadsheet.Worksheet.AutoFilter, so a change to PhpSpreadsheet.Worksheet.AutoFilter can break PhpSpreadsheet.Reader.Xlsx, while a change to PhpSpreadsheet.Reader.Xlsx can't break PhpSpreadsheet.Worksheet.AutoFilter.
Position
Below the diagonal: PhpSpreadsheet.Reader.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader.Xlsx uses PhpSpreadsheet.Chart, so a change to PhpSpreadsheet.Chart can break PhpSpreadsheet.Reader.Xlsx, while a change to PhpSpreadsheet.Reader.Xlsx can't break PhpSpreadsheet.Chart.
Position
Below the diagonal: PhpSpreadsheet.Reader.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader.Xlsx uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Reader.Xlsx, while a change to PhpSpreadsheet.Reader.Xlsx can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet.Reader.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader.Xlsx uses PhpSpreadsheet.RichText, so a change to PhpSpreadsheet.RichText can break PhpSpreadsheet.Reader.Xlsx, while a change to PhpSpreadsheet.Reader.Xlsx can't break PhpSpreadsheet.RichText.
Position
Below the diagonal: PhpSpreadsheet.Reader.Xlsx uses a module listed above it, which is the healthy direction.
29→34 PhpSpreadsheet.Reader.Xlsx uses PhpSpreadsheet.Readerpart of a loop✕
Connections
1 pair of types, where a type in PhpSpreadsheet.Reader.Xlsx uses a type in PhpSpreadsheet.Reader.
PhpSpreadsheet.Reader.Xlsx uses PhpSpreadsheet.Reader, so a change to PhpSpreadsheet.Reader can break PhpSpreadsheet.Reader.Xlsx, while a change to PhpSpreadsheet.Reader.Xlsx can't break PhpSpreadsheet.Reader.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
29→36 PhpSpreadsheet.Reader.Xlsx uses PhpSpreadsheetpart of a loop✕
Connections
2 pairs of types, where a type in PhpSpreadsheet.Reader.Xlsx uses a type in PhpSpreadsheet.
PhpSpreadsheet.Reader.Xlsx uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Reader.Xlsx, while a change to PhpSpreadsheet.Reader.Xlsx can't break PhpSpreadsheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Writer.Ods uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Writer.Ods, while a change to PhpSpreadsheet.Writer.Ods can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet.Writer.Ods uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Ods uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheet.Writer.Ods, while a change to PhpSpreadsheet.Writer.Ods can't break PhpSpreadsheet.Cell.
Position
Below the diagonal: PhpSpreadsheet.Writer.Ods uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Ods uses PhpSpreadsheet.Shared, so a change to PhpSpreadsheet.Shared can break PhpSpreadsheet.Writer.Ods, while a change to PhpSpreadsheet.Writer.Ods can't break PhpSpreadsheet.Shared.
Position
Below the diagonal: PhpSpreadsheet.Writer.Ods uses a module listed above it, which is the healthy direction.
30→35 PhpSpreadsheet.Writer.Ods uses PhpSpreadsheet.Writerpart of a loop✕
Connections
2 pairs of types, where a type in PhpSpreadsheet.Writer.Ods uses a type in PhpSpreadsheet.Writer.
PhpSpreadsheet.Writer.Ods uses PhpSpreadsheet.Writer, so a change to PhpSpreadsheet.Writer can break PhpSpreadsheet.Writer.Ods, while a change to PhpSpreadsheet.Writer.Ods can't break PhpSpreadsheet.Writer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
30→36 PhpSpreadsheet.Writer.Ods uses PhpSpreadsheetpart of a loop✕
Connections
7 pairs of types, where a type in PhpSpreadsheet.Writer.Ods uses a type in PhpSpreadsheet.
PhpSpreadsheet.Writer.Ods uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Writer.Ods, while a change to PhpSpreadsheet.Writer.Ods can't break PhpSpreadsheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Writer.Ods.Cell uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet.Writer.Ods.Cell, while a change to PhpSpreadsheet.Writer.Ods.Cell can't break PhpSpreadsheet.Style.
Position
Below the diagonal: PhpSpreadsheet.Writer.Ods.Cell uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Ods.Cell uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Writer.Ods.Cell, while a change to PhpSpreadsheet.Writer.Ods.Cell can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet.Writer.Ods.Cell uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Ods.Cell uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheet.Writer.Ods.Cell, while a change to PhpSpreadsheet.Writer.Ods.Cell can't break PhpSpreadsheet.Cell.
Position
Below the diagonal: PhpSpreadsheet.Writer.Ods.Cell uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Ods.Cell uses PhpSpreadsheet.Shared, so a change to PhpSpreadsheet.Shared can break PhpSpreadsheet.Writer.Ods.Cell, while a change to PhpSpreadsheet.Writer.Ods.Cell can't break PhpSpreadsheet.Shared.
Position
Below the diagonal: PhpSpreadsheet.Writer.Ods.Cell uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Xls uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet.Writer.Xls, while a change to PhpSpreadsheet.Writer.Xls can't break PhpSpreadsheet.Style.
Position
Below the diagonal: PhpSpreadsheet.Writer.Xls uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Xls uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Writer.Xls, while a change to PhpSpreadsheet.Writer.Xls can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet.Writer.Xls uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Xls uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheet.Writer.Xls, while a change to PhpSpreadsheet.Writer.Xls can't break PhpSpreadsheet.Cell.
Position
Below the diagonal: PhpSpreadsheet.Writer.Xls uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Xls uses PhpSpreadsheet.Shared, so a change to PhpSpreadsheet.Shared can break PhpSpreadsheet.Writer.Xls, while a change to PhpSpreadsheet.Writer.Xls can't break PhpSpreadsheet.Shared.
Position
Below the diagonal: PhpSpreadsheet.Writer.Xls uses a module listed above it, which is the healthy direction.
32→36 PhpSpreadsheet.Writer.Xls uses PhpSpreadsheetpart of a loop✕
Connections
3 pairs of types, where a type in PhpSpreadsheet.Writer.Xls uses a type in PhpSpreadsheet.
PhpSpreadsheet.Writer.Xls uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Writer.Xls, while a change to PhpSpreadsheet.Writer.Xls can't break PhpSpreadsheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Writer.Xlsx uses PhpSpreadsheet.Worksheet.Sparkline, so a change to PhpSpreadsheet.Worksheet.Sparkline can break PhpSpreadsheet.Writer.Xlsx, while a change to PhpSpreadsheet.Writer.Xlsx can't break PhpSpreadsheet.Worksheet.Sparkline.
Position
Below the diagonal: PhpSpreadsheet.Writer.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Xlsx uses PhpSpreadsheet.Style.ConditionalFormatting, so a change to PhpSpreadsheet.Style.ConditionalFormatting can break PhpSpreadsheet.Writer.Xlsx, while a change to PhpSpreadsheet.Writer.Xlsx can't break PhpSpreadsheet.Style.ConditionalFormatting.
Position
Below the diagonal: PhpSpreadsheet.Writer.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Xlsx uses PhpSpreadsheet.Worksheet.AutoFilter.Column, so a change to PhpSpreadsheet.Worksheet.AutoFilter.Column can break PhpSpreadsheet.Writer.Xlsx, while a change to PhpSpreadsheet.Writer.Xlsx can't break PhpSpreadsheet.Worksheet.AutoFilter.Column.
Position
Below the diagonal: PhpSpreadsheet.Writer.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Xlsx uses PhpSpreadsheet.Worksheet.PivotTable, so a change to PhpSpreadsheet.Worksheet.PivotTable can break PhpSpreadsheet.Writer.Xlsx, while a change to PhpSpreadsheet.Writer.Xlsx can't break PhpSpreadsheet.Worksheet.PivotTable.
Position
Below the diagonal: PhpSpreadsheet.Writer.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Xlsx uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet.Writer.Xlsx, while a change to PhpSpreadsheet.Writer.Xlsx can't break PhpSpreadsheet.Style.
Position
Below the diagonal: PhpSpreadsheet.Writer.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Xlsx uses PhpSpreadsheet.Worksheet.AutoFilter, so a change to PhpSpreadsheet.Worksheet.AutoFilter can break PhpSpreadsheet.Writer.Xlsx, while a change to PhpSpreadsheet.Writer.Xlsx can't break PhpSpreadsheet.Worksheet.AutoFilter.
Position
Below the diagonal: PhpSpreadsheet.Writer.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Xlsx uses PhpSpreadsheet.Chart, so a change to PhpSpreadsheet.Chart can break PhpSpreadsheet.Writer.Xlsx, while a change to PhpSpreadsheet.Writer.Xlsx can't break PhpSpreadsheet.Chart.
Position
Below the diagonal: PhpSpreadsheet.Writer.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Xlsx uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Writer.Xlsx, while a change to PhpSpreadsheet.Writer.Xlsx can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet.Writer.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Xlsx uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheet.Writer.Xlsx, while a change to PhpSpreadsheet.Writer.Xlsx can't break PhpSpreadsheet.Cell.
Position
Below the diagonal: PhpSpreadsheet.Writer.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Xlsx uses PhpSpreadsheet.RichText, so a change to PhpSpreadsheet.RichText can break PhpSpreadsheet.Writer.Xlsx, while a change to PhpSpreadsheet.Writer.Xlsx can't break PhpSpreadsheet.RichText.
Position
Below the diagonal: PhpSpreadsheet.Writer.Xlsx uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer.Xlsx uses PhpSpreadsheet.Shared, so a change to PhpSpreadsheet.Shared can break PhpSpreadsheet.Writer.Xlsx, while a change to PhpSpreadsheet.Writer.Xlsx can't break PhpSpreadsheet.Shared.
Position
Below the diagonal: PhpSpreadsheet.Writer.Xlsx uses a module listed above it, which is the healthy direction.
33→35 PhpSpreadsheet.Writer.Xlsx uses PhpSpreadsheet.Writerpart of a loop✕
Connections
2 pairs of types, where a type in PhpSpreadsheet.Writer.Xlsx uses a type in PhpSpreadsheet.Writer.
PhpSpreadsheet.Writer.Xlsx uses PhpSpreadsheet.Writer, so a change to PhpSpreadsheet.Writer can break PhpSpreadsheet.Writer.Xlsx, while a change to PhpSpreadsheet.Writer.Xlsx can't break PhpSpreadsheet.Writer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
33→36 PhpSpreadsheet.Writer.Xlsx uses PhpSpreadsheetpart of a loop✕
Connections
15 pairs of types, where a type in PhpSpreadsheet.Writer.Xlsx uses a type in PhpSpreadsheet.
PhpSpreadsheet.Writer.Xlsx uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Writer.Xlsx, while a change to PhpSpreadsheet.Writer.Xlsx can't break PhpSpreadsheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Reader uses PhpSpreadsheet.Reader.Security, so a change to PhpSpreadsheet.Reader.Security can break PhpSpreadsheet.Reader, while a change to PhpSpreadsheet.Reader can't break PhpSpreadsheet.Reader.Security.
Position
Below the diagonal: PhpSpreadsheet.Reader uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet.Reader, while a change to PhpSpreadsheet.Reader can't break PhpSpreadsheet.Style.
Position
Below the diagonal: PhpSpreadsheet.Reader uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader uses PhpSpreadsheet.Reader.Xls, so a change to PhpSpreadsheet.Reader.Xls can break PhpSpreadsheet.Reader, while a change to PhpSpreadsheet.Reader can't break PhpSpreadsheet.Reader.Xls.
Position
Below the diagonal: PhpSpreadsheet.Reader uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Reader, while a change to PhpSpreadsheet.Reader can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet.Reader uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheet.Reader, while a change to PhpSpreadsheet.Reader can't break PhpSpreadsheet.Cell.
Position
Below the diagonal: PhpSpreadsheet.Reader uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader uses PhpSpreadsheet.RichText, so a change to PhpSpreadsheet.RichText can break PhpSpreadsheet.Reader, while a change to PhpSpreadsheet.Reader can't break PhpSpreadsheet.RichText.
Position
Below the diagonal: PhpSpreadsheet.Reader uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader uses PhpSpreadsheet.Reader.Xlsx, so a change to PhpSpreadsheet.Reader.Xlsx can break PhpSpreadsheet.Reader, while a change to PhpSpreadsheet.Reader can't break PhpSpreadsheet.Reader.Xlsx.
Position
Below the diagonal: PhpSpreadsheet.Reader uses a module listed above it, which is the healthy direction.
34→36 PhpSpreadsheet.Reader uses PhpSpreadsheetpart of a loop✕
Connections
13 pairs of types, where a type in PhpSpreadsheet.Reader uses a type in PhpSpreadsheet.
PhpSpreadsheet.Reader uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Reader, while a change to PhpSpreadsheet.Reader can't break PhpSpreadsheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet.Writer uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet.Writer, while a change to PhpSpreadsheet.Writer can't break PhpSpreadsheet.Style.
Position
Below the diagonal: PhpSpreadsheet.Writer uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer uses PhpSpreadsheet.Chart, so a change to PhpSpreadsheet.Chart can break PhpSpreadsheet.Writer, while a change to PhpSpreadsheet.Writer can't break PhpSpreadsheet.Chart.
Position
Below the diagonal: PhpSpreadsheet.Writer uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer uses PhpSpreadsheet.Shared.Escher.DggContainer, so a change to PhpSpreadsheet.Shared.Escher.DggContainer can break PhpSpreadsheet.Writer, while a change to PhpSpreadsheet.Writer can't break PhpSpreadsheet.Shared.Escher.DggContainer.
Position
Below the diagonal: PhpSpreadsheet.Writer uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Writer, while a change to PhpSpreadsheet.Writer can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet.Writer uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheet.Writer, while a change to PhpSpreadsheet.Writer can't break PhpSpreadsheet.Cell.
Position
Below the diagonal: PhpSpreadsheet.Writer uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer uses PhpSpreadsheet.RichText, so a change to PhpSpreadsheet.RichText can break PhpSpreadsheet.Writer, while a change to PhpSpreadsheet.Writer can't break PhpSpreadsheet.RichText.
Position
Below the diagonal: PhpSpreadsheet.Writer uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer uses PhpSpreadsheet.Writer.Ods, so a change to PhpSpreadsheet.Writer.Ods can break PhpSpreadsheet.Writer, while a change to PhpSpreadsheet.Writer can't break PhpSpreadsheet.Writer.Ods.
Position
Below the diagonal: PhpSpreadsheet.Writer uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer uses PhpSpreadsheet.Writer.Xls, so a change to PhpSpreadsheet.Writer.Xls can break PhpSpreadsheet.Writer, while a change to PhpSpreadsheet.Writer can't break PhpSpreadsheet.Writer.Xls.
Position
Below the diagonal: PhpSpreadsheet.Writer uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Writer uses PhpSpreadsheet.Writer.Xlsx, so a change to PhpSpreadsheet.Writer.Xlsx can break PhpSpreadsheet.Writer, while a change to PhpSpreadsheet.Writer can't break PhpSpreadsheet.Writer.Xlsx.
Position
Below the diagonal: PhpSpreadsheet.Writer uses a module listed above it, which is the healthy direction.
35→36 PhpSpreadsheet.Writer uses PhpSpreadsheetpart of a loop✕
Connections
9 pairs of types, where a type in PhpSpreadsheet.Writer uses a type in PhpSpreadsheet.
PhpSpreadsheet.Writer uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Writer, while a change to PhpSpreadsheet.Writer can't break PhpSpreadsheet.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PhpSpreadsheet uses PhpSpreadsheet.Document, so a change to PhpSpreadsheet.Document can break PhpSpreadsheet, while a change to PhpSpreadsheet can't break PhpSpreadsheet.Document.
Position
Below the diagonal: PhpSpreadsheet uses a module listed above it, which is the healthy direction.
PhpSpreadsheet uses PhpSpreadsheet.Style, so a change to PhpSpreadsheet.Style can break PhpSpreadsheet, while a change to PhpSpreadsheet can't break PhpSpreadsheet.Style.
Position
Below the diagonal: PhpSpreadsheet uses a module listed above it, which is the healthy direction.
PhpSpreadsheet uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet, while a change to PhpSpreadsheet can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet uses a module listed above it, which is the healthy direction.
PhpSpreadsheet uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheet, while a change to PhpSpreadsheet can't break PhpSpreadsheet.Cell.
Position
Below the diagonal: PhpSpreadsheet uses a module listed above it, which is the healthy direction.
PhpSpreadsheet uses PhpSpreadsheet.Calculation, so a change to PhpSpreadsheet.Calculation can break PhpSpreadsheet, while a change to PhpSpreadsheet can't break PhpSpreadsheet.Calculation.
Position
Below the diagonal: PhpSpreadsheet uses a module listed above it, which is the healthy direction.
PhpSpreadsheet uses PhpSpreadsheet.RichText, so a change to PhpSpreadsheet.RichText can break PhpSpreadsheet, while a change to PhpSpreadsheet can't break PhpSpreadsheet.RichText.
Position
Below the diagonal: PhpSpreadsheet uses a module listed above it, which is the healthy direction.
PhpSpreadsheet uses PhpSpreadsheet.Reader, so a change to PhpSpreadsheet.Reader can break PhpSpreadsheet, while a change to PhpSpreadsheet can't break PhpSpreadsheet.Reader.
Position
Below the diagonal: PhpSpreadsheet uses a module listed above it, which is the healthy direction.
PhpSpreadsheet uses PhpSpreadsheet.Writer, so a change to PhpSpreadsheet.Writer can break PhpSpreadsheet, while a change to PhpSpreadsheet can't break PhpSpreadsheet.Writer.
Position
Below the diagonal: PhpSpreadsheet uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Helper uses PhpSpreadsheet.Chart, so a change to PhpSpreadsheet.Chart can break PhpSpreadsheet.Helper, while a change to PhpSpreadsheet.Helper can't break PhpSpreadsheet.Chart.
Position
Below the diagonal: PhpSpreadsheet.Helper uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Helper uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Helper, while a change to PhpSpreadsheet.Helper can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet.Helper uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Helper uses PhpSpreadsheet.RichText, so a change to PhpSpreadsheet.RichText can break PhpSpreadsheet.Helper, while a change to PhpSpreadsheet.Helper can't break PhpSpreadsheet.RichText.
Position
Below the diagonal: PhpSpreadsheet.Helper uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Helper uses PhpSpreadsheet.Writer, so a change to PhpSpreadsheet.Writer can break PhpSpreadsheet.Helper, while a change to PhpSpreadsheet.Helper can't break PhpSpreadsheet.Writer.
Position
Below the diagonal: PhpSpreadsheet.Helper uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Helper uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Helper, while a change to PhpSpreadsheet.Helper can't break PhpSpreadsheet.
Position
Below the diagonal: PhpSpreadsheet.Helper uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader.Ods uses PhpSpreadsheet.Document, so a change to PhpSpreadsheet.Document can break PhpSpreadsheet.Reader.Ods, while a change to PhpSpreadsheet.Reader.Ods can't break PhpSpreadsheet.Document.
Position
Below the diagonal: PhpSpreadsheet.Reader.Ods uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader.Ods uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheet.Reader.Ods, while a change to PhpSpreadsheet.Reader.Ods can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheet.Reader.Ods uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader.Ods uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Reader.Ods, while a change to PhpSpreadsheet.Reader.Ods can't break PhpSpreadsheet.
Position
Below the diagonal: PhpSpreadsheet.Reader.Ods uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader.Xml uses PhpSpreadsheet.Document, so a change to PhpSpreadsheet.Document can break PhpSpreadsheet.Reader.Xml, while a change to PhpSpreadsheet.Reader.Xml can't break PhpSpreadsheet.Document.
Position
Below the diagonal: PhpSpreadsheet.Reader.Xml uses a module listed above it, which is the healthy direction.
PhpSpreadsheet.Reader.Xml uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheet.Reader.Xml, while a change to PhpSpreadsheet.Reader.Xml can't break PhpSpreadsheet.
Position
Below the diagonal: PhpSpreadsheet.Reader.Xml uses a module listed above it, which is the healthy direction.
PhpSpreadsheetInfra uses PhpSpreadsheet.Worksheet, so a change to PhpSpreadsheet.Worksheet can break PhpSpreadsheetInfra, while a change to PhpSpreadsheetInfra can't break PhpSpreadsheet.Worksheet.
Position
Below the diagonal: PhpSpreadsheetInfra uses a module listed above it, which is the healthy direction.
PhpSpreadsheetInfra uses PhpSpreadsheet.Cell, so a change to PhpSpreadsheet.Cell can break PhpSpreadsheetInfra, while a change to PhpSpreadsheetInfra can't break PhpSpreadsheet.Cell.
Position
Below the diagonal: PhpSpreadsheetInfra uses a module listed above it, which is the healthy direction.
PhpSpreadsheetInfra uses PhpSpreadsheet, so a change to PhpSpreadsheet can break PhpSpreadsheetInfra, while a change to PhpSpreadsheetInfra can't break PhpSpreadsheet.
Position
Below the diagonal: PhpSpreadsheetInfra uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 74% · Adequate · gated by D2 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
34
High / Critical
A07:2025 — Authentication Failures
4
High / Critical
A03:2025 — Software Supply Chain Failures
3
Medium
Roadmap
Top priorities: Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them; Resolve the 127 Orphaned file finding(s) in Knowledge Freshness — start with Fill.php (2), DefinedNames.php (2), Conditional.php (2); Resolve the 4 Orphaned knowledge finding(s) in Knowledge Freshness — start with ConvertUOM.php, JpGraphRendererBase.php, Theme.php.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Code Duplication: Edited copy of a member (17 corresponding lines)
src/PhpSpreadsheet/Reader/Xlsx.php
6.0
Mixed
Explicit Debt: TodoComment
src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php
6.0
Mixed
Explicit Debt: TodoComment
src/PhpSpreadsheet/Reader/Xlsx/Chart.php
6.0
Mixed
Explicit Debt: TodoComment
src/PhpSpreadsheet/Writer/Xlsx/Chart.php
6.0
Mixed
Explicit Debt: TodoComment
src/PhpSpreadsheet/Reader/Xls.php
6.0
Mixed
Explicit Debt: TodoComment
src/PhpSpreadsheet/Writer/Xls/Worksheet.php
6.0
Mixed
Explicit Debt: FixmeComment
src/PhpSpreadsheet/Writer/Xls/Parser.php
6.0
Mixed
Explicit Debt: TodoComment
src/PhpSpreadsheet/Reader/Html.php
6.0
Mixed
Explicit Debt: TodoComment
src/PhpSpreadsheet/Writer/Xls/Escher.php
6.0
Mixed
Explicit Debt: TodoComment
src/PhpSpreadsheet/Reader/Xml/DataValidations.php
6.0
Mixed
Explicit Debt: FixmeComment
src/PhpSpreadsheet/Writer/Xls/Workbook.php
6.0
Mixed
Explicit Debt: FixmeComment
src/PhpSpreadsheet/Shared/Font.php
6.0
Mixed
Explicit Debt: XxxComment
src/PhpSpreadsheet/Writer/Ods/Cell/Style.php
6.0
Mixed
Explicit Debt: TodoComment
How the grades work
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 39
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 — 1226
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 — 237
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 17
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 43 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 43 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1489 of 1502 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT 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.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.php) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (141046 LoC, 598 module-visible types across 94 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `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.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check 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.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's PHP is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's PHP is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's PHP is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
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").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
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.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
125 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Xlsx.loadSpreadsheetFromFile at 322. 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.
+ 120 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 240 down to 240 or less in Cyclomatic Complexity — start with Xlsx.loadSpreadsheetFromFile (cyclomatic 322). — Refactoring it lifts Cyclomatic Complexity from 4.8 to about 5.1/10.
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.
+ 232 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 15 bodies over 120 down to 120 or less in Cognitive Complexity — start with Xlsx.loadSpreadsheetFromFile (cognitive 1798), Calculation.processTokenStack (cognitive 636), Xml.loadIntoExisting (cognitive 370). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 15 together lifts Cognitive Complexity from 2.0 to about 4.0/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.4 / 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).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
270 duplicated block group(s) detected. 7.6 % of the production lines (10,739 of 140,888) are in a reported copy. A further 185 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 3 of the 455 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 164 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
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 18 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 (18 warning-level).
Resolve the 14 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with Style.php (5), Calculation.php (2), MatrixFunctions.php. — One of this dimension's main actionable groups (14 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 22 Low cohesion finding(s) in Cohesion (LCOM4) — start with Chart.php, Worksheet.php, Layout.php. — One of this dimension's main actionable groups (22 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality9.3 / 10Stronggated by 176 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.
68 skipped (68 with a documented reason), 176 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 3838 tests.
No assertions: testACCRINTM · ×176tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AccrintMTest.php:10
Resolve the 176 No assertions finding(s) in Test Quality — start with Sec36jjTest.php (9), CountTest.php (4), PriceTest.php (2). — One of this dimension's main actionable groups (176 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
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: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 6 locked Composer package(s) use a banned license. Licences were read from this repository's composer.lock, which records the `license` each package declares, over every package in its production `packages` list, direct and transitive, at the locked version; the 89 package(s) under `packages-dev` are not installed for a consumer and are excluded.
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 16 Hotspot finding(s) in Churn × Complexity Hotspots — start with Xlsx.php (2), Ods.php, Calculation.php. — One of this dimension's main actionable groups (16 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.9 / 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.
78 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/PhpSpreadsheet/Writer/Xlsx/Chart.php. Counted over 373 of the 552 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 · ×3
Further sole-owners (lower concentration)
What to do
Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 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 140888 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 Parser.php (2), LoadSpreadsheet.php (2), Workbook.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).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
45 % 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.
2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 High secret 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).
34 finding(s): 0 critical, 32 high, 2 medium, 0 low. 28 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 21 file(s) — `samples/Basic5/55_DefinedStyles.php` (line 132, line 133, line 139), `samples/Html/html_01_Basic_Conditional_Formatting.php` (line 25), `samples/Html/html_02_More_Conditional_Formatting.php` (line 25), `samples/Html/html_03_Color_Scale.php` (line 25), `samples/Html/html_04_Table_Format_without_Conditional.php` (line 25), … (+16 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (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 28 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 (28 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
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.
131 of 373 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 373 of the 552 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 127 Orphaned file finding(s) in Knowledge Freshness — start with Fill.php (2), DefinedNames.php (2), Conditional.php (2). — One of this dimension's main actionable groups (127 recommendation-level).
Resolve the 4 Orphaned knowledge finding(s) in Knowledge Freshness — start with ConvertUOM.php, JpGraphRendererBase.php, Theme.php. — One of this dimension's main actionable groups (4 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 3 Change coupling finding(s) in Change Coupling — start with Dompdf.php, BaseReader.php, Metadata.php. — One of this dimension's main actionable groups (3 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 the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 6 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
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.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
`fopen()` is called here and hands back a handle the caller must close — and it is held in `$bmp_fd`, and every use of `$bmp_fd` in the function reads through it or tests it — it is never closed, returned, passed, captured or stored. PHP frees an unclosed handle when its last reference goes, which is the end of the function at the earliest, not a point this code states: the descriptor stays open for the rest of the call (a long loop, a long-running worker holds many), buffered writes are flushed only then, and a failed flush is reported nowhere. Close it where it is done with: `fclose($handle);`, in a `finally` if the code between can throw. — src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2429
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×7) — src/PhpSpreadsheet/Worksheet/AutoFilter.php:344, src/PhpSpreadsheet/Worksheet/AutoFilter.php:482, src/PhpSpreadsheet/Shared/Date.php:397, …
`catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×8) — src/PhpSpreadsheet/Worksheet/Worksheet.php:3989, src/PhpSpreadsheet/Worksheet/Worksheet.php:4019, src/PhpSpreadsheet/Style/ConditionalFormatting/CellMatcher.php:291, …
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×3) — src/PhpSpreadsheet/Reader/Ods.php:1561, src/PhpSpreadsheet/Cell/DataValidator.php:71, src/PhpSpreadsheet/Cell/DataValidator.php:134
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether PHP's static analysis checks null and is not undermined by a nullness baseline — PHPStan from level 8 (`checkNullables`) or Psalm at `errorLevel` 3 or stricter is what makes `?User` a type whose method call is an error, and the null entries of a baseline, `@psalm-suppress PossiblyNull…` and `@phpstan-ignore *.nonObject` are what silence it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
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 — 2 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.
X10 Duplicated predicate — 31 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 71 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.
AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's PHP imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — Not applicable: PHP builds its object graph per request and shares none of it between requests. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
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 — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — 3 markup documents under demonstration, documentation or developer-tool trees (or modules the build marks non-production) but none in the product; no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — those pages are demos or docs for the code, not something this tier can boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Laravel migration, an Eloquent $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository registers no route (no Laravel Route::…, no Symfony #[Route], no Filament panel, no WordPress REST route or AJAX action). Access control is therefore N/A here — a Composer library is authorized by the application that mounts it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone_number, …) or stored credential in a Laravel migration, an Eloquent model's $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Laravel migration, an Eloquent $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Laravel migration, an Eloquent $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D11 Test Reliability — Test reliability not included — no .php test runner
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D21 Naming Consistency — Naming consistency does not read PHP yet; not measured.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed PHP surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Aggregate roots were found in only one source directory (PhpSpreadsheet), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .php source were not judged.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 11 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
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 — Not applicable — this Composer build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
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); 3 value object(s); its 2 declared aggregate(s) carry no behaviour — data bags on an AggregateRoot base: measured, not claimed as DDD
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
M4 Documentation accuracy — Not applicable: the 30 current-state document(s) make no claim of a kind M4 checks. 24 claim(s) of kinds M4 does not check were not checked (environment variable 24); M4 checks only links and versions and artefact counts.
P2 Observability — This repository's JavaScript/TypeScript, PHP source (2 module(s), 563 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
P7 Outbound HTTP resilience — no outbound HTTP usage detected — no HTTP client call or construction in the JavaScript/TypeScript, PHP source (service entry point: src/PhpSpreadsheet/Shared/StringHelper.php:779 ($_POST[))
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for PHPBench subjects (`bench*` methods, or `@Subject`/`#[Subject]` ones) in a file importing PhpBench or carrying its annotations, `bench*` methods in a `*Bench.php` file where PHPBench is installed, or phpbench/phpbench in a composer.json or a phpbench.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
PF3 Async & latency hygiene — Not applicable: PHP has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X12 Unreachable branch — X12 reached only 0% of this repository's production lines — php (140,888 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not 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
X2 Cancellation propagation — no C# was loaded; this repository's PHP was read and makes no request a caller can cancel (amphp's HttpClient or connect) — synchronous PHP offers its callers no cancellation to take
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — 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
X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. PHP gives a request one thread of its own; the event-loop libraries (ReactPHP, Amp) run callbacks one at a time, and ext-parallel copies every value across its channels, so no array or collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
X27 Collection changed while being enumerated — 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
X29 Per-element action decided by a fixed element — X29 reached only 0% of this repository's production lines — php (140,888 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Orphaned knowledge src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php:1— 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/Chart/Renderer/JpGraphRendererBase.php:1— 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:1— 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:1— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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 tests/data/Calculation/Statistical/COUNTIFS.php:24— // TODO I believe that PhpSpreadsheet counts false and shouldn't. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/PhpSpreadsheetTests/Writer/Xlsx/ArrayFunctions2Test.php:18— // TODO - I think the spreadsheet below is too difficult for PhpSpreadsheet to calculate correctly. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/PhpSpreadsheetTests/Writer/Xlsx/TableTest.php:63— // TODO: We don't yet support Structured References in formulae, so we need to disable precalculation — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/PhpSpreadsheetTests/Writer/Xlsx/TableTest.php:83— // TODO: We don't yet support Structured References in formulae, so we need to disable precalc when writing — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/PhpSpreadsheetTests/Reader/Html/HtmlTagsTest.php:212— // TODO Rich Text not yet supported — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/PhpSpreadsheetTests/Chart/Issue2077Test.php:48— // TODO I think the third parameter can be set,but I didn't succeed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/PhpSpreadsheetTests/Calculation/MergedCellTest.php:106— // TODO - Reinstate full validation and disallow single cell merging for version 2.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiTestTest.php:11— // TODO Convert to Spreadsheet context. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountIfsTest.php:7— // TODO There are some commented out cases which don't return correct value — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ForecastTest.php:11— // TODO Spreadsheet context. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GrowthTest.php:11— // TODO Run test in spreadsheet context — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LinEstTest.php:11— // TODO run test in spreadsheet context — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogEstTest.php:11— // TODO run test in spreadsheet context — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TrendTest.php:11— // TODO Run test in spreadsheet context. — 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/Xlsx/Chart.php:1013— // TODO output 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/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.
TodoComment src/PhpSpreadsheet/Writer/Xls/Escher.php:215— // 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:239— // 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:242— // 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:178— //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/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.
MethodTooLong: Xlsx.loadSpreadsheetFromFile src/PhpSpreadsheet/Reader/Xlsx.php:562— MethodTooLong — loadSpreadsheetFromFile runs 980 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 880 over it, 9.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: Calculation.processTokenStack src/PhpSpreadsheet/Calculation/Calculation.php:1729— MethodTooLong — processTokenStack runs 475 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 375 over it, 4.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LoadSpreadsheet.loadSpreadsheetFromFile2 src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php:25— MethodTooLong — loadSpreadsheetFromFile2 runs 419 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 319 over it, 4.19× 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:81— 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 337 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 237 over it, 3.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Xml.loadIntoExisting src/PhpSpreadsheet/Reader/Xml.php:288— 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:4376— MethodTooLong — getNextToken runs 304 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 204 over it, 3.04× 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:875— MethodTooLong — processTableRow runs 285 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 185 over it, 2.85× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Ods.load2 src/PhpSpreadsheet/Reader/Ods.php:356— MethodTooLong — load2 runs 284 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 184 over it, 2.84× 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:2798— 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:703— 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 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Xlsx.save src/PhpSpreadsheet/Writer/Xlsx.php:343— MethodTooLong — save runs 169 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 69 over it, 1.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: 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: ContentTypes.writeContentTypes src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:24— MethodTooLong — writeContentTypes runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: 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: 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: Content.writeCells src/PhpSpreadsheet/Writer/Ods/Content.php:228— MethodTooLong — writeCells runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: 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:1128— 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:4193— 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.
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 — 120 methods. The bar is 30 methods; this is 90 over it, 4.00× 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 — 85 methods. The bar is 30 methods; this is 55 over it, 2.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: Html src/PhpSpreadsheet/Writer/Html.php:40— TooManyMethods — 83 methods. The bar is 30 methods; this is 53 over it, 2.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: 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: Style src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:21— TooManyMethods — 64 methods. The bar is 30 methods; this is 34 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.
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: Xlsx src/PhpSpreadsheet/Reader/Xlsx.php:54— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× 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 — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× 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:43— TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Html src/PhpSpreadsheet/Reader/Html.php:33— 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: 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: 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: ReferenceHelper src/PhpSpreadsheet/ReferenceHelper.php:15— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× 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: Ods src/PhpSpreadsheet/Reader/Ods.php:41— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× 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.
ClassTooLong: Xls src/PhpSpreadsheet/Reader/Xls.php:65— ClassTooLong — 2168 significant lines (blank, comment-only and punctuation-only lines excluded), 92 methods. The bar is 400 significant lines; this is 1768 over it, 5.42× 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 — 1893 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 400 significant lines; this is 1493 over it, 4.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.
ClassTooLong: Worksheet src/PhpSpreadsheet/Worksheet/Worksheet.php:40— ClassTooLong — 1651 significant lines (blank, comment-only and punctuation-only lines excluded), 209 methods. The bar is 400 significant lines; this is 1251 over it, 4.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: Calculation src/PhpSpreadsheet/Calculation/Calculation.php:29— ClassTooLong — 1650 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods. The bar is 400 significant lines; this is 1250 over it, 4.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: Worksheet src/PhpSpreadsheet/Writer/Xls/Worksheet.php:29— ClassTooLong — 1518 significant lines (blank, comment-only and punctuation-only lines excluded), 71 methods. The bar is 400 significant lines; this is 1118 over it, 3.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
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: Ods src/PhpSpreadsheet/Reader/Ods.php:41— ClassTooLong — 1299 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 899 over it, 3.25× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Html src/PhpSpreadsheet/Writer/Html.php:40— ClassTooLong — 1225 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods. The bar is 400 significant lines; this is 825 over it, 3.06× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Chart src/PhpSpreadsheet/Reader/Xlsx/Chart.php:27— ClassTooLong — 1212 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 812 over it, 3.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Worksheet src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:28— ClassTooLong — 1152 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 752 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: Style src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:21— ClassTooLong — 860 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. The bar is 400 significant lines; this is 460 over it, 2.15× 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 — 852 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 452 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: Html src/PhpSpreadsheet/Reader/Html.php:33— ClassTooLong — 782 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 382 over it, 1.96× 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 — 772 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 372 over it, 1.93× 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 — 705 significant lines (blank, comment-only and punctuation-only lines excluded), 120 methods. The bar is 400 significant lines; this is 305 over it, 1.76× 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:43— ClassTooLong — 568 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 400 significant lines; this is 168 over it, 1.42× 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 REDACTED:14— 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 — 513 significant lines (blank, comment-only and punctuation-only lines excluded), 63 methods. The bar is 400 significant lines; this is 113 over it, 1.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Xls src/PhpSpreadsheet/Writer/Xls.php:31— ClassTooLong — 477 significant lines (blank, comment-only and punctuation-only lines excluded), 12 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: 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 — 2199 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Xls (65-4916). The bar is 500 significant lines; this is 1699 over it, 4.40× 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 — 1943 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Xlsx (54-3153). The bar is 500 significant lines; this is 1443 over it, 3.89× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Worksheet/Worksheet.php src/PhpSpreadsheet/Worksheet/Worksheet.php— FileTooLong — 1687 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Worksheet (40-4352). The bar is 500 significant lines; this is 1187 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 — 1675 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Calculation (29-3087). The bar is 500 significant lines; this is 1175 over it, 3.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/Worksheet.php src/PhpSpreadsheet/Writer/Xls/Worksheet.php— FileTooLong — 1538 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Worksheet (29-3253). The bar is 500 significant lines; this is 1038 over it, 3.08× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Reader/Ods.php src/PhpSpreadsheet/Reader/Ods.php— FileTooLong — 1336 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Ods (41-2136). The bar is 500 significant lines; this is 836 over it, 2.67× 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 — 1261 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Html (40-2434). The bar is 500 significant lines; this is 761 over it, 2.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: Xlsx/Chart.php src/PhpSpreadsheet/Reader/Xlsx/Chart.php— FileTooLong — 1235 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Chart (27-1762). The bar is 500 significant lines; this is 735 over it, 2.47× 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 — 1176 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Worksheet (28-2013). The bar is 500 significant lines; this is 676 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: Cell/Style.php src/PhpSpreadsheet/Writer/Ods/Cell/Style.php— FileTooLong — 877 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Style (21-1220). The bar is 500 significant lines; this is 377 over it, 1.75× 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 — 861 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 361 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: Reader/Html.php src/PhpSpreadsheet/Reader/Html.php— FileTooLong — 811 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: Html (33-1425). The bar is 500 significant lines; this is 311 over it, 1.62× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: PhpSpreadsheet/ReferenceHelper.php src/PhpSpreadsheet/ReferenceHelper.php— FileTooLong — 783 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: ReferenceHelper (15-1456). The bar is 500 significant lines; this is 283 over it, 1.57× 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 — 720 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Spreadsheet (19-1983). The bar is 500 significant lines; this is 220 over it, 1.44× 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 — 607 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: Xlsx (43-1301). The bar is 500 significant lines; this is 107 over it, 1.21× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: 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 — 532 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: Cell (23-1201). The bar is 500 significant lines; this is 32 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: REDACTED REDACTED— FileTooLong — 527 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: AgileEncryption (14-843). The bar is 500 significant lines; this is 27 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/Xls.php src/PhpSpreadsheet/Writer/Xls.php— FileTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: Xls (31-927). The bar is 500 significant lines; this is 4 over it, 1.01× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
Low cohesion: Chart (LCOM4 22) src/PhpSpreadsheet/Chart/Chart.php:8— Chart's methods fall into 22 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 22 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Worksheet (LCOM4 22) src/PhpSpreadsheet/Worksheet/Worksheet.php:40— Worksheet's methods fall into 22 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 22 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Layout (LCOM4 21) src/PhpSpreadsheet/Chart/Layout.php:7— Layout's methods fall into 21 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 21 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Properties (LCOM4 15) src/PhpSpreadsheet/Document/Properties.php:8— Properties's methods fall into 15 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 15 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ConditionalDataBarExtension (LCOM4 14) src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalDataBarExtension.php:5— ConditionalDataBarExtension's methods fall into 14 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 14 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Spreadsheet (LCOM4 12) src/PhpSpreadsheet/Spreadsheet.php:19— Spreadsheet's methods fall into 12 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 12 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: HeaderFooter (LCOM4 12) src/PhpSpreadsheet/Worksheet/HeaderFooter.php:66— HeaderFooter's methods fall into 12 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 12 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: DataSeriesValues (LCOM4 11) src/PhpSpreadsheet/Chart/DataSeriesValues.php:10— DataSeriesValues's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: BaseReader (LCOM4 10) src/PhpSpreadsheet/Reader/BaseReader.php:12— BaseReader's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: PageSetup (LCOM4 10) src/PhpSpreadsheet/Worksheet/PageSetup.php:80— PageSetup's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Conditional (LCOM4 8) src/PhpSpreadsheet/Style/Conditional.php:10— Conditional's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: BaseDrawing (LCOM4 8) src/PhpSpreadsheet/Worksheet/BaseDrawing.php:11— BaseDrawing's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: BoxWhisker (LCOM4 6) src/PhpSpreadsheet/Chart/BoxWhisker.php:8— BoxWhisker's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: DataSeries (LCOM4 6) src/PhpSpreadsheet/Chart/DataSeries.php:7— DataSeries's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Borders (LCOM4 6) src/PhpSpreadsheet/Style/Borders.php:7— Borders's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: PlotArea (LCOM4 5) src/PhpSpreadsheet/Chart/PlotArea.php:7— PlotArea's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ConditionalFormattingRuleExtension (LCOM4 5) src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php:8— ConditionalFormattingRuleExtension's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Table (LCOM4 5) src/PhpSpreadsheet/Worksheet/Table.php:15— Table's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Pdf (LCOM4 5) src/PhpSpreadsheet/Writer/Pdf.php:10— Pdf's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Axis (LCOM4 4) src/PhpSpreadsheet/Chart/Axis.php:11— Axis's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: BaseWriter (LCOM4 4) src/PhpSpreadsheet/Writer/BaseWriter.php:5— BaseWriter's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Xlsx (LCOM4 4) src/PhpSpreadsheet/Writer/Xlsx.php:43— Xlsx's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
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:2725— src/PhpSpreadsheet/Reader/Xls.php:2725-2734 | src/PhpSpreadsheet/Reader/Xls.php:2770-2779 — both copies are in the same file, so extract the 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:2725` it does not close everything it opens, so those exact lines 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:1559— src/PhpSpreadsheet/Reader/Xlsx.php:1559-1568 | src/PhpSpreadsheet/Reader/Xlsx.php:1666-1675 — both copies are in the same file, so extract the 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:1559` it does not close everything it opens, so those 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:1676` calls `isset`, `children`, `setSrcRect` and `src/PhpSpreadsheet/Reader/Xlsx.php:1569` 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/ReferenceHelper.php:1290— src/PhpSpreadsheet/ReferenceHelper.php:1290-1299 | src/PhpSpreadsheet/ReferenceHelper.php:1373-1382 — both copies are in the same file, so extract the 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:294-303 — 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:850— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:850-859 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:889-898 — both copies are in the same file, so extract the 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/Style/Border.php:189— src/PhpSpreadsheet/Style/Border.php:189-198 | src/PhpSpreadsheet/Style/Font.php:730-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 (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.
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:135-142 — 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/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/Writer/Ods/Cell/Style.php:1115— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1115-1122 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1145-1152 — both copies are in the same file, so extract the 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:2945— src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2945-2952 | src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2960-2968 — both copies are in the same file, so extract the 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.
Hotspot: src/PhpSpreadsheet/Reader/Xlsx.php src/PhpSpreadsheet/Reader/Xlsx.php:562— src/PhpSpreadsheet/Reader/Xlsx.php changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 322 in Xlsx.loadSpreadsheetFromFile at line 562. 1 of those changes was a fix/bug commit, and the other 11 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +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/Reader/Ods.php src/PhpSpreadsheet/Reader/Ods.php:875— src/PhpSpreadsheet/Reader/Ods.php changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 93 in Ods.processTableRow at line 875. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +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/Calculation/Calculation.php src/PhpSpreadsheet/Calculation/Calculation.php:1729— src/PhpSpreadsheet/Calculation/Calculation.php changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 204 in Calculation.processTokenStack at line 1729. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +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/Xml.php src/PhpSpreadsheet/Reader/Xml.php:288— src/PhpSpreadsheet/Reader/Xml.php changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 109 in Xml.loadIntoExisting at line 288. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +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:343— src/PhpSpreadsheet/Writer/Xlsx.php changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in Xlsx.save at line 343. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +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/Reader/Xls/LoadSpreadsheet.php src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php:25— src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 141 in LoadSpreadsheet.loadSpreadsheetFromFile2 at line 25. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.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: REDACTED REDACTED:107— REDACTED changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in AgileEncryption.parse at line 107. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +00:00' --full-history --no-merges -- REDACTED`: 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:228— src/PhpSpreadsheet/Writer/Ods/Content.php changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in Content.writeCells at line 228. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +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/Xlsx/ContentTypes.php src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:24— src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in ContentTypes.writeContentTypes at line 24. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.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/Html.php src/PhpSpreadsheet/Writer/Html.php:748— src/PhpSpreadsheet/Writer/Html.php changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in Html.writeImageInCell at line 748. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Writer/Html.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 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +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/Worksheet/Drawing.php src/PhpSpreadsheet/Worksheet/Drawing.php:107— src/PhpSpreadsheet/Worksheet/Drawing.php changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in Drawing.setPath 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Worksheet/Drawing.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/Xlsx/Chart.php src/PhpSpreadsheet/Reader/Xlsx/Chart.php:526— src/PhpSpreadsheet/Reader/Xlsx/Chart.php changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in Chart.readChartEx at line 526. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Reader/Xlsx/Chart.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/Table.php src/PhpSpreadsheet/Writer/Xlsx/Table.php:20— src/PhpSpreadsheet/Writer/Xlsx/Table.php changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in Table.writeTable at line 20. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Writer/Xlsx/Table.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/BinaryComparison.php src/PhpSpreadsheet/Calculation/BinaryComparison.php:46— src/PhpSpreadsheet/Calculation/BinaryComparison.php changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in BinaryComparison.compare at line 46. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +00:00' --full-history --no-merges -- src/PhpSpreadsheet/Calculation/BinaryComparison.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 2 times in last 90 days, and the most complex body those changes touched has 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 07:43:41 +00:00' --until='2026-11-13 07:43:41 +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.
Swallowed exception (caught, then discarded) src/PhpSpreadsheet/Worksheet/AutoFilter.php:344— `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/PhpSpreadsheet/Worksheet/AutoFilter.php:482— `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/PhpSpreadsheet/Worksheet/Worksheet.php:3989— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/PhpSpreadsheet/Worksheet/Worksheet.php:4019— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/PhpSpreadsheet/Style/ConditionalFormatting/CellMatcher.php:291— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/PhpSpreadsheet/Shared/Date.php:397— `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/PhpSpreadsheet/Shared/Metafile.php:115— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/PhpSpreadsheet/Reader/Html.php:180— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/PhpSpreadsheet/Reader/Xlsx.php:157— `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/PhpSpreadsheet/Reader/Xlsx.php:172— `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/PhpSpreadsheet/Reader/Xlsx.php:3128— `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/PhpSpreadsheet/Reader/Xml.php:520— `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/PhpSpreadsheet/Calculation/CalculationLocale.php:140— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/PhpSpreadsheet/Calculation/CalculationLocale.php:192— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/PhpSpreadsheet/Calculation/CalculationLocale.php:218— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
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:2497— src/PhpSpreadsheet/Calculation/Calculation.php:2497-2503 | src/PhpSpreadsheet/Calculation/Calculation.php:2506-2512 — both copies are in the same file, so extract the 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/Chart.php:215— src/PhpSpreadsheet/Reader/Xlsx/Chart.php:215-221 | src/PhpSpreadsheet/Reader/Xlsx/Chart.php:288-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Reader/Xlsx/Chart.php:215` 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:1755— src/PhpSpreadsheet/Spreadsheet.php:1755-1761 | src/PhpSpreadsheet/Spreadsheet.php:1763-1769 — both copies are in the same file, so extract the 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:1755` 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:610— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:610-616 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:623-629 — both copies are in the same file, so extract the 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:630` calls `startElement`, `text`, `endElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:617` 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:627— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:627-633 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1205-1211 — both copies are in the same file, so extract the 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:715— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:715-721 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:727-733 — both copies are in the same file, so extract the 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:1119— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1119-1125 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1174-1180 — both copies are in the same file, so extract the 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:1117` calls `WriteElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1172` 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:1171— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1171-1177 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1199-1205 — both copies are in the same file, so extract the 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:103— src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:103-109 | src/PhpSpreadsheet/Writer/Xlsx/PivotTable.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. 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) REDACTED:289— REDACTED:289-295 | REDACTED:360-366 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
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 (13 lines × 2) src/PhpSpreadsheet/Calculation/Calculation.php:1758— src/PhpSpreadsheet/Calculation/Calculation.php:1758-1770 | src/PhpSpreadsheet/Calculation/Calculation.php:1793-1805 — both copies are in the same file, so extract the 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:1758` it does not close everything it opens, so those exact lines 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:114— src/PhpSpreadsheet/Reader/Gnumeric.php:114-126 | src/PhpSpreadsheet/Reader/Gnumeric.php:145-157 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Reader/Gnumeric.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.
Duplicated block (13 lines × 2) src/PhpSpreadsheet/Reader/Ods.php:122— src/PhpSpreadsheet/Reader/Ods.php:122-134 | src/PhpSpreadsheet/Reader/Ods.php:177-189 — both copies are in the same file, so extract the 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/Reader/Xls.php:2193— src/PhpSpreadsheet/Reader/Xls.php:2193-2205 | src/PhpSpreadsheet/Reader/Xls.php:2220-2232 — both copies are in the same file, so extract the 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:2193` it does not close everything it opens, so those exact lines 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/Xls.php:752— src/PhpSpreadsheet/Writer/Xls.php:752-764 | src/PhpSpreadsheet/Writer/Xls.php:892-904 — both copies are in the same file, so extract the 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:752` 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:750` calls `elseif`, `pack` and `src/PhpSpreadsheet/Writer/Xls.php:890` 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/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:2310— src/PhpSpreadsheet/Reader/Xls.php:2310-2318 | src/PhpSpreadsheet/Reader/Xls.php:2329-2337 — both copies are in the same file, so extract the 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:2310` it does not close everything it opens, so those exact lines 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:322-330 — 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:349— src/PhpSpreadsheet/Reader/Xml.php:349-357 | src/PhpSpreadsheet/Reader/Xml.php:724-732 — both copies are in the same file, so extract the 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:349` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/PhpSpreadsheet/ReferenceHelper.php:1321— src/PhpSpreadsheet/ReferenceHelper.php:1321-1329 | src/PhpSpreadsheet/ReferenceHelper.php:1404-1412 — both copies are in the same file, so extract the 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:212— src/PhpSpreadsheet/Shared/OLERead.php:212-220 | src/PhpSpreadsheet/Shared/OLERead.php:234-242 — both copies are in the same file, so extract the 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/Worksheet/AutoFilter.php:134— src/PhpSpreadsheet/Worksheet/AutoFilter.php:134-142 | src/PhpSpreadsheet/Worksheet/Table.php:316-324 — 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:313` 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 (9 lines × 2) src/PhpSpreadsheet/Reader/Xlsx.php:1538— src/PhpSpreadsheet/Reader/Xlsx.php:1538-1546 | src/PhpSpreadsheet/Reader/Xlsx.php:2881-2889 — both copies are in the same file, so extract the 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:206— src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:206-214 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:227-235 — both copies are in the same file, so extract the 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/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.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×11
Edited copy of a member (12 corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:758— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:758-769 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:788-799 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:364— src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:364-375 | src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:383-394 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/PhpSpreadsheet/Reader/Ods/DefinedNames.php:22— src/PhpSpreadsheet/Reader/Ods/DefinedNames.php:22-33 | src/PhpSpreadsheet/Reader/Ods/DefinedNames.php:41-53 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/PhpSpreadsheet/Style/Fill.php:236— src/PhpSpreadsheet/Style/Fill.php:236-247 | src/PhpSpreadsheet/Style/Fill.php:265-276 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/PhpSpreadsheet/Spreadsheet.php:1842— src/PhpSpreadsheet/Spreadsheet.php:1842-1853 | src/PhpSpreadsheet/Spreadsheet.php:1866-1877 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/PhpSpreadsheet/Reader/Xls.php:2310— src/PhpSpreadsheet/Reader/Xls.php:2310-2321 | src/PhpSpreadsheet/Reader/Xls.php:2329-2340 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Base.php:34— src/PhpSpreadsheet/Calculation/MathTrig/Base.php:34-45 | src/PhpSpreadsheet/Calculation/MathTrig/Roman.php:830-844 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/PhpSpreadsheet/Calculation/Information/Value.php:81— src/PhpSpreadsheet/Calculation/Information/Value.php:81-92 | src/PhpSpreadsheet/Calculation/Information/Value.php:106-117 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/PhpSpreadsheet/Calculation/LookupRef/Sort.php:266— src/PhpSpreadsheet/Calculation/LookupRef/Sort.php:266-278 | src/PhpSpreadsheet/Calculation/LookupRef/Sort.php:319-330 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Logarithms.php:31— src/PhpSpreadsheet/Calculation/MathTrig/Logarithms.php:31-44 | src/PhpSpreadsheet/Calculation/MathTrig/Logarithms.php:89-100 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/PhpSpreadsheet/Calculation/DateTimeExcel/Helpers.php:243— src/PhpSpreadsheet/Calculation/DateTimeExcel/Helpers.php:243-254 | src/PhpSpreadsheet/Calculation/MathTrig/Helpers.php:26-37 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×10
Edited copy of a member (10 corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:932— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:932-941 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:946-959 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/PhpSpreadsheet/Calculation/LookupRef/Helpers.php:64— src/PhpSpreadsheet/Calculation/LookupRef/Helpers.php:64-73 | src/PhpSpreadsheet/Calculation/LookupRef/Offset.php:112-123 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/PhpSpreadsheet/Reader/Xls.php:1016— src/PhpSpreadsheet/Reader/Xls.php:1016-1025 | src/PhpSpreadsheet/Reader/Xls.php:2149-2158 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php:134— src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php:134-144 | src/PhpSpreadsheet/Calculation/Engineering/BesselY.php:126-135 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Conditional.php:131— src/PhpSpreadsheet/Calculation/Statistical/Conditional.php:131-140 | src/PhpSpreadsheet/Calculation/Statistical/Conditional.php:232-241 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php:20— src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php:20-32 | src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php:42-51 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Conditional.php:282— src/PhpSpreadsheet/Calculation/Statistical/Conditional.php:282-291 | src/PhpSpreadsheet/Calculation/Statistical/Conditional.php:330-340 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/PhpSpreadsheet/Style/Alignment.php:323— src/PhpSpreadsheet/Style/Alignment.php:323-332 | src/PhpSpreadsheet/Style/Color.php:452-463 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php:107— src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php:107-120 | src/PhpSpreadsheet/Writer/Xls/Workbook.php:884-893 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php:125— src/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php:125-135 | src/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php:148-157 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
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:818— src/PhpSpreadsheet/Reader/Html.php:818-828 | src/PhpSpreadsheet/Reader/Html.php:952-962 — both copies are in the same file, so extract the 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:818` 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/Xlsx/Chart.php:223— src/PhpSpreadsheet/Reader/Xlsx/Chart.php:223-233 | src/PhpSpreadsheet/Reader/Xlsx/Chart.php:296-306 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Reader/Xlsx/Chart.php:223` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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:829— src/PhpSpreadsheet/ReferenceHelper.php:829-839 | src/PhpSpreadsheet/ReferenceHelper.php:878-889 — both copies are in the same file, so extract the 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:829` 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:554— src/PhpSpreadsheet/Style/Style.php:554-564 | src/PhpSpreadsheet/Style/Style.php:577-587 — both copies are in the same file, so extract the 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:554` 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:931— src/PhpSpreadsheet/Worksheet/Worksheet.php:931-941 | src/PhpSpreadsheet/Worksheet/Worksheet.php:4116-4126 — both copies are in the same file, so extract the 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:931` 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:1951— src/PhpSpreadsheet/Worksheet/Worksheet.php:1951-1961 | src/PhpSpreadsheet/Worksheet/Worksheet.php:1976-1986 — both copies are in the same file, so extract the 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:1951` 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/Calculation/Calculation.php:1929— src/PhpSpreadsheet/Calculation/Calculation.php:1929-1939 | src/PhpSpreadsheet/Calculation/Calculation.php:1941-1951 — both copies are in the same file, so extract the 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/Calculation.php:2154— src/PhpSpreadsheet/Calculation/Calculation.php:2154-2159 | src/PhpSpreadsheet/Calculation/Calculation.php:2186-2191 — both copies are in the same file, so extract the 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:2154` it does not close everything it opens, so those 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:2588— src/PhpSpreadsheet/Calculation/Calculation.php:2588-2593 | src/PhpSpreadsheet/Calculation/Calculation.php:2596-2601 — both copies are in the same file, so extract the 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:2588` 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:156— src/PhpSpreadsheet/Calculation/TextData/Extract.php:156-161 | src/PhpSpreadsheet/Calculation/TextData/Extract.php:220-225 — both copies are in the same file, so extract the 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) REDACTED:282— REDACTED:282-287 | REDACTED:336-341 — both copies are in the same file, so extract the 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/PivotTable.php:364— src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:364-369 | src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:383-388 — both copies are in the same file, so extract the 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.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×9
Edited copy of a member (11 corresponding lines) infra/LocaleGenerator.php:131— infra/LocaleGenerator.php:131-141 | infra/LocaleGenerator.php:147-160 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/PhpSpreadsheet/Worksheet/AutoFilter.php:178— src/PhpSpreadsheet/Worksheet/AutoFilter.php:178-188 | src/PhpSpreadsheet/Worksheet/Table.php:394-404 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/PhpSpreadsheet/Cell/AdvancedValueBinder.php:183— src/PhpSpreadsheet/Cell/AdvancedValueBinder.php:183-193 | src/PhpSpreadsheet/Cell/AdvancedValueBinder.php:199-210 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/PhpSpreadsheet/Style/ConditionalFormatting/CellStyleAssessor.php:29— src/PhpSpreadsheet/Style/ConditionalFormatting/CellStyleAssessor.php:29-39 | src/PhpSpreadsheet/Style/ConditionalFormatting/CellStyleAssessor.php:47-63 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/PhpSpreadsheet/ReferenceHelper.php:85— src/PhpSpreadsheet/ReferenceHelper.php:85-95 | src/PhpSpreadsheet/ReferenceHelper.php:107-117 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cotangent.php:78— src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cotangent.php:78-88 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Fisher.php:60-70 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/PhpSpreadsheet/Spreadsheet.php:1003— src/PhpSpreadsheet/Spreadsheet.php:1003-1013 | src/PhpSpreadsheet/Spreadsheet.php:1023-1033 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:376— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:376-386 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:405-415 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/Complex.php:78— src/PhpSpreadsheet/Calculation/Engineering/Complex.php:78-88 | src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php:30-40 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
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:233— src/PhpSpreadsheet/Calculation/Functions.php:233-246 | src/PhpSpreadsheet/Calculation/Functions.php:259-272 — both copies are in the same file, so extract the 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:1055— src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1055-1068 | src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1095-1108 — both copies are in the same file, so extract the 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:1055` it does not close everything it opens, so those 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:1094` calls `foreach` and `src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1053` 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:1028— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1028-1041 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1076-1089 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
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.
FixmeComment src/PhpSpreadsheet/Writer/Xls/Workbook.php:869— //$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/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/Reader/Xls.php:3441— //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/Xml/DataValidations.php:157— // 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/Reader/Xls/LoadSpreadsheet.php:610— // 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:642— // 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.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×8
Edited copy of a member (7 corresponding lines) src/PhpSpreadsheet/Style/NumberFormat/Wizard/Accounting.php:19— src/PhpSpreadsheet/Style/NumberFormat/Wizard/Accounting.php:19-32 | src/PhpSpreadsheet/Style/NumberFormat/Wizard/CurrencyBase.php:107-113 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:639— src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:639-648 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:620-626 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/PhpSpreadsheet/Cell/Cell.php:1115— src/PhpSpreadsheet/Cell/Cell.php:1115-1124 | src/PhpSpreadsheet/Cell/Cell.php:1193-1199 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/PhpSpreadsheet/Cell/ColumnRange.php:70— src/PhpSpreadsheet/Cell/ColumnRange.php:70-76 | src/PhpSpreadsheet/Cell/RowRange.php:62-68 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/PhpSpreadsheet/Worksheet/AutoFilter.php:210— src/PhpSpreadsheet/Worksheet/AutoFilter.php:210-216 | src/PhpSpreadsheet/Worksheet/Table.php:426-432 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/CellValue.php:192— src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/CellValue.php:192-198 | src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/TextValue.php:169-175 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/PhpSpreadsheet/Worksheet/AutoFilter.php:270— src/PhpSpreadsheet/Worksheet/AutoFilter.php:270-277 | src/PhpSpreadsheet/Worksheet/Table.php:483-489 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/PhpSpreadsheet/Cell/CellAddress.php:71— src/PhpSpreadsheet/Cell/CellAddress.php:71-77 | src/PhpSpreadsheet/Cell/RowRange.php:86-92 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (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/ReferenceHelper.php:1253— src/PhpSpreadsheet/ReferenceHelper.php:1253-1264 | src/PhpSpreadsheet/ReferenceHelper.php:1337-1348 — both copies are in the same file, so extract the 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:1253` it does not close everything it opens, so those exact lines 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:1733— src/PhpSpreadsheet/Worksheet/Worksheet.php:1733-1744 | src/PhpSpreadsheet/Worksheet/Worksheet.php:1771-1782 — both copies are in the same file, so extract the 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:1733` it does not close everything it opens, so those exact lines 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:1182— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1182-1193 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1207-1218 — both copies are in the same file, so extract the 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:1179` calls `startElement`, `writeAttribute`, `endElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1206` 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/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 (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:763— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:763-768 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:793-798 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:872-877 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:935-940 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:953-958 — 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:778— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:778-783 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:857-862 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:877-882 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:896-901 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1105-1110 — 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:854` calls `startElement`, `endElement`, `writeElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:777` 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:777— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:777-782 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:856-861 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:870-875 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:895-900 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1104-1109 — 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:854` calls `startElement`, `endElement`, `writeElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:777` 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:871— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:871-876 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:934-939 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:948-953 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:979-984 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1024-1029 — 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:869` calls `writeElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:933` 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:421-426 | src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:82-87 — 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 (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:748— src/PhpSpreadsheet/Reader/Html.php:748-752 | src/PhpSpreadsheet/Reader/Html.php:1038-1042 — both copies are in the same file, so extract the 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:205— src/PhpSpreadsheet/Reader/Xlsx/Chart.php:205-209 | src/PhpSpreadsheet/Reader/Xlsx/Chart.php:278-282 — both copies are in the same file, so extract the 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/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.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×6
Edited copy of a member (9 corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/ComplexOperations.php:33— src/PhpSpreadsheet/Calculation/Engineering/ComplexOperations.php:33-41 | src/PhpSpreadsheet/Calculation/Engineering/ComplexOperations.php:62-70 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php:443— src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php:443-451 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php:459-467 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php:120— src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php:120-128 | src/PhpSpreadsheet/Worksheet/RowCellIterator.php:119-127 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/PhpSpreadsheet/Worksheet/AutoFilter.php:147— src/PhpSpreadsheet/Worksheet/AutoFilter.php:147-156 | src/PhpSpreadsheet/Worksheet/Table.php:332-340 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/PhpSpreadsheet/Writer/Xls/Workbook.php:919— src/PhpSpreadsheet/Writer/Xls/Workbook.php:919-928 | src/PhpSpreadsheet/Writer/Xls/Worksheet.php:1738-1746 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/PhpSpreadsheet/Calculation/Information/Value.php:131— src/PhpSpreadsheet/Calculation/Information/Value.php:131-139 | src/PhpSpreadsheet/Calculation/TextData/Text.php:81-89 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (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:520-530 | src/PhpSpreadsheet/Writer/Xlsx/DefinedNames.php:224-234 — 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:415-425 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:293-303 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:317-327 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. 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:425` 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:211-221 — 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 (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/Reader/Xls/Escher.php:268— src/PhpSpreadsheet/Reader/Xls/Escher.php:268-278 | src/PhpSpreadsheet/Reader/Xls/Escher.php:309-319 | src/PhpSpreadsheet/Reader/Xls/Escher.php:350-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.
Duplicated block (10 lines × 3) src/PhpSpreadsheet/Reader/Xlsx.php:1640— src/PhpSpreadsheet/Reader/Xlsx.php:1640-1649 | src/PhpSpreadsheet/Reader/Xlsx.php:1759-1768 | src/PhpSpreadsheet/Reader/Xlsx.php:1786-1795 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PhpSpreadsheet/Reader/Xlsx.php:1637` calls `EMUToPixels`, `getArrayItemIntOrSxml`, `getAttributes` and `src/PhpSpreadsheet/Reader/Xlsx.php:1758` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 3) src/PhpSpreadsheet/Writer/Xlsx/Comments.php:130— src/PhpSpreadsheet/Writer/Xlsx/Comments.php:130-139 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:414-423 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:449-458 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (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.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×5
Edited copy of a member (24 corresponding lines) src/PhpSpreadsheet/Reader/Xlsx.php:2632— src/PhpSpreadsheet/Reader/Xlsx.php:2632-2655 | src/PhpSpreadsheet/Reader/Xlsx.php:2661-2691 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php:58— src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php:58-89 | src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php:121-144 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php:83— src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php:83-110 | src/PhpSpreadsheet/Calculation/Engineering/ConvertOctal.php:87-110 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) src/PhpSpreadsheet/Calculation/TextData/Search.php:31— src/PhpSpreadsheet/Calculation/TextData/Search.php:31-54 | src/PhpSpreadsheet/Calculation/TextData/Search.php:73-100 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) src/PhpSpreadsheet/Worksheet/Worksheet.php:1722— src/PhpSpreadsheet/Worksheet/Worksheet.php:1722-1749 | src/PhpSpreadsheet/Worksheet/Worksheet.php:1764-1787 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×5
Edited copy of a member (20 corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1022— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1022-1041 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1068-1089 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1171— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1171-1193 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1199-1218 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/PhpSpreadsheet/Worksheet/Worksheet.php:1942— src/PhpSpreadsheet/Worksheet/Worksheet.php:1942-1961 | src/PhpSpreadsheet/Worksheet/Worksheet.php:1966-1986 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php:129— src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php:129-148 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/StudentT.php:203-227 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/PhpSpreadsheet/Calculation/LookupRef/ChooseRowsEtc.php:90— src/PhpSpreadsheet/Calculation/LookupRef/ChooseRowsEtc.php:90-110 | src/PhpSpreadsheet/Calculation/LookupRef/ChooseRowsEtc.php:149-168 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×5
Edited copy of a member (29 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Deviations.php:62— src/PhpSpreadsheet/Calculation/Statistical/Deviations.php:62-90 | src/PhpSpreadsheet/Calculation/Statistical/Deviations.php:107-136 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) src/PhpSpreadsheet/Reader/Html.php:802— src/PhpSpreadsheet/Reader/Html.php:802-833 | src/PhpSpreadsheet/Reader/Html.php:941-969 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) src/PhpSpreadsheet/Worksheet/AutoFilter.php:114— src/PhpSpreadsheet/Worksheet/AutoFilter.php:114-142 | src/PhpSpreadsheet/Worksheet/Table.php:292-324 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Round.php:57— src/PhpSpreadsheet/Calculation/MathTrig/Round.php:57-85 | src/PhpSpreadsheet/Calculation/MathTrig/Round.php:103-131 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php:71— src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php:71-100 | src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php:93-121 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×5
Edited copies of one member (3 members, 15+ corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:848— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:848-862 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:867-882 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:887-901 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) src/PhpSpreadsheet/Calculation/Financial/CashFlow/Single.php:88— src/PhpSpreadsheet/Calculation/Financial/CashFlow/Single.php:88-105 | src/PhpSpreadsheet/Calculation/Financial/InterestRate.php:25-39 | src/PhpSpreadsheet/Calculation/Financial/InterestRate.php:54-69 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Floor.php:142— src/PhpSpreadsheet/Calculation/MathTrig/Floor.php:142-156 | src/PhpSpreadsheet/Calculation/MathTrig/Operations.php:64-86 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Tangent.php:143-158 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Fisher.php:28— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Fisher.php:28-42 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:27-41 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:136-153 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) src/PhpSpreadsheet/Reader/Ods.php:2082— src/PhpSpreadsheet/Reader/Ods.php:2082-2096 | src/PhpSpreadsheet/Reader/Ods.php:2101-2115 | src/PhpSpreadsheet/Reader/Ods.php:2120-2134 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×5
Edited copy of a member (19 corresponding lines) src/PhpSpreadsheet/Reader/Gnumeric.php:431— src/PhpSpreadsheet/Reader/Gnumeric.php:431-449 | src/PhpSpreadsheet/Reader/Gnumeric.php:490-510 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Size.php:25— src/PhpSpreadsheet/Calculation/Statistical/Size.php:25-43 | src/PhpSpreadsheet/Calculation/Statistical/Size.php:61-80 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) src/PhpSpreadsheet/Worksheet/Worksheet.php:3797— src/PhpSpreadsheet/Worksheet/Worksheet.php:3797-3822 | src/PhpSpreadsheet/Worksheet/Worksheet.php:3851-3869 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) src/PhpSpreadsheet/Calculation/DateTimeExcel/DateParts.php:33— src/PhpSpreadsheet/Calculation/DateTimeExcel/DateParts.php:33-52 | src/PhpSpreadsheet/Calculation/DateTimeExcel/Week.php:110-128 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Factorial.php:32— src/PhpSpreadsheet/Calculation/MathTrig/Factorial.php:32-55 | src/PhpSpreadsheet/Calculation/MathTrig/Factorial.php:74-92 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×5
Edited copy of a member (14 corresponding lines) src/PhpSpreadsheet/Shared/Drawing.php:50— src/PhpSpreadsheet/Shared/Drawing.php:50-63 | src/PhpSpreadsheet/Shared/Drawing.php:77-95 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/PhpSpreadsheet/Worksheet/AutoFilter.php:294— src/PhpSpreadsheet/Worksheet/AutoFilter.php:294-308 | src/PhpSpreadsheet/Worksheet/Table.php:504-517 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/PhpSpreadsheet/Calculation/DateTimeExcel/Date.php:124— src/PhpSpreadsheet/Calculation/DateTimeExcel/Date.php:124-137 | src/PhpSpreadsheet/Calculation/DateTimeExcel/Date.php:145-158 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/PhpSpreadsheet/Calculation/TextData/Extract.php:271— src/PhpSpreadsheet/Calculation/TextData/Extract.php:271-284 | src/PhpSpreadsheet/Calculation/TextData/Text.php:192-205 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/PhpSpreadsheet/Calculation/Functions.php:229— src/PhpSpreadsheet/Calculation/Functions.php:229-246 | src/PhpSpreadsheet/Calculation/Functions.php:259-272 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×5
Edited copy of a member (8 corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:714— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:714-721 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:726-733 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php:86— src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php:86-93 | src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php:99-106 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/PhpSpreadsheet/Style/NumberFormat/Wizard/Date.php:100— src/PhpSpreadsheet/Style/NumberFormat/Wizard/Date.php:100-107 | src/PhpSpreadsheet/Style/NumberFormat/Wizard/Time.php:77-84 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentHelper.php:76— src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentHelper.php:76-83 | src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentHelper.php:96-103 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/PhpSpreadsheet/Cell/Cell.php:1007— src/PhpSpreadsheet/Cell/Cell.php:1007-1014 | src/PhpSpreadsheet/Style/Supervisor.php:97-104 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
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:132— src/PhpSpreadsheet/Calculation/TextData/Extract.php:132-151 | src/PhpSpreadsheet/Calculation/TextData/Extract.php:196-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/TextData/Extract.php:132` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) src/PhpSpreadsheet/Reader/Xlsx.php:806— src/PhpSpreadsheet/Reader/Xlsx.php:806-826 | src/PhpSpreadsheet/Reader/Xlsx.php:857-876 — both copies are in the same file, so extract the 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: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. 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.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×4
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:342-418 — 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.
Edited copy of a member (26 corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/BesselI.php:112— src/PhpSpreadsheet/Calculation/Engineering/BesselI.php:112-139 | src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php:149-174 — 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.
Edited copy of a member (26 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Variances.php:24— src/PhpSpreadsheet/Calculation/Statistical/Variances.php:24-49 | src/PhpSpreadsheet/Calculation/Statistical/Variances.php:113-138 — 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.
Edited copy of a member (26 corresponding lines) src/PhpSpreadsheet/Writer/Xls/Worksheet.php:975— src/PhpSpreadsheet/Writer/Xls/Worksheet.php:975-1000 | src/PhpSpreadsheet/Writer/Xls/Worksheet.php:1016-1044 — 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 (4 members, 50+ identical tokens) · ×4
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:2131— src/PhpSpreadsheet/Reader/Xls.php:2131-2141 | src/PhpSpreadsheet/Reader/Xls.php:2192-2211 | src/PhpSpreadsheet/Reader/Xls.php:2219-2238 | src/PhpSpreadsheet/Reader/Xls.php:3635-3652 — 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:2348— src/PhpSpreadsheet/Reader/Xls.php:2348-2357 | src/PhpSpreadsheet/Reader/Xls.php:2365-2374 | src/PhpSpreadsheet/Reader/Xls.php:2382-2391 | src/PhpSpreadsheet/Reader/Xls.php:2399-2408 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×4
Edited copy of a member (21 corresponding lines) src/PhpSpreadsheet/Calculation/CalculationLocale.php:352— src/PhpSpreadsheet/Calculation/CalculationLocale.php:352-380 | src/PhpSpreadsheet/Calculation/CalculationLocale.php:391-411 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src/PhpSpreadsheet/Calculation/TextData/Replace.php:33— src/PhpSpreadsheet/Calculation/TextData/Replace.php:33-53 | src/PhpSpreadsheet/Calculation/TextData/Replace.php:73-100 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php:30— src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php:30-50 | src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php:71-101 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src/PhpSpreadsheet/Calculation/Financial/Depreciation.php:102— src/PhpSpreadsheet/Calculation/Financial/Depreciation.php:102-134 | src/PhpSpreadsheet/Calculation/Financial/Depreciation.php:183-203 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×4
Edited copy of a member (15 corresponding lines) src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php:33— src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php:33-47 | src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php:59-81 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php:43— src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php:43-57 | src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php:150-164 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/PhpSpreadsheet/Worksheet/Worksheet.php:3027— src/PhpSpreadsheet/Worksheet/Worksheet.php:3027-3041 | src/PhpSpreadsheet/Worksheet/Worksheet.php:3052-3073 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/WizardAbstract.php:88— src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/WizardAbstract.php:88-102 | src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/WizardAbstract.php:133-147 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×4
Edited copy of a member (25 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php:144— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php:144-168 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php:189-216 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) src/PhpSpreadsheet/Reader/Xls.php:2246— src/PhpSpreadsheet/Reader/Xls.php:2246-2270 | src/PhpSpreadsheet/Reader/Xls.php:2278-2302 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php:81— src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php:81-105 | src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php:144-168 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) src/PhpSpreadsheet/Reader/Xls/Biff5.php:19— src/PhpSpreadsheet/Reader/Xls/Biff5.php:19-43 | src/PhpSpreadsheet/Reader/Xls/Biff8.php:210-234 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×4
Edited copy of a member (17 corresponding lines) src/PhpSpreadsheet/Writer/Xlsx/Metadata.php:88— src/PhpSpreadsheet/Writer/Xlsx/Metadata.php:88-105 | src/PhpSpreadsheet/Writer/Xlsx/Metadata.php:110-126 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Trends.php:166— src/PhpSpreadsheet/Calculation/Statistical/Trends.php:166-182 | src/PhpSpreadsheet/Calculation/Statistical/Trends.php:420-436 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php:32— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php:32-52 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/StudentT.php:68-84 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/PhpSpreadsheet/Worksheet/AutoFilter.php:242— src/PhpSpreadsheet/Worksheet/AutoFilter.php:242-258 | src/PhpSpreadsheet/Worksheet/Table.php:456-473 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×4
Edited copy of a member (16 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Conditional.php:35— src/PhpSpreadsheet/Calculation/Statistical/Conditional.php:35-50 | src/PhpSpreadsheet/Calculation/Statistical/Conditional.php:200-217 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/PhpSpreadsheet/Reader/Xls.php:2496— src/PhpSpreadsheet/Reader/Xls.php:2496-2511 | src/PhpSpreadsheet/Reader/Xls.php:2519-2534 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/PhpSpreadsheet/Document/Security.php:116— src/PhpSpreadsheet/Document/Security.php:116-131 | src/PhpSpreadsheet/Document/Security.php:148-163 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/PhpSpreadsheet/Reader/Xls/Biff5.php:54— src/PhpSpreadsheet/Reader/Xls/Biff5.php:54-69 | src/PhpSpreadsheet/Reader/Xls/Biff8.php:113-128 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×4
Edited copy of a member (13 corresponding lines) src/PhpSpreadsheet/ReferenceHelper.php:1417— src/PhpSpreadsheet/ReferenceHelper.php:1417-1429 | src/PhpSpreadsheet/ReferenceHelper.php:1434-1446 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/PhpSpreadsheet/Writer/Xls/Worksheet.php:696— src/PhpSpreadsheet/Writer/Xls/Worksheet.php:696-708 | src/PhpSpreadsheet/Writer/Xls/Worksheet.php:723-736 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:170— src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:170-182 | src/PhpSpreadsheet/Calculation/MathTrig/Floor.php:207-222 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/PhpSpreadsheet/Collection/Cells.php:167— src/PhpSpreadsheet/Collection/Cells.php:167-180 | src/PhpSpreadsheet/Collection/Cells.php:190-202 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (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 (7 lines × 4) src/PhpSpreadsheet/Reader/Xls.php:2131— src/PhpSpreadsheet/Reader/Xls.php:2131-2137 | src/PhpSpreadsheet/Reader/Xls.php:2192-2198 | src/PhpSpreadsheet/Reader/Xls.php:2219-2225 | src/PhpSpreadsheet/Reader/Xls.php:3635-3641 — 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:2131` it does not close everything it opens, so those exact lines 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:2348— src/PhpSpreadsheet/Reader/Xls.php:2348-2354 | src/PhpSpreadsheet/Reader/Xls.php:2365-2371 | src/PhpSpreadsheet/Reader/Xls.php:2382-2388 | src/PhpSpreadsheet/Reader/Xls.php:2399-2405 — 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:2348` it does not close everything it opens, so those exact lines 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:2725— src/PhpSpreadsheet/Reader/Xls.php:2725-2731 | src/PhpSpreadsheet/Reader/Xls.php:2770-2776 | src/PhpSpreadsheet/Reader/Xls.php:2924-2930 | src/PhpSpreadsheet/Reader/Xls.php:3150-3156 — 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:2725` it does not close everything it opens, so those exact lines 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:932— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:932-938 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:946-952 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:964-970 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:977-983 — 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:939` calls `writeElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:971` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) src/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:641— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:641-647 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:654-660 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:667-673 — 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/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.
Change coupling: Dompdf.php ↔ Tcpdf.php src/PhpSpreadsheet/Writer/Pdf/Dompdf.php:1— `src/PhpSpreadsheet/Writer/Pdf/Dompdf.php` and `src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php` change together 75% of the time (18 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 18 shared commits counted here, the most recent 3 are `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:1— `src/PhpSpreadsheet/Reader/BaseReader.php` and `src/PhpSpreadsheet/Reader/IReader.php` change together 54% of the time (7 of the 13 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 7 shared commits counted here, the most recent 3 are `540e28d8` Add Psalm taint analysis annotations; `a9c6cbe1` All Readers - Allow or Forbid Fetching of External Images; `dd56df2b` :wastebasket: Deprecate `IReader::SKIP_EMPTY_CELLS` — run `git show` on any of them.
Change coupling: Metadata.php ↔ Worksheet.php src/PhpSpreadsheet/Writer/Xlsx/Metadata.php:1— `src/PhpSpreadsheet/Writer/Xlsx/Metadata.php` and `src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php` change together 50% of the time (5 of the 10 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 5 shared commits counted here, the most recent 3 are `35074f37` Finalize XLSX In-Cell Drawing Writer; `f4141428` Finalize XLSX In-Cell Drawing Writer; `d7700125` Spills — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×3
Edited copy of a member (34 corresponding lines) src/PhpSpreadsheet/Calculation/TextData/Extract.php:132— src/PhpSpreadsheet/Calculation/TextData/Extract.php:132-165 | src/PhpSpreadsheet/Calculation/TextData/Extract.php:196-229 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php:50— src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php:50-89 | src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php:161-194 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1051— src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1051-1084 | src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1090-1125 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×3
Edited copy of a member (30 corresponding lines) infra/LocaleGenerator.php:95— infra/LocaleGenerator.php:95-125 | infra/LocaleGenerator.php:165-194 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:41— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:41-70 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php:94-125 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Variances.php:66— src/PhpSpreadsheet/Calculation/Statistical/Variances.php:66-95 | src/PhpSpreadsheet/Calculation/Statistical/Variances.php:155-184 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×3
Edited copy of a member (18 corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php:82— src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php:82-103 | src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php:135-152 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/PhpSpreadsheet/Calculation/LookupRef/ChooseRowsEtc.php:122— src/PhpSpreadsheet/Calculation/LookupRef/ChooseRowsEtc.php:122-139 | src/PhpSpreadsheet/Calculation/LookupRef/ChooseRowsEtc.php:180-200 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/PhpSpreadsheet/ReferenceHelper.php:129— src/PhpSpreadsheet/ReferenceHelper.php:129-150 | src/PhpSpreadsheet/ReferenceHelper.php:186-203 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×3
Edited copies of one member (3 members, 12+ corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1046— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1046-1063 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1115-1129 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1145-1156 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) src/PhpSpreadsheet/Calculation/TextData/Extract.php:29— src/PhpSpreadsheet/Calculation/TextData/Extract.php:29-40 | src/PhpSpreadsheet/Calculation/TextData/Extract.php:59-71 | src/PhpSpreadsheet/Calculation/TextData/Extract.php:88-100 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/Compare.php:34— src/PhpSpreadsheet/Calculation/Engineering/Compare.php:34-45 | src/PhpSpreadsheet/Calculation/Engineering/Compare.php:69-80 | src/PhpSpreadsheet/Calculation/MathTrig/Operations.php:141-153 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 9+ corresponding lines) · ×3
Edited copies of one member (4 members, 9+ corresponding lines) src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Blanks.php:52— src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Blanks.php:52-62 | src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/DateValue.php:70-79 | src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Errors.php:48-58 | src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Expression.php:32-40 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 9+ corresponding lines) src/PhpSpreadsheet/Worksheet/AutoFilter.php:526— src/PhpSpreadsheet/Worksheet/AutoFilter.php:526-534 | src/PhpSpreadsheet/Worksheet/AutoFilter.php:562-570 | src/PhpSpreadsheet/Worksheet/AutoFilter.php:613-621 | src/PhpSpreadsheet/Worksheet/AutoFilter.php:638-646 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 9+ corresponding lines) src/PhpSpreadsheet/Style/Border.php:208— src/PhpSpreadsheet/Style/Border.php:208-216 | src/PhpSpreadsheet/Style/Color.php:411-419 | src/PhpSpreadsheet/Style/NumberFormat.php:465-473 | src/PhpSpreadsheet/Style/Protection.php:169-177 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×3
Edited copy of a member (5 corresponding lines) src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php:27— src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php:27-31 | src/PhpSpreadsheet/Reader/Xlsx/TableReader.php:35-40 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/PhpSpreadsheet/Calculation/Information/ErrorValue.php:66— src/PhpSpreadsheet/Calculation/Information/ErrorValue.php:66-70 | src/PhpSpreadsheet/Calculation/Information/Value.php:30-34 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/PhpSpreadsheet/Worksheet/ColumnDimension.php:112— src/PhpSpreadsheet/Worksheet/ColumnDimension.php:112-116 | src/PhpSpreadsheet/Worksheet/RowDimension.php:85-90 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (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:2009— src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2009-2027 | src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2036-2054 — both copies are in the same file, so extract the 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:2009` 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:2033` calls `array_slice` and `src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2007` 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:2632— src/PhpSpreadsheet/Reader/Xlsx.php:2632-2649 | src/PhpSpreadsheet/Reader/Xlsx.php:2664-2681 — both copies are in the same file, so extract the 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:2632` it does not close everything it opens, so those exact lines 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 (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/Xls.php:2246— src/PhpSpreadsheet/Reader/Xls.php:2246-2260 | src/PhpSpreadsheet/Reader/Xls.php:2278-2292 — both copies are in the same file, so extract the 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:2246` it does not close everything it opens, so those exact lines 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: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 (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:60— src/PhpSpreadsheet/Reader/Ods/PageSettings.php:60-64 | src/PhpSpreadsheet/Reader/Ods/PageSettings.php:101-105 | src/PhpSpreadsheet/Reader/Ods/PageSettings.php:113-117 — 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: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 (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.
Swallowed exception (empty catch) src/PhpSpreadsheet/Reader/Ods.php:1561— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/PhpSpreadsheet/Cell/DataValidator.php:71— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/PhpSpreadsheet/Cell/DataValidator.php:134— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
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.
Members sharing a duplicated core (5 members, 50+ identical tokens) src/PhpSpreadsheet/Reader/Xls/Escher.php:200— src/PhpSpreadsheet/Reader/Xls/Escher.php:200-255 | src/PhpSpreadsheet/Reader/Xls/Escher.php:266-296 | src/PhpSpreadsheet/Reader/Xls/Escher.php:307-337 | src/PhpSpreadsheet/Reader/Xls/Escher.php:348-389 | src/PhpSpreadsheet/Reader/Xls/Escher.php:400-408 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:75— src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:75-99 | src/PhpSpreadsheet/Calculation/MathTrig/Floor.php:80-101 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) src/PhpSpreadsheet/Calculation/TextData/Format.php:42— src/PhpSpreadsheet/Calculation/TextData/Format.php:42-66 | src/PhpSpreadsheet/Calculation/TextData/Format.php:84-105 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×2
Edited copy of a member (23 corresponding lines) src/PhpSpreadsheet/Calculation/Financial/TreasuryBill.php:74— src/PhpSpreadsheet/Calculation/Financial/TreasuryBill.php:74-105 | src/PhpSpreadsheet/Calculation/Financial/TreasuryBill.php:122-144 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php:111— src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php:111-133 | src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php:174-197 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 17+ corresponding lines) · ×2
Edited copies of one member (4 members, 17+ corresponding lines) src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic.php:39— src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic.php:39-55 | src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic.php:78-99 | src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic.php:122-143 | src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Payments.php:33-55 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 17+ corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:104— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:104-120 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php:32-48 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php:119-137 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Normal.php:80-96 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×2
Edited copies of one member (3 members, 14+ corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/BesselI.php:71— src/PhpSpreadsheet/Calculation/Engineering/BesselI.php:71-85 | src/PhpSpreadsheet/Calculation/Engineering/BesselK.php:83-96 | src/PhpSpreadsheet/Calculation/Engineering/BesselK.php:101-114 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) src/PhpSpreadsheet/Style/Font.php:325— src/PhpSpreadsheet/Style/Font.php:325-338 | src/PhpSpreadsheet/Style/Font.php:343-356 | src/PhpSpreadsheet/Style/Font.php:361-374 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×2
Edited copies of one member (3 members, 9+ corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:639— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:639-647 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:652-660 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:665-673 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) src/PhpSpreadsheet/Calculation/BinaryComparison.php:138— src/PhpSpreadsheet/Calculation/BinaryComparison.php:138-146 | src/PhpSpreadsheet/Calculation/BinaryComparison.php:151-161 | src/PhpSpreadsheet/Calculation/BinaryComparison.php:166-176 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×2
Edited copy of a member (6 corresponding lines) src/PhpSpreadsheet/Reader/Slk.php:385— src/PhpSpreadsheet/Reader/Slk.php:385-390 | src/PhpSpreadsheet/Reader/Slk.php:395-400 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php:45— src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php:45-50 | src/PhpSpreadsheet/Worksheet/RowCellIterator.php:45-50 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 11+ corresponding lines) · ×2
Edited copies of one member (7 members, 11+ corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosecant.php:26— src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosecant.php:26-36 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosecant.php:52-62 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cotangent.php:26-36 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cotangent.php:52-62 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Secant.php:26-36 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Secant.php:52-62 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Tangent.php:27-37 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
Edited copies of one member (7 members, 11+ corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/Sqrt.php:25— src/PhpSpreadsheet/Calculation/MathTrig/Sqrt.php:25-35 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosine.php:78-88 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosine.php:104-114 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Sine.php:78-88 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Sine.php:104-114 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Tangent.php:79-89 | src/PhpSpreadsheet/Calculation/MathTrig/Trig/Tangent.php:105-115 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 11+ corresponding lines) · ×2
Edited copies of one member (5 members, 11+ corresponding lines) src/PhpSpreadsheet/Style/Alignment.php:258— src/PhpSpreadsheet/Style/Alignment.php:258-270 | src/PhpSpreadsheet/Style/Border.php:157-170 | src/PhpSpreadsheet/Style/Font.php:310-320 | src/PhpSpreadsheet/Style/Font.php:670-682 | src/PhpSpreadsheet/Style/NumberFormat.php:270-281 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
Edited copies of one member (5 members, 11+ corresponding lines) src/PhpSpreadsheet/Calculation/TextData/CaseConvert.php:26— src/PhpSpreadsheet/Calculation/TextData/CaseConvert.php:26-36 | src/PhpSpreadsheet/Calculation/TextData/CaseConvert.php:52-62 | src/PhpSpreadsheet/Calculation/TextData/CaseConvert.php:78-88 | src/PhpSpreadsheet/Calculation/TextData/Text.php:28-38 | src/PhpSpreadsheet/Calculation/TextData/Text.php:56-67 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
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:589— src/PhpSpreadsheet/Writer/Xls.php:589-619 | src/PhpSpreadsheet/Writer/Xls.php:821-851 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (24 lines × 2) src/PhpSpreadsheet/Reader/Xlsx.php:1640— src/PhpSpreadsheet/Reader/Xlsx.php:1640-1663 | src/PhpSpreadsheet/Reader/Xlsx.php:1759-1782 — both copies are in the same file, so extract the 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:1640` 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:1637` calls `EMUToPixels`, `getArrayItemIntOrSxml`, `getAttributes` and `src/PhpSpreadsheet/Reader/Xlsx.php:1758` 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 (24 lines × 2) src/PhpSpreadsheet/Reader/Xlsx.php:1608— src/PhpSpreadsheet/Reader/Xlsx.php:1608-1631 | src/PhpSpreadsheet/Reader/Xlsx.php:1728-1751 — both copies are in the same file, so extract the 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 (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:996— src/PhpSpreadsheet/ReferenceHelper.php:996-1018 | src/PhpSpreadsheet/ReferenceHelper.php:1035-1057 — both copies are in the same file, so extract the 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:996` 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 (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:31— src/PhpSpreadsheet/Calculation/TextData/Search.php:31-46 | src/PhpSpreadsheet/Calculation/TextData/Search.php:73-88 — both copies are in the same file, so extract the 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:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 3) src/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:2474— src/PhpSpreadsheet/Reader/Xls.php:2474-2487 | src/PhpSpreadsheet/Reader/Xls.php:2496-2509 | src/PhpSpreadsheet/Reader/Xls.php:2519-2532 — 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:491— src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:491-504 | 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:297— src/PhpSpreadsheet/Reader/Xlsx.php:297-310 | src/PhpSpreadsheet/Reader/Xlsx.php:351-363 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PhpSpreadsheet/Reader/Xlsx.php:297` it does not close everything it opens, so those exact lines 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:963— src/PhpSpreadsheet/ReferenceHelper.php:963-975 | src/PhpSpreadsheet/ReferenceHelper.php:1004-1016 | src/PhpSpreadsheet/ReferenceHelper.php:1043-1055 — 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:963` it does not close everything it opens, so those 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:1003` calls `array_map`, `array_column` and `src/PhpSpreadsheet/ReferenceHelper.php:962` 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_workbook_in_chunks_using_configurable_filter_v1.php:25— samples/Reader/11_Reading_workbook_in_chunks_using_configurable_filter_v1.php:25-36 | samples/Reader/12_Reading_workbook_in_chunks_using_configurable_filter_v2.php:25-36 | samples/Reader/14_Reading_a_large_CSV_file_in_chunks_to_split_across_multiple_worksheets.php:25-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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `samples/Reader/11_Reading_workbook_in_chunks_using_configurable_filter_v1.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 (10–11 lines × 2) src/PhpSpreadsheet/Reader/Slk.php:105— src/PhpSpreadsheet/Reader/Slk.php:105-115 | src/PhpSpreadsheet/Reader/Slk.php:527-536 — both copies are in the same file, so extract the 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/Slk.php:105` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) 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 × 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:509-518 | src/PhpSpreadsheet/Writer/Xlsx/DefinedNames.php:213-222 — 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:112— src/PhpSpreadsheet/Writer/Xlsx/PivotTable.php:112-120 | 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:117— src/PhpSpreadsheet/Writer/Xlsx/RichDataDrawing.php:117-124 | 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:117` it does not close everything it opens, so those 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:678— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:678-683 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:696-701 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:758-763 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:788-793 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:804-809 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:822-827 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:836-841 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:906-911 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:993-998 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1008-1013 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1094-1099 — 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:686— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:686-691 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:704-709 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:812-817 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:826-831 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:922-927 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:983-988 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:997-1002 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1012-1017 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1028-1033 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1058-1063 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1076-1081 — 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:694` calls `formatDateDdmmyyyy` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1034` 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 × 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:53-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (6 lines × 3) src/PhpSpreadsheet/Reader/Gnumeric.php:253— src/PhpSpreadsheet/Reader/Gnumeric.php:253-258 | src/PhpSpreadsheet/Reader/Ods.php:272-277 | src/PhpSpreadsheet/Reader/Xml.php:275-280 — 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.
Xlsx.loadSpreadsheetFromFile (cyclomatic 322) src/PhpSpreadsheet/Reader/Xlsx.php:562— Xlsx.loadSpreadsheetFromFile has cyclomatic complexity 322 (threshold 15). To reduce it, separate the cases: extract each independent 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 204) src/PhpSpreadsheet/Calculation/Calculation.php:1729— Calculation.processTokenStack has cyclomatic complexity 204 (threshold 15). To reduce it, separate the cases: extract each independent 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 146) src/PhpSpreadsheet/Calculation/Calculation.php:1186— Calculation.internalParseFormula has cyclomatic complexity 146 (threshold 15). To reduce it, separate the cases: extract each independent 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 141) src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php:25— LoadSpreadsheet.loadSpreadsheetFromFile2 has cyclomatic complexity 141 (threshold 15). To reduce it, separate the cases: extract each independent 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:288— 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:81— 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 93) src/PhpSpreadsheet/Reader/Ods.php:875— Ods.processTableRow has cyclomatic complexity 93 (threshold 15). To reduce it, separate the cases: extract each independent 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:4376— 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:2798— 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.
Ods.load2 (cyclomatic 85) src/PhpSpreadsheet/Reader/Ods.php:356— Ods.load2 has cyclomatic complexity 85 (threshold 15). To reduce it, separate the cases: extract each independent 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.chartDataSeries (cyclomatic 75) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:703— 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.
ContentTypes.writeContentTypes (cyclomatic 62) src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:24— ContentTypes.writeContentTypes 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.
Style.applyFromArray (cyclomatic 61) src/PhpSpreadsheet/Style/Style.php:200— Style.applyFromArray has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
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:1737— 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:4193— 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:462— 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.
Xlsx.save (cyclomatic 53) src/PhpSpreadsheet/Writer/Xlsx.php:343— Xlsx.save has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
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:2101— 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:1029— 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) REDACTED:107— 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:1128— 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:476— 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:1388— 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:2554— 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:228— 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:2293— 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:1665— 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:788— 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:299— 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.
Formatter.toFormattedString (cyclomatic 26) src/PhpSpreadsheet/Style/NumberFormat/Formatter.php:126— Formatter.toFormattedString 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:107— 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.
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:3365— 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.
Table.writeTable (cyclomatic 23) src/PhpSpreadsheet/Writer/Xlsx/Table.php:20— Table.writeTable 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.
Html.loadProperties (cyclomatic 22) src/PhpSpreadsheet/Reader/Html.php:836— Html.loadProperties has cyclomatic complexity 22 (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.
Xlsx.listWorksheetInfoFromFile (cyclomatic 22) src/PhpSpreadsheet/Reader/Xlsx.php:349— 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) REDACTED:448— 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:724— 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:558— 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:1718— 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.
BinaryComparison.compare (cyclomatic 21) src/PhpSpreadsheet/Calculation/BinaryComparison.php:46— BinaryComparison.compare has cyclomatic complexity 21 (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.
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.
Ods.listWorksheetInfo (cyclomatic 21) src/PhpSpreadsheet/Reader/Ods.php:175— 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:2953— 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:208— 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:340— 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:1932— 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:1596— 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:2717— 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:3658— 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:700— 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.
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:108— 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:2757— 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:1369— 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:1500— 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.writeImageInCell (cyclomatic 18) src/PhpSpreadsheet/Writer/Html.php:748— Html.writeImageInCell 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:1587— 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.
Rels.writeWorksheetRelationships (cyclomatic 18) src/PhpSpreadsheet/Writer/Xlsx/Rels.php:240— Rels.writeWorksheetRelationships has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Functions.ifCondition (cyclomatic 17) src/PhpSpreadsheet/Calculation/Functions.php:154— Functions.ifCondition 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.
Functions.convertArrayToCellRange (cyclomatic 17) src/PhpSpreadsheet/Calculation/Functions.php:370— 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.
Chart.readChartEx (cyclomatic 17) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:526— Chart.readChartEx 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.
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:1447— 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:2653— 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:1649— 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:191— 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.
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:2792— 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.processDrawFrame (cyclomatic 16) src/PhpSpreadsheet/Reader/Ods.php:1298— Ods.processDrawFrame has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Ods.processTableColumn (cyclomatic 16) src/PhpSpreadsheet/Reader/Ods.php:1479— Ods.processTableColumn 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:1734— 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.
Xlsx.processIgnoredErrors (cyclomatic 16) src/PhpSpreadsheet/Reader/Xlsx.php:3033— Xlsx.processIgnoredErrors 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.
Chart.chartTitle (cyclomatic 16) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:624— 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:907— 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:2759— 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.
Drawing.collectDrawings (cyclomatic 16) src/PhpSpreadsheet/Writer/Ods/Drawing.php:50— Drawing.collectDrawings 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 1798) src/PhpSpreadsheet/Reader/Xlsx.php:562— Xlsx.loadSpreadsheetFromFile has cognitive complexity 1798 (threshold 15). Drivers by points: if/else 199 (1387 pts), loops 49 (304 pts), boolean chains 49, match/switch 7 (29 pts), ternaries 4 (22 pts), error handling 1 (7 pts) (nesting depth added 1489). 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 636) src/PhpSpreadsheet/Calculation/Calculation.php:1729— Calculation.processTokenStack has cognitive complexity 636 (threshold 15). Drivers by points: if/else 131 (472 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 431). 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:288— 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 342) src/PhpSpreadsheet/Calculation/Calculation.php:1186— Calculation.internalParseFormula has cognitive complexity 342 (threshold 15). Drivers by points: if/else 60 (224 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 212). 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:81— 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 247) src/PhpSpreadsheet/Reader/Ods.php:875— Ods.processTableRow has cognitive complexity 247 (threshold 15). Drivers by points: if/else 57 (178 pts), loops 10 (30 pts), ternaries 6 (25 pts), boolean chains 11, 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:703— 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 213) src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php:25— LoadSpreadsheet.loadSpreadsheetFromFile2 has cognitive complexity 213 (threshold 15). Drivers by points: if/else 44 (151 pts), loops 11 (25 pts), match/switch 5 (20 pts), ternaries 3 (11 pts), boolean chains 6 (nesting depth added 144). 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 187) src/PhpSpreadsheet/Style/Style.php:200— Style.applyFromArray has cognitive complexity 187 (threshold 15). Drivers by points: if/else 39 (111 pts), loops 12 (42 pts), ternaries 5 (23 pts), match/switch 2 (8 pts), boolean chains 3 (nesting depth added 126). 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:462— 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.load2 (cognitive 167) src/PhpSpreadsheet/Reader/Ods.php:356— Ods.load2 has cognitive complexity 167 (threshold 15). Drivers by points: if/else 30 (94 pts), loops 21 (44 pts), boolean chains 14, match/switch 2 (8 pts), ternaries 7 (nesting depth added 93). 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:2101— 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:2293— 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.
Xlsx.save (cognitive 108) src/PhpSpreadsheet/Writer/Xlsx.php:343— Xlsx.save has cognitive complexity 108 (threshold 15). Drivers by points: if/else 31 (69 pts), loops 13 (31 pts), boolean chains 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 57). To reduce it, split the body into named stages: move each independent 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.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:788— 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.
ContentTypes.writeContentTypes (cognitive 102) src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:24— ContentTypes.writeContentTypes has cognitive complexity 102 (threshold 15). Drivers by points: if/else 31 (61 pts), loops 15 (26 pts), boolean chains 9, match/switch 1 (4 pts), ternaries 1 (2 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent 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:1737— 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:1388— 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:2798— 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.
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:1128— 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.
Xlsx.listWorksheetInfoFromFile (cognitive 75) src/PhpSpreadsheet/Reader/Xlsx.php:349— 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.
Content.writeCells (cognitive 75) src/PhpSpreadsheet/Writer/Ods/Content.php:228— Content.writeCells has cognitive complexity 75 (threshold 15). Drivers by points: if/else 17 (51 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.
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.
Xlsx.processIgnoredErrors (cognitive 67) src/PhpSpreadsheet/Reader/Xlsx.php:3033— Xlsx.processIgnoredErrors has cognitive complexity 67 (threshold 15). Drivers by points: if/else 12 (55 pts), loops 3 (11 pts), boolean chains 1 (nesting depth added 51). To reduce it, split the body into named stages: move each independent 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:175— 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.
Worksheet.rangeToArrayYieldRows (cognitive 62) src/PhpSpreadsheet/Worksheet/Worksheet.php:3365— 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:2757— 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:724— 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:1587— 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:2717— 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:2554— 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:476— 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:208— 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:107— 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:1932— 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:558— 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:700— 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:1029— 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:1369— 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) REDACTED:107— 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:569— 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:907— 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:108— 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:1665— 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.
Formatter.toFormattedString (cognitive 36) src/PhpSpreadsheet/Style/NumberFormat/Formatter.php:126— Formatter.toFormattedString has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 8, 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.
Worksheet.changeChartSheetNames (cognitive 36) src/PhpSpreadsheet/Worksheet/Worksheet.php:967— 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.
Html.writeImageInCell (cognitive 36) src/PhpSpreadsheet/Writer/Html.php:748— Html.writeImageInCell has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (27 pts), ternaries 2 (6 pts), boolean chains 3 (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.
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.
Table.writeTable (cognitive 36) src/PhpSpreadsheet/Writer/Xlsx/Table.php:20— Table.writeTable has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 9 (11 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Root.saveBbd (cognitive 35) src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:340— 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.
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:1332— 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:2630— 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:624— 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:1500— 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.
Drawing.collectDrawings (cognitive 33) src/PhpSpreadsheet/Writer/Ods/Drawing.php:50— Drawing.collectDrawings has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (30 pts), boolean chains 2, loops 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
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:2953— 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:4090— 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.
Calculation.extractNamedRange (cognitive 31) src/PhpSpreadsheet/Calculation/Calculation.php:2792— 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.
Ods.canRead (cognitive 31) src/PhpSpreadsheet/Reader/Ods.php:77— Ods.canRead has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (23 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.
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.
Xls.readHyperLink (cognitive 30) src/PhpSpreadsheet/Reader/Xls.php:3658— 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) REDACTED:448— 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.
Workbook.writeSharedStringsTable (cognitive 30) src/PhpSpreadsheet/Writer/Xls/Workbook.php:999— 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.
LocaleGenerator.mapFunctionNameRows (cognitive 29) infra/LocaleGenerator.php:336— LocaleGenerator.mapFunctionNameRows has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (15 pts), ternaries 2 (10 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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:503— 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:2653— 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.
Ods.processTableColumn (cognitive 28) src/PhpSpreadsheet/Reader/Ods.php:1479— Ods.processTableColumn has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (9 pts), boolean chains 5 (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.
Chart.readChartEx (cognitive 28) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:526— Chart.readChartEx has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 2 (5 pts), loops 3, 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.
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:1447— 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:375— 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:218— 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:2759— 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:1596— 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:1718— 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:370— 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:1250— 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:4029— 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:299— 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.
Html.processDomElementSpanEtc (cognitive 25) src/PhpSpreadsheet/Reader/Html.php:449— Html.processDomElementSpanEtc has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 5 (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.
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.
Csv.save (cognitive 25) src/PhpSpreadsheet/Writer/Csv.php:84— Csv.save has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (4 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.
Csv.writeLine (cognitive 25) src/PhpSpreadsheet/Writer/Csv.php:289— Csv.writeLine has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 3, 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.
Html.generateRowCellData (cognitive 25) src/PhpSpreadsheet/Writer/Html.php:1649— 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.
Functions.ifCondition (cognitive 24) src/PhpSpreadsheet/Calculation/Functions.php:154— Functions.ifCondition has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (6 pts), boolean chains 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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:544— 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.
Drawing.writeDrawing (cognitive 24) src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:191— Drawing.writeDrawing has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 1 (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.
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:120— 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:192— 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:1581— 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.
BinaryComparison.compare (cognitive 22) src/PhpSpreadsheet/Calculation/BinaryComparison.php:46— BinaryComparison.compare has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 9 (11 pts) (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.
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:1313— 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.
AutoFilter.readAutoFilters (cognitive 22) src/PhpSpreadsheet/Reader/Ods/AutoFilter.php:18— AutoFilter.readAutoFilters has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (15 pts), ternaries 1 (4 pts), loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Slk.processFormula (cognitive 22) src/PhpSpreadsheet/Reader/Slk.php:177— 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:1190— 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.
AutoFilters.write (cognitive 22) src/PhpSpreadsheet/Writer/Ods/AutoFilters.php:23— AutoFilters.write has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (7 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.
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.
Xlsx.readTablesInTablesFile (cognitive 21) src/PhpSpreadsheet/Reader/Xlsx.php:2803— Xlsx.readTablesInTablesFile has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Styles.dxfs (cognitive 21) src/PhpSpreadsheet/Reader/Xlsx/Styles.php:470— 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.
ReferenceHelper.adjustDataValidations (cognitive 21) src/PhpSpreadsheet/ReferenceHelper.php:254— ReferenceHelper.adjustDataValidations has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 2 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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:3185— 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:901— 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:191— 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.
Rels.writeWorksheetRelationships (cognitive 21) src/PhpSpreadsheet/Writer/Xlsx/Rels.php:240— Rels.writeWorksheetRelationships has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, 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.
Rels.writeDrawingRelationships (cognitive 21) src/PhpSpreadsheet/Writer/Xlsx/Rels.php:416— Rels.writeDrawingRelationships has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (8 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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:671— 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:1570— 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:3375— 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.
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.
Xls.createFormulaFromTokens (cognitive 19) src/PhpSpreadsheet/Reader/Xls.php:4193— 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:847— 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:1422— 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:2180— 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.flattenArrayIndexed (cognitive 18) src/PhpSpreadsheet/Calculation/Functions.php:295— 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:264— 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:1948— 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:2378— 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:1062— 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.
FractionFormatter.format (cognitive 18) src/PhpSpreadsheet/Style/NumberFormat/FractionFormatter.php:10— FractionFormatter.format has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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.
Html.loadProperties (cognitive 17) src/PhpSpreadsheet/Reader/Html.php:836— Html.loadProperties has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 2 (8 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.readColor (cognitive 17) src/PhpSpreadsheet/Reader/Xlsx/Chart.php:1581— 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.
PPS.validateName (cognitive 17) src/PhpSpreadsheet/Shared/OLE/PPS.php:311— PPS.validateName has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Html.generateHTMLHeader (cognitive 17) src/PhpSpreadsheet/Writer/Html.php:445— Html.generateHTMLHeader has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 4 (7 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.
Html.extendRowsAndColumns (cognitive 17) src/PhpSpreadsheet/Writer/Html.php:697— 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:170— 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:1111— 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:2453— 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.
Ods.processDrawFrame (cognitive 16) src/PhpSpreadsheet/Reader/Ods.php:1298— Ods.processDrawFrame has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (6 pts), loops 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.
Ods.getFontStyles (cognitive 16) src/PhpSpreadsheet/Reader/Ods.php:1734— 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:4376— 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:3134— 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.
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:3188— 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.
Worksheet.writeHyperlinks (cognitive 16) src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:1074— Worksheet.writeHyperlinks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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:506-551 | src/PhpSpreadsheet/Writer/Xlsx/DefinedNames.php:210-255 — 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.
D4 · Code Duplication· Members sharing a duplicated core (23 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (23 members, 50+ identical tokens) src/PhpSpreadsheet/Writer/Xlsx/ChartEx.php:23— src/PhpSpreadsheet/Writer/Xlsx/ChartEx.php:23-58 | src/PhpSpreadsheet/Writer/Xlsx/Comments.php:29-72 | src/PhpSpreadsheet/Writer/Xlsx/Comments.php:105-164 | src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:27-315 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:21-108 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:119-182 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:192-253 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:27-80 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:389-523 | 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-486 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:497-524 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:530-561 | 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-119 | src/PhpSpreadsheet/Writer/Xlsx/Workbook.php:25-68 — These 23 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 23 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 23 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:2714— src/PhpSpreadsheet/Reader/Xls.php:2714-2745 | src/PhpSpreadsheet/Reader/Xls.php:2759-2846 | src/PhpSpreadsheet/Reader/Xls.php:2859-2900 | src/PhpSpreadsheet/Reader/Xls.php:2913-2942 | src/PhpSpreadsheet/Reader/Xls.php:2955-3070 | src/PhpSpreadsheet/Reader/Xls.php:3139-3186 | src/PhpSpreadsheet/Reader/Xls.php:3199-3228 | src/PhpSpreadsheet/Reader/Xls.php:3245-3282 | src/PhpSpreadsheet/Reader/Xls.php:3290-3315 | src/PhpSpreadsheet/Reader/Xls.php:3460-3488 | src/PhpSpreadsheet/Reader/Xls.php:3497-3510 — 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:2416-2465 | src/PhpSpreadsheet/Reader/Xls.php:2578-2623 | src/PhpSpreadsheet/Reader/Xls.php:2638-2698 | src/PhpSpreadsheet/Reader/Xls.php:3518-3544 — 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· Edited copy of a member (105 corresponding lines) · ×1
Edited copy of a member (105 corresponding lines) src/PhpSpreadsheet/Writer/Xls.php:589— src/PhpSpreadsheet/Writer/Xls.php:589-784 | src/PhpSpreadsheet/Writer/Xls.php:821-925 — These two members are one piece of code written twice and then edited apart: 105 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (70 corresponding lines) · ×1
Edited copy of a member (70 corresponding lines) src/PhpSpreadsheet/Writer/Ods/Content.php:52— src/PhpSpreadsheet/Writer/Ods/Content.php:52-121 | src/PhpSpreadsheet/Writer/Ods/Styles.php:16-87 — These two members are one piece of code written twice and then edited apart: 70 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (131 corresponding lines) · ×1
Edited copy of a member (131 corresponding lines) src/PhpSpreadsheet/Reader/Xls.php:401— src/PhpSpreadsheet/Reader/Xls.php:401-540 | src/PhpSpreadsheet/Reader/Xls.php:548-678 — These two members are one piece of code written twice and then edited apart: 131 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (90 corresponding lines) · ×1
Edited copy of a member (90 corresponding lines) src/PhpSpreadsheet/Reader/Xls/ListFunctions.php:67— src/PhpSpreadsheet/Reader/Xls/ListFunctions.php:67-166 | src/PhpSpreadsheet/Reader/Xls/ListFunctions.php:176-265 — These two members are one piece of code written twice and then edited apart: 90 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) REDACTED:184— REDACTED:184-223 | REDACTED:229-272 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (74 corresponding lines) · ×1
Edited copy of a member (74 corresponding lines) src/PhpSpreadsheet/Worksheet/Worksheet.php:2655— src/PhpSpreadsheet/Worksheet/Worksheet.php:2655-2728 | src/PhpSpreadsheet/Worksheet/Worksheet.php:2761-2842 — These two members are one piece of code written twice and then edited apart: 74 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 35+ corresponding lines) · ×1
Edited copies of one member (3 members, 35+ corresponding lines) src/PhpSpreadsheet/ReferenceHelper.php:953— src/PhpSpreadsheet/ReferenceHelper.php:953-989 | src/PhpSpreadsheet/ReferenceHelper.php:994-1028 | src/PhpSpreadsheet/ReferenceHelper.php:1033-1067 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 35 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Cumulative.php:39— src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Cumulative.php:39-73 | src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Cumulative.php:102-136 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×1
Edited copy of a member (31 corresponding lines) src/PhpSpreadsheet/ReferenceHelper.php:1252— src/PhpSpreadsheet/ReferenceHelper.php:1252-1282 | src/PhpSpreadsheet/ReferenceHelper.php:1334-1365 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php:30— src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php:30-61 | src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php:29-65 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 18+ corresponding lines) · ×1
Edited copies of one member (4 members, 18+ corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php:70— src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php:70-89 | src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php:94-115 | src/PhpSpreadsheet/Calculation/Engineering/BesselY.php:82-99 | src/PhpSpreadsheet/Calculation/Engineering/BesselY.php:104-121 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) src/PhpSpreadsheet/Calculation/Financial/Dollar.php:55— src/PhpSpreadsheet/Calculation/Financial/Dollar.php:55-81 | src/PhpSpreadsheet/Calculation/Financial/Dollar.php:103-129 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 25+ corresponding lines) · ×1
Edited copies of one member (3 members, 25+ corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php:38— src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php:38-62 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php:86-116 | src/PhpSpreadsheet/Calculation/Statistical/Distributions/HyperGeometric.php:34-73 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) src/PhpSpreadsheet/Shared/Xls.php:24— src/PhpSpreadsheet/Shared/Xls.php:24-51 | src/PhpSpreadsheet/Shared/Xls.php:67-94 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 20+ corresponding lines) · ×1
Edited copies of one member (3 members, 20+ corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php:50— src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php:50-71 | src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php:107-126 | src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php:183-202 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×1
Edited copies of one member (3 members, 18+ corresponding lines) src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php:68— src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php:68-85 | src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php:96-113 | src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php:124-141 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Trends.php:222— src/PhpSpreadsheet/Calculation/Statistical/Trends.php:222-265 | src/PhpSpreadsheet/Calculation/Statistical/Trends.php:283-332 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (43 corresponding lines) · ×1
Edited copy of a member (43 corresponding lines) src/PhpSpreadsheet/Reader/Ods.php:827— src/PhpSpreadsheet/Reader/Ods.php:827-872 | src/PhpSpreadsheet/Reader/Ods.php:1431-1473 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 24+ corresponding lines) · ×1
Edited copies of one member (4 members, 24+ corresponding lines) src/PhpSpreadsheet/Calculation/Statistical/Maximum.php:23— src/PhpSpreadsheet/Calculation/Statistical/Maximum.php:23-46 | src/PhpSpreadsheet/Calculation/Statistical/Maximum.php:61-85 | src/PhpSpreadsheet/Calculation/Statistical/Minimum.php:23-46 | src/PhpSpreadsheet/Calculation/Statistical/Minimum.php:61-85 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) src/PhpSpreadsheet/Calculation/DateTimeExcel/Days.php:35— src/PhpSpreadsheet/Calculation/DateTimeExcel/Days.php:35-56 | src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php:39-55 | src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php:83-102 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 14+ corresponding lines) · ×1
Edited copies of one member (5 members, 14+ corresponding lines) src/PhpSpreadsheet/Calculation/Engineering/BitWise.php:41— src/PhpSpreadsheet/Calculation/Engineering/BitWise.php:41-54 | src/PhpSpreadsheet/Calculation/Engineering/BitWise.php:73-87 | src/PhpSpreadsheet/Calculation/Engineering/BitWise.php:106-120 | src/PhpSpreadsheet/Calculation/Engineering/BitWise.php:139-155 | src/PhpSpreadsheet/Calculation/Engineering/BitWise.php:174-190 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×1
Edited copies of one member (3 members, 8+ corresponding lines) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:585— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:585-592 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:597-604 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:609-617 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) src/PhpSpreadsheet/Reader/Xls.php:1784— src/PhpSpreadsheet/Reader/Xls.php:1784-1810 | src/PhpSpreadsheet/Reader/Xls.php:1818-1838 | src/PhpSpreadsheet/Reader/Xls.php:3111-3126 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) src/PhpSpreadsheet/Reader/Xls/Escher.php:149— src/PhpSpreadsheet/Reader/Xls/Escher.php:149-159 | src/PhpSpreadsheet/Reader/Xls/Escher.php:179-189 | src/PhpSpreadsheet/Reader/Xls/Escher.php:445-455 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) src/PhpSpreadsheet/Writer/Xlsx/Style.php:665— src/PhpSpreadsheet/Writer/Xlsx/Style.php:665-674 | src/PhpSpreadsheet/Writer/Xlsx/Style.php:685-694 | src/PhpSpreadsheet/Writer/Xlsx/Style.php:705-714 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 10+ corresponding lines) · ×1
Edited copies of one member (4 members, 10+ corresponding lines) src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Blanks.php:67— src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Blanks.php:67-79 | src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/DateValue.php:84-93 | src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Duplicates.php:46-58 | src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Errors.php:63-75 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 12+ corresponding lines) · ×1
Edited copies of one member (5 members, 12+ corresponding lines) src/PhpSpreadsheet/Writer/Xls/Worksheet.php:656— src/PhpSpreadsheet/Writer/Xls/Worksheet.php:656-668 | src/PhpSpreadsheet/Writer/Xls/Worksheet.php:1769-1780 | src/PhpSpreadsheet/Writer/Xls/Worksheet.php:1788-1799 | src/PhpSpreadsheet/Writer/Xls/Worksheet.php:1807-1818 | src/PhpSpreadsheet/Writer/Xls/Worksheet.php:1826-1837 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×1
Edited copies of one member (3 members, 13+ corresponding lines) src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2063— src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2063-2075 | src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2084-2099 | src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2108-2123 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 8+ corresponding lines) · ×1
Edited copies of one member (7 members, 8+ corresponding lines) src/PhpSpreadsheet/Calculation/Database/DAverage.php:35— src/PhpSpreadsheet/Calculation/Database/DAverage.php:35-42 | src/PhpSpreadsheet/Calculation/Database/DCountA.php:35-42 | src/PhpSpreadsheet/Calculation/Database/DProduct.php:35-42 | src/PhpSpreadsheet/Calculation/Database/DStDev.php:36-43 | src/PhpSpreadsheet/Calculation/Database/DStDevP.php:36-43 | src/PhpSpreadsheet/Calculation/Database/DVar.php:38-45 | src/PhpSpreadsheet/Calculation/Database/DVarP.php:38-45 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) src/PhpSpreadsheet/Worksheet/AutoFilter.php:226— src/PhpSpreadsheet/Worksheet/AutoFilter.php:226-229 | src/PhpSpreadsheet/Worksheet/Table.php:442-445 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 5+ corresponding lines) · ×1
Edited copies of one member (4 members, 5+ corresponding lines) src/PhpSpreadsheet/Calculation/DateTimeExcel/DateValue.php:45— src/PhpSpreadsheet/Calculation/DateTimeExcel/DateValue.php:45-49 | src/PhpSpreadsheet/Calculation/Engineering/Erf.php:71-75 | src/PhpSpreadsheet/Calculation/Information/ErrorValue.php:23-27 | src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php:29-33 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
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:722— src/PhpSpreadsheet/Writer/Xls.php:722-750 | src/PhpSpreadsheet/Writer/Xls.php:864-893 — both copies are in the same file, so extract the 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:722` it does not close everything it opens, so those 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:751` calls `pack`, `elseif` and `src/PhpSpreadsheet/Writer/Xls.php:895` 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 (27 lines × 2) src/PhpSpreadsheet/Reader/Xlsx.php:1573— src/PhpSpreadsheet/Reader/Xlsx.php:1573-1599 | src/PhpSpreadsheet/Reader/Xlsx.php:1686-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:1573` it does not close everything it opens, so those exact lines 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:403-424 — 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 (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:510-530 | src/PhpSpreadsheet/Writer/Xlsx/DefinedNames.php:214-234 — 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:1772— src/PhpSpreadsheet/Calculation/Calculation.php:1772-1791 | src/PhpSpreadsheet/Calculation/Calculation.php:1807-1825 — both copies are in the same file, so extract the 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:1772` 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:2714— src/PhpSpreadsheet/Reader/Xls.php:2714-2724 | src/PhpSpreadsheet/Reader/Xls.php:2759-2769 | src/PhpSpreadsheet/Reader/Xls.php:2859-2869 | src/PhpSpreadsheet/Reader/Xls.php:2913-2923 | src/PhpSpreadsheet/Reader/Xls.php:2955-2965 | src/PhpSpreadsheet/Reader/Xls.php:3139-3149 | src/PhpSpreadsheet/Reader/Xls.php:3199-3209 | src/PhpSpreadsheet/Reader/Xls.php:3245-3255 | src/PhpSpreadsheet/Reader/Xls.php:3290-3300 | src/PhpSpreadsheet/Reader/Xls.php:3460-3478 | src/PhpSpreadsheet/Reader/Xls.php:3497-3507 — 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:3890-3907 | 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:2416-2424 | src/PhpSpreadsheet/Reader/Xls.php:2578-2586 | src/PhpSpreadsheet/Reader/Xls.php:2638-2646 | src/PhpSpreadsheet/Reader/Xls.php:3518-3526 — 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:2589` calls `getUInt2d` and `src/PhpSpreadsheet/Reader/Xls.php:2655` 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:293— src/PhpSpreadsheet/Writer/Xls.php:293-309 | src/PhpSpreadsheet/Writer/Xls.php:354-369 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (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 (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 (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:27-39 | 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 (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 (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 (11–12 lines × 19) src/PhpSpreadsheet/Writer/Xlsx/ChartEx.php:37— src/PhpSpreadsheet/Writer/Xlsx/ChartEx.php:37-48 | src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:28-38 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:22-32 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:120-130 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:199-209 | 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:498-508 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:531-541 | 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 19 copies across 12 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 19 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 (6–12 lines × 9) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:683— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:683-688 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:701-706 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:809-814 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:911-916 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:949-954 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:980-985 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1025-1030 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1049-1060 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1070-1078 — 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:1049` 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:3027— src/PhpSpreadsheet/Worksheet/Worksheet.php:3027-3037 | src/PhpSpreadsheet/Worksheet/Worksheet.php:3052-3063 — both copies are in the same file, so extract the 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:3027` it does not close everything it opens, so those exact lines 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 × 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 (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 (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:415-424 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:495-504 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:293-302 | src/PhpSpreadsheet/Writer/Xlsx/Theme.php:317-326 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. 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:505` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–10 lines × 2) src/PhpSpreadsheet/Calculation/Calculation.php:2746— src/PhpSpreadsheet/Calculation/Calculation.php:2746-2754 | src/PhpSpreadsheet/Calculation/Calculation.php:2767-2776 — both copies are in the same file, so extract the 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:2746` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22–24 lines × 2) src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:158— src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:158-181 | src/PhpSpreadsheet/Shared/OLE/PPS/Root.php:342-363 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (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:27-35 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:21-29 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:119-127 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:198-206 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:32-40 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:389-397 | 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:497-505 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:530-538 | 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 — there are 21 copies across 12 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 21 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/Table.php:35` calls `rangeWithRoomForData` and `src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.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 (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 (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:2838— src/PhpSpreadsheet/Reader/Xls.php:2838-2845 | src/PhpSpreadsheet/Reader/Xls.php:3274-3282 — both copies are in the same file, so extract the 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:2838` 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 × 22) src/PhpSpreadsheet/Writer/Xlsx/ChartEx.php:37— src/PhpSpreadsheet/Writer/Xlsx/ChartEx.php:37-46 | src/PhpSpreadsheet/Writer/Xlsx/Comments.php:30-37 | src/PhpSpreadsheet/Writer/Xlsx/Comments.php:106-113 | src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:28-35 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:22-29 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:120-127 | src/PhpSpreadsheet/Writer/Xlsx/DocProps.php:199-206 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:33-40 | src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:390-397 | src/PhpSpreadsheet/Writer/Xlsx/FeaturePropertyBag.php:18-25 | src/PhpSpreadsheet/Writer/Xlsx/Metadata.php:22-29 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:24-31 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:96-103 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:244-251 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:426-433 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:498-505 | src/PhpSpreadsheet/Writer/Xlsx/Rels.php:531-538 | src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php:20-27 | src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php:19-26 | src/PhpSpreadsheet/Writer/Xlsx/StringTable.php:73-80 | src/PhpSpreadsheet/Writer/Xlsx/Style.php:29-36 | src/PhpSpreadsheet/Writer/Xlsx/Table.php:24-31 — there are 22 copies across 13 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 22 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/Table.php:35` calls `rangeWithRoomForData` and `src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.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 (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 (6–7 lines × 15) src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:680— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:680-685 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:698-703 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:760-765 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:790-795 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:806-811 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:824-829 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:908-913 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:950-955 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:981-986 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:995-1000 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1010-1015 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1026-1031 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1051-1057 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1070-1075 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1096-1101 — 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:1051` 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:948` calls `writeElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:679` 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:585— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:585-590 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:597-602 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:609-614 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:622-627 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:639-644 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:652-657 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:665-670 — 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:615` calls `writeAttribute` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:591` 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:714— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:714-719 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:726-731 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:774-779 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:848-853 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:867-872 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:887-892 — 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:874` calls `writeAttribute` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:855` 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:1118— src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1118-1123 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1148-1153 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1173-1178 | src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1201-1206 — 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:1117` calls `WriteElement` and `src/PhpSpreadsheet/Writer/Ods/Cell/Style.php:1172` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 5) src/PhpSpreadsheet/Reader/Xls/Escher.php:202— src/PhpSpreadsheet/Reader/Xls/Escher.php:202-206 | src/PhpSpreadsheet/Reader/Xls/Escher.php:268-272 | src/PhpSpreadsheet/Reader/Xls/Escher.php:309-313 | src/PhpSpreadsheet/Reader/Xls/Escher.php:350-354 | src/PhpSpreadsheet/Reader/Xls/Escher.php:402-406 — 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.
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:267-274 | 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 (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.
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.
X18 · Disposal-pattern correctness· Disposable created and abandoned in the function that made it · ×1
Disposable created and abandoned in the function that made it src/PhpSpreadsheet/Writer/Xls/Worksheet.php:2429— `fopen()` is called here and hands back a handle the caller must close — and it is held in `$bmp_fd`, and every use of `$bmp_fd` in the function reads through it or tests it — it is never closed, returned, passed, captured or stored. PHP frees an unclosed handle when its last reference goes, which is the end of the function at the earliest, not a point this code states: the descriptor stays open for the rest of the call (a long loop, a long-running worker holds many), buffered writes are flushed only then, and a failed flush is reported nowhere. Close it where it is done with: `fclose($handle);`, in a `finally` if the code between can throw.
Orphaned file src/PhpSpreadsheet/Calculation/Financial/Coupons.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file infra/LocaleGenerator.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Collection/Cells.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Calculation/Statistical/Trends.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Calculation/Engine/Operands/StructuredReference.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Style/ConditionalFormatting/CellMatcher.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Style/Borders.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Style/Fill.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Calculation/Financial/Depreciation.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Writer/Xlsx/DefinedNames.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Calculation/TextData/Text.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Writer/Pdf.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Calculation/Logical/Conditional.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Style/Conditional.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Writer/Xlsx/Comments.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Cell/AdvancedValueBinder.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Calculation/Financial/Amortization.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Calculation/Statistical/Averages.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Comment.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic.php:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate src/PhpSpreadsheet/Calculation/Statistical/Conditional.php:97— `!is_array($range) || array_key_exists(0, $range)` appears character-identically in 2 files — src/PhpSpreadsheet/Calculation/Statistical/Conditional.php, src/PhpSpreadsheet/Calculation/Statistical/Counts.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Writer/Xls.php:154— `$cVal instanceof RichText && (string) $cVal === ''` appears character-identically in 2 files — src/PhpSpreadsheet/Writer/Xls.php, src/PhpSpreadsheet/Writer/Xls/Worksheet.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php:60— `$period <= 0 || $period > $numberOfPeriods` appears character-identically in 2 files — src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php, src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Payments.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/CellValue.php:195— `$retVal && in_array($value, self::MAGIC_OPERATIONS, true)` appears character-identically in 2 files — src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/CellValue.php, src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/TextValue.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Worksheet/Column.php:93— `$value === '' && $emptyStringCellIsEmpty === true` appears character-identically in 2 files — src/PhpSpreadsheet/Worksheet/Column.php, src/PhpSpreadsheet/Worksheet/Row.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Worksheet/Column.php:90— `$value === null && $nullValueCellIsEmpty === true` appears character-identically in 2 files — src/PhpSpreadsheet/Worksheet/Column.php, src/PhpSpreadsheet/Worksheet/Row.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Calculation/DateTimeExcel/NetworkDays.php:74— `($holidayDate >= $startDate) && ($holidayDate <= $endDate)` appears character-identically in 2 files — src/PhpSpreadsheet/Calculation/DateTimeExcel/NetworkDays.php, src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:91— `($number > 0 && $significance < 0) || ($number < 0 && $significance > 0)` appears character-identically in 2 files — src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php, src/PhpSpreadsheet/Calculation/MathTrig/Floor.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Writer/Xls/Workbook.php:530— `($offset === 0) || ($definedRange[$offset - 1] !== ':')` appears character-identically in 2 files — src/PhpSpreadsheet/Writer/Xls/Workbook.php, src/PhpSpreadsheet/Writer/Xlsx/DefinedNames.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Worksheet/AutoFilter.php:137— `($rangeStart[0] > $colIndex) || ($rangeEnd[0] < $colIndex)` appears character-identically in 2 files — src/PhpSpreadsheet/Worksheet/AutoFilter.php, src/PhpSpreadsheet/Worksheet/Table.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Worksheet/AutoFilter.php:184— `($rangeStart[0] > $columnIndex) || ($rangeEnd[0] < $columnIndex)` appears character-identically in 2 files — src/PhpSpreadsheet/Worksheet/AutoFilter.php, src/PhpSpreadsheet/Worksheet/Table.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php:99— `($row < $this->startRow) || ($row > $this->endRow)` appears character-identically in 2 files — src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php, src/PhpSpreadsheet/Worksheet/RowIterator.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php:207— `(abs($f_mid) < self::FINANCIAL_PRECISION) || (abs($dx) < self::FINANCIAL_PRECISION)` appears character-identically in 2 files — src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php, src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/Periodic.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Calculation/Statistical/Averages/Mean.php:64— `(is_numeric($arg)) && (!is_string($arg))` appears character-identically in 6 files — src/PhpSpreadsheet/Calculation/Statistical/Averages/Mean.php, src/PhpSpreadsheet/Calculation/Statistical/Deviations.php, src/PhpSpreadsheet/Calculation/Statistical/Maximum.php, src/PhpSpreadsheet/Calculation/Statistical/Minimum.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Calculation/Statistical/Maximum.php:72— `(is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))` appears character-identically in 3 files — src/PhpSpreadsheet/Calculation/Statistical/Maximum.php, src/PhpSpreadsheet/Calculation/Statistical/Minimum.php, src/PhpSpreadsheet/Calculation/Statistical/Variances.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Writer/Xlsx/Rels.php:325— `count($worksheet->getComments()) > 0 || isset($unparsedLoadedData['sheets'][$worksheet->getCodeName()]['legacyDrawing'])` appears character-identically in 2 files — src/PhpSpreadsheet/Writer/Xlsx/Rels.php, src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Reader/Gnumeric.php:344— `createBlankSheetIfNoneRead && !$sheetCreated` appears character-identically in 5 files — src/PhpSpreadsheet/Reader/Gnumeric.php, src/PhpSpreadsheet/Reader/Ods.php, src/PhpSpreadsheet/Reader/Xls/LoadSpreadsheet.php, src/PhpSpreadsheet/Reader/Xlsx.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php:30— `is_array($lookupValue) || is_array($indexNumber)` appears character-identically in 2 files — src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php, src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php:30— `is_array($numObjs) || is_array($numInSet)` appears character-identically in 2 files — src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php, src/PhpSpreadsheet/Calculation/Statistical/Permutations.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:36— `is_array($number) || is_array($significance)` appears character-identically in 2 files — src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php, src/PhpSpreadsheet/Calculation/MathTrig/Floor.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php:75— `is_array($number) || is_array($significance) || is_array($mode)` appears character-identically in 2 files — src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php, src/PhpSpreadsheet/Calculation/MathTrig/Floor.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Calculation/Calculation.php:2007— `is_array($operand1) || is_array($operand2)` appears character-identically in 2 files — src/PhpSpreadsheet/Calculation/Calculation.php, src/PhpSpreadsheet/Calculation/TextData/Concatenate.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php:129— `is_array($probability) || is_array($degrees)` appears character-identically in 2 files — src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php, src/PhpSpreadsheet/Calculation/Statistical/Distributions/StudentT.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php:119— `is_array($probability) || is_array($mean) || is_array($stdDev)` appears character-identically in 2 files — src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php, src/PhpSpreadsheet/Calculation/Statistical/Distributions/Normal.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/PhpSpreadsheet/Calculation/DateTimeExcel/Days360.php:49— `is_array($startDate) || is_array($endDate) || is_array($method)` appears character-identically in 2 files — src/PhpSpreadsheet/Calculation/DateTimeExcel/Days360.php, src/PhpSpreadsheet/Calculation/DateTimeExcel/YearFrac.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 63 significant file(s) lose their only recent owner: src/PhpSpreadsheet/Writer/Xlsx/Chart.php, src/PhpSpreadsheet/Worksheet/AutoFilter.php, src/PhpSpreadsheet/Reader/Xml.php, src/PhpSpreadsheet/Chart/Properties.php, src/PhpSpreadsheet/Style/Style.php, src/PhpSpreadsheet/Shared/StringHelper.php, src/PhpSpreadsheet/Helper/Html.php, src/PhpSpreadsheet/Writer/Xlsx/Style.php (+55 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.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: src/PhpSpreadsheet/Writer/Xlsx/DocProps.php, src/PhpSpreadsheet/Writer/Ods/Meta.php, src/PhpSpreadsheet/Writer/Ods/AutoFilters.php. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 6 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 (78 single-owned of 373 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 373 of the 552 production source files in this repository met that bar). They are anonymized user #4 (2 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)), anonymized user #9 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php, src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php, REDACTED, src/PhpSpreadsheet/Writer/Xlsx/Metadata.php, src/PhpSpreadsheet/Calculation/TextData/Thai.php, src/PhpSpreadsheet/Style/NumberFormat/FractionFormatter.php, src/PhpSpreadsheet/Writer/IWriter.php.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
REDACTED
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 127 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/Collection/Cells.php, src/PhpSpreadsheet/Calculation/Statistical/Trends.php, src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php, src/PhpSpreadsheet/Calculation/Engine/Operands/StructuredReference.php, src/PhpSpreadsheet/Style/ConditionalFormatting/CellMatcher.php, src/PhpSpreadsheet/Style/Borders.php, src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php (and 119 more) (131 orphaned of 373 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 373 of the 552 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.
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): testColumnsOnSpreadsheet tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnsOnSpreadsheetTest.php:12— 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): testRowsOnSpreadsheet tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowsOnSpreadsheetTest.php:12— 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()
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.
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 01a1d6d5-6273-7ce0-9ef6-1b189c186246 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 39 · Warnings: 1226 · Recommendations: 168 · Info: 69 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 13-11-2026 @ 21:34 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.