Skip to content

Commit 6a349cc

Browse files
authored
Scrutinizer Faulty Analysis (#2704)
Despite typehint, Scrutinizer assigns union type to a variable, resulting in subsequent faulty analysis of a method call invoked on that variable. Adding a bogus routine that will never actually be called to one module eliminates 8 Scrutinizer errors.
1 parent c112802 commit 6a349cc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/PhpSpreadsheet/Spreadsheet.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,4 +1602,14 @@ public function reevaluateAutoFilters(bool $resetToMax): void
16021602
}
16031603
}
16041604
}
1605+
1606+
/**
1607+
* Silliness to mollify Scrutinizer.
1608+
*
1609+
* @codeCoverageIgnore
1610+
*/
1611+
public function getSharedComponent(): Style
1612+
{
1613+
return new Style();
1614+
}
16051615
}

0 commit comments

Comments
 (0)