Repository Analysis

PHPOffice/PhpSpreadsheet

A pure PHP library for reading and writing spreadsheet files

4.0 Likely human-written View on GitHub
4.0
Adjusted Score
4.0
Raw Score
100%
Time Factor
2026-05-19
Last Push
13,935
Stars
PHP
Language
320,521
Lines of Code
2667
Files
1230
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 1HIGH 0MEDIUM 1LOW 1228

Pattern Findings

1230 matches across 5 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers1130 hits · 1180 pts
SeverityFileLineSnippet
LOWinfra/LocaleGenerator.php129 protected function writeConfigArgumentSeparator($configFile, string $column): void
LOWinfra/LocaleGenerator.php145 protected function writeConfigCurrencySymbol($configFile, string $column): void
LOWinfra/LocaleGenerator.php163 protected function buildFunctionsFileForLocale(string $column, string $locale): void
LOWinfra/DocumentGenerator.php22 public static function generateFunctionListByCategory($phpSpreadsheetFunctions): string
LOWinfra/DocumentGenerator.php74 private static function getPhpSpreadsheetFunctionText(mixed $functionCall): string
LOWinfra/DocumentGenerator.php94 public static function generateFunctionListByName(array $phpSpreadsheetFunctions, bool $compact = false): string
LOWtests/Benchmark/SpreadsheetCopyBenchmarkTest.php31 private function createPopulatedSpreadsheet(): Spreadsheet
LOWtests/Benchmark/SpreadsheetCopyBenchmarkTest.php114 public function testCloneVsSerializeBenchmark(): void
LOWtests/Benchmark/FormulaTokenCacheBenchmarkTest.php41 public function testParseFormulaCacheEnabledVsDisabled(): void
LOWtests/Benchmark/FormulaTokenCacheBenchmarkTest.php108 public function testParseFormulaCacheVsNocache(): void
LOWtests/PhpSpreadsheetTests/IOFactoryRegisterTest.php36 public function testRegisterInvalidWriter(): void
LOWtests/PhpSpreadsheetTests/IOFactoryRegisterTest.php43 public function testRegisterInvalidReader(): void
LOWtests/PhpSpreadsheetTests/DefinedNameTest.php41 public function testAddDuplicateDefinedName(): void
LOWtests/PhpSpreadsheetTests/DefinedNameTest.php56 public function testAddScopedDefinedNameWithSameName(): void
LOWtests/PhpSpreadsheetTests/DefinedNameTest.php89 public function testRemoveGlobalDefinedName(): void
LOWtests/PhpSpreadsheetTests/DefinedNameTest.php101 public function testRemoveGlobalDefinedNameWhenDuplicateNames(): void
LOWtests/PhpSpreadsheetTests/DefinedNameTest.php118 public function testRemoveScopedDefinedNameWhenDuplicateNames(): void
LOWtests/PhpSpreadsheetTests/DefinedNameTest.php135 public function testDefinedNameNoWorksheetNoScope(): void
LOWtests/PhpSpreadsheetTests/NamedFormulaTest.php42 public function testAddDuplicateNamedRange(): void
LOWtests/PhpSpreadsheetTests/NamedFormulaTest.php60 public function testAddScopedNamedFormulaWithSameName(): void
LOWtests/PhpSpreadsheetTests/NamedFormulaTest.php98 public function testRemoveGlobalNamedFormulaWhenDuplicateNames(): void
LOWtests/PhpSpreadsheetTests/NamedFormulaTest.php118 public function testRemoveScopedNamedFormulaWhenDuplicateNames(): void
LOWtests/PhpSpreadsheetTests/NamedFormulaTest.php138 public function testRemoveNonExistentNamedFormula(): void
LOWtests/PhpSpreadsheetTests/SpreadsheetCopyCloneTest.php216 public function testCopySheetCountMatches(string $type): void
LOWtests/PhpSpreadsheetTests/SpreadsheetCopyCloneTest.php268 public function testCopyNamedRangesReferenceNewSpreadsheet(string $type): void
LOWtests/PhpSpreadsheetTests/SpreadsheetCopyCloneTest.php294 public function testCopyCanBeSavedWithoutErrors(string $type): void
LOWtests/PhpSpreadsheetTests/SpreadsheetCopyCloneTest.php333 public function testCopyWorksheetsAreIndependent(string $type): void
LOWtests/PhpSpreadsheetTests/RichTextTest.php15 public function testConstructorSpecifyingCell(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php121 public function testUpdateFormulaForMultipleWorksheets(string $formula, int $insertRows, int $insertColumns, string
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php130 public static function providerMultipleWorksheetFormulaUpdates(): array
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php135 public function testInsertNewBeforeRetainDataType(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php154 public function testRemoveColumnShiftsCorrectColumnValueIntoRemovedColumnCoordinates(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php183 public function testInsertRowsWithPageBreaks(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php199 public function testDeleteRowsWithPageBreaks(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php214 public function testInsertRowsWithComments(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php233 public function testDeleteRowsWithComments(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php252 public function testInsertRowsWithHyperlinks(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php278 public function testDeleteRowsWithHyperlinks(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php297 public function testInsertRowsWithConditionalFormatting(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php321 public function testInsertColumnssWithConditionalFormatting(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php345 public function testDeleteRowsWithConditionalFormatting(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php369 public function testDeleteColumnsWithConditionalFormatting(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php413 public function testInsertRowsWithPrintArea(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php426 public function testInsertColumnsWithPrintArea(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php439 public function testDeleteRowsWithPrintArea(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php452 public function testDeleteColumnsWithPrintArea(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php465 public function testInsertDeleteRowsWithDefinedNames(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php514 public function testInsertDeleteColumnsWithDefinedNames(): void
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php555 private function buildDefinedNamesTestWorkbook(): Spreadsheet
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php590 private function buildDefinedNamesAbsoluteWorkbook(): Spreadsheet
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php627 public function testInsertBothWithDefinedNamesAbsolute(): void
LOWtests/PhpSpreadsheetTests/NamedRange3Test.php13 public function testSheetNamePlusDefinedName(): void
LOWtests/PhpSpreadsheetTests/DefinedNameFormulaTest.php116 public function testGetScopedNamedFormula(): void
LOWtests/PhpSpreadsheetTests/DefinedNameFormulaTest.php133 public function testGetGlobalNamedFormula(): void
LOWtests/PhpSpreadsheetTests/SpreadsheetCoverageTest.php86 public function testInvalidRemoveCellXfByIndex(): void
LOWtests/PhpSpreadsheetTests/SpreadsheetCoverageTest.php100 public function testInvalidRemoveDefaultStyle(): void
LOWtests/PhpSpreadsheetTests/SpreadsheetCoverageTest.php122 public function testInvalidRemoveCellStyleXfByIndex(): void
LOWtests/PhpSpreadsheetTests/SpreadsheetCoverageTest.php130 public function testInvalidFirstSheetIndex(): void
LOWtests/PhpSpreadsheetTests/SpreadsheetTest.php40 public static function dataProviderForSheetNames(): array
LOWtests/PhpSpreadsheetTests/SpreadsheetTest.php66 public function testAddSheetDuplicateTitle(): void
1070 more matches not shown…
Over-Commented Block81 hits · 81 pts
SeverityFileLineSnippet
LOWtests/PhpSpreadsheetTests/Chart/ChartCloneTest.php201 ), // 2011
LOWtests/PhpSpreadsheetTests/Chart/ChartMethodTest.php41 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010
LOW…/PhpSpreadsheetTests/Chart/GridlinesShadowGlowTest.php61 // Cell reference for data
LOWtests/PhpSpreadsheetTests/Chart/AxisGlowTest.php41 ['Q4', 30, 32, 0],
LOWtests/PhpSpreadsheetTests/Chart/AxisGlowTest.php61 // Number of datapoints in series
LOWtests/PhpSpreadsheetTests/Chart/AxisGlowTest.php181 ];
LOWtests/PhpSpreadsheetTests/Chart/LegendColorTest.php61 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), //Max / Open
LOWtests/PhpSpreadsheetTests/Chart/AxisPropertiesTest.php61 // Format Code
LOWtests/PhpSpreadsheetTests/Chart/MultiplierTest.php41 $dataSeriesLabels = [
LOWtests/PhpSpreadsheetTests/Chart/PR3163Test.php61 // Datatype
LOWtests/PhpSpreadsheetTests/Chart/PieFillTest.php61 DataSeriesValues::DATASERIES_TYPE_STRING,
LOW…s/PhpSpreadsheetTests/Chart/GridlinesLineStyleTest.php61 // Cell reference for data
LOW…s/PhpSpreadsheetTests/Chart/GridlinesLineStyleTest.php241 );
LOWtests/PhpSpreadsheetTests/Chart/DataSeriesColorTest.php61 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // was 2010
LOW…ts/PhpSpreadsheetTests/Chart/DataSeriesValues2Test.php41 ]
LOWtests/PhpSpreadsheetTests/Chart/AxisShadowTest.php41 ['Q4', 30, 32, 0],
LOWtests/PhpSpreadsheetTests/Chart/AxisShadowTest.php61 // Number of datapoints in series
LOW…s/PhpSpreadsheetTests/Calculation/ParseFormulaTest.php341 [
LOW…s/PhpSpreadsheetTests/Calculation/ParseFormulaTest.php361 // [
LOWtests/data/Calculation/Statistical/LINEST.php81 ],
LOWtests/data/Calculation/Statistical/LINEST.php101 // [2517, 4, 4, 55],
LOWtests/data/Calculation/Statistical/COUNTIFS.php21 ['C', 'B', 'A', 'B', 'B'],
LOWtests/data/Calculation/Statistical/LOGEST.php41 [
LOWtests/data/Calculation/Statistical/LOGEST.php61 // [
LOWsamples/Chart33a/33_Chart_create_area.php21 ['Q4', 30, 32, 0],
LOWsamples/Chart33a/33_Chart_create_area.php41// Number of datapoints in series
LOWsamples/Chart33a/33_Chart_create_column.php21 ['Q4', 30, 32, 0],
LOWsamples/Chart33a/33_Chart_create_column.php41// Number of datapoints in series
LOWsamples/Chart33a/33_Chart_create_bar_stacked.php21 ['Q4', 30, 32, 0],
LOWsamples/Chart33a/33_Chart_create_bar_stacked.php41// Number of datapoints in series
LOWsamples/Chart33a/33_Chart_create_bar_custom_colors.php41// Set the X-Axis Labels
LOWsamples/Chart33a/33_Chart_create_bar_custom_colors.php101// Add the chart to the worksheet
LOWsamples/Chart33a/33_Chart_create_bar_custom_colors.php121// Data values
LOWsamples/Chart33a/33_Chart_create_line.php41// Cell reference for data
LOWsamples/Chart33a/33_Chart_create_column_2.php41 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 'Budget'
LOWsamples/Chart33a/33_Chart_create_bubble.php41
LOWsamples/Chart33a/33_Chart_create_area_2.php41// Datatype
LOWsamples/Chart33a/33_Chart_create_bar_labels_lines.php41$dataSeriesLabels1 = [
LOWsamples/Chart33a/33_Chart_create_bar_labels_lines.php141// Set the X-Axis Labels
LOWsamples/Chart33b/33_Chart_create_multiple_charts.php21 ['Q4', 30, 32, 0],
LOWsamples/Chart33b/33_Chart_create_multiple_charts.php41// Number of datapoints in series
LOWsamples/Chart33b/33_Chart_create_multiple_charts.php101// Cell reference for data
LOWsamples/Chart33b/33_Chart_create_pie_custom_colors.php41// Set the X-Axis Labels
LOWsamples/Chart33b/33_Chart_create_pie_custom_colors.php101// Add the chart to the worksheet
LOWsamples/Chart33b/33_Chart_create_pie_custom_colors.php121// Data values
LOW…mples/Chart33b/33_Chart_create_scatter5_trendlines.php61// Datatype
LOWsamples/Chart33b/33_Chart_create_scatter3.php41 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // was 2011
LOWsamples/Chart33b/33_Chart_create_scatter2.php41 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // was 2010
LOWsamples/Chart33b/33_Chart_create_stock2.php41 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), //Max / Open
LOWsamples/Chart33b/33_Chart_create_pie.php21 ['Q3', 52, 61, 69],
LOWsamples/Chart33b/33_Chart_create_pie.php101// Datatype
LOWsamples/Chart33b/33_Chart_create_radar.php41$dataSeriesLabels = [
LOWsamples/Chart33b/33_Chart_create_stock.php41 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), //Max / Open
LOWsamples/templates/chartSpreadsheet.php21);
LOWsrc/PhpSpreadsheet/Reader/Xls.php41// Modelled moreso after Perl Excel Parse/Write modules
LOWsrc/PhpSpreadsheet/Reader/Xls.php401 // offset: 4; size: 2; OS version
LOWsrc/PhpSpreadsheet/Reader/Xls.php541 {
LOWsrc/PhpSpreadsheet/Reader/Xls.php2961 // offset: 20: size: variable; formula structure
LOWsrc/PhpSpreadsheet/Reader/Xls.php3461 // offset: 0; size: 2; rt
LOWsrc/PhpSpreadsheet/Reader/Xls.php3561
21 more matches not shown…
Fake / Example Data17 hits · 22 pts
SeverityFileLineSnippet
LOWtests/PhpSpreadsheetTests/Writer/Ods/ContentTest.php66 $worksheet1->setCellValue('E1', 'Lorem ipsum'); // String
LOWtests/PhpSpreadsheetTests/Writer/Ods/ContentTest.php88 $worksheet1->setCellValueExplicit('G1', 'Lorem ipsum', DataType::TYPE_INLINE);
LOW…s/PhpSpreadsheetTests/Writer/Html/TextRotationTest.php19 $sheet->setCellValue('A7', 'Lorem Ipsum');
LOW…s/PhpSpreadsheetTests/Writer/Mpdf/TextRotationTest.php19 $sheet->setCellValue('A7', 'Lorem Ipsum');
LOW…PhpSpreadsheetTests/Writer/Dompdf/TextRotationTest.php19 $sheet->setCellValue('A7', 'Lorem Ipsum');
LOW…pSpreadsheetTests/Writer/Dompdf/PaperSizeArrayTest.php36 $sheet->setCellValue('A7', 'Lorem Ipsum');
LOW…pSpreadsheetTests/Writer/Dompdf/PaperSizeArrayTest.php56 $sheet->setCellValue('A7', 'Lorem Ipsum');
LOWtests/data/Writer/Ods/content-with-data.xml87 <text:p>Lorem ipsum</text:p>
LOWtests/data/Writer/Ods/content-with-data.xml93 <text:p>Lorem ipsum</text:p>
LOWsamples/Pdf/21b_Pdf.php12 $lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dol
LOWsamples/Pdf/21b_Pdf.php12 $lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dol
LOWsamples/templates/sampleSpreadsheet2.php322// Llorem ipsum...
LOWsamples/templates/sampleSpreadsheet2.php323$sLloremIpsum = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus eget ante. Sed cursus nunc semper tor
LOWsamples/templates/sampleSpreadsheet2.php323$sLloremIpsum = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus eget ante. Sed cursus nunc semper tor
LOWsamples/templates/sampleSpreadsheet.php322// Llorem ipsum...
LOWsamples/templates/sampleSpreadsheet.php323$sLloremIpsum = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus eget ante. Sed cursus nunc semper tor
LOWsamples/templates/sampleSpreadsheet.php323$sLloremIpsum = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus eget ante. Sed cursus nunc semper tor
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippet
CRITICALsamples/bootstrap/js/jquery.min.js2!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):f
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMsrc/PhpSpreadsheet/Reader/Xlsx.php918 // But in some cases, this attribute isn't set; so we need to delve a level