Help Scrutinizer
This commit is contained in:
parent
c3c93c56d6
commit
8cef8c0cfb
|
|
@ -1518,7 +1518,7 @@ documentation for more information on entering dates into a cell.
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
||||||
- PHPExcel->removeSheetByIndex now re-orders sheets after deletion, so no array indexes are lost - @JV
|
- PHPExcel->removeSheetByIndex now re-orders sheets after deletion, so no array indexes are lost - @JV
|
||||||
- PHPExcel_Writer_Excel2007_Worksheet::_writeCols() used direct assignment to $pSheet->getColumnDimension('A')->Width instead of ~~~~$pSheet->getColumnDimension('A')->setWidth() - @JV
|
- PHPExcel_Writer_Excel2007_Worksheet::_writeCols() used direct assignment to $pSheet->getColumnDimension('A')->Width instead of $pSheet->getColumnDimension('A')->setWidth() - @JV
|
||||||
- DocumentProperties used $this->LastModifiedBy instead of $this->_lastModifiedBy. - @JV
|
- DocumentProperties used $this->LastModifiedBy instead of $this->_lastModifiedBy. - @JV
|
||||||
|
|
||||||
### General
|
### General
|
||||||
|
|
|
||||||
|
|
@ -5307,7 +5307,6 @@ class Calculation
|
||||||
$returnValue = [];
|
$returnValue = [];
|
||||||
|
|
||||||
if ($worksheet !== null) {
|
if ($worksheet !== null) {
|
||||||
$worksheetName = $worksheet->getTitle();
|
|
||||||
if (strpos($range, '!') !== false) {
|
if (strpos($range, '!') !== false) {
|
||||||
[$worksheetName, $range] = Worksheet::extractSheetTitle($range, true);
|
[$worksheetName, $range] = Worksheet::extractSheetTitle($range, true);
|
||||||
$worksheet = $this->spreadsheet->getSheetByName($worksheetName);
|
$worksheet = $this->spreadsheet->getSheetByName($worksheetName);
|
||||||
|
|
|
||||||
|
|
@ -156,24 +156,24 @@ abstract class Coordinate
|
||||||
/**
|
/**
|
||||||
* Build range from coordinate strings.
|
* Build range from coordinate strings.
|
||||||
*
|
*
|
||||||
* @param array $rangea Array containg one or more arrays containing one or two coordinate strings
|
* @param array $range Array containing one or more arrays containing one or two coordinate strings
|
||||||
*
|
*
|
||||||
* @return string String representation of $pRange
|
* @return string String representation of $pRange
|
||||||
*/
|
*/
|
||||||
public static function buildRange(array $rangea)
|
public static function buildRange(array $range)
|
||||||
{
|
{
|
||||||
// Verify range
|
// Verify range
|
||||||
if (empty($rangea) || !is_array($rangea[0])) {
|
if (empty($range) || !is_array($range[0])) {
|
||||||
throw new Exception('Range does not contain any information');
|
throw new Exception('Range does not contain any information');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build range
|
// Build range
|
||||||
$counter = count($rangea);
|
$counter = count($range);
|
||||||
for ($i = 0; $i < $counter; ++$i) {
|
for ($i = 0; $i < $counter; ++$i) {
|
||||||
$rangea[$i] = implode(':', $rangea[$i]);
|
$range[$i] = implode(':', $range[$i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return implode(',', $rangea);
|
return implode(',', $range);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -427,19 +427,6 @@ class Csv extends BaseReader
|
||||||
return $this->escapeCharacter;
|
return $this->escapeCharacter;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Scrutinizer believes, incorrectly, that the specific pathinfo
|
|
||||||
* call in canRead can return something other than an array.
|
|
||||||
* Phpstan knows better.
|
|
||||||
* This function satisfies both.
|
|
||||||
*
|
|
||||||
* @param mixed $extension
|
|
||||||
*/
|
|
||||||
private static function extractStringLower($extension): string
|
|
||||||
{
|
|
||||||
return is_string($extension) ? strtolower($extension) : '';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Can the current IReader read the file?
|
* Can the current IReader read the file?
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ class Drawing
|
||||||
*/
|
*/
|
||||||
public static function angleToDegrees($angle)
|
public static function angleToDegrees($angle)
|
||||||
{
|
{
|
||||||
$pValue = (int) $angle;
|
$angle = (int) $angle;
|
||||||
if ($angle != 0) {
|
if ($angle != 0) {
|
||||||
return (int) round($angle / 60000);
|
return (int) round($angle / 60000);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ class Chart extends WriterPart
|
||||||
$objWriter->writeAttribute('val', 0);
|
$objWriter->writeAttribute('val', 0);
|
||||||
$objWriter->endElement();
|
$objWriter->endElement();
|
||||||
|
|
||||||
$this->writePlotArea($objWriter, $pChart->getWorksheet(), $pChart->getPlotArea(), $pChart->getXAxisLabel(), $pChart->getYAxisLabel(), $pChart->getChartAxisX(), $pChart->getChartAxisY(), $pChart->getMajorGridlines(), $pChart->getMinorGridlines());
|
$this->writePlotArea($objWriter, $pChart->getPlotArea(), $pChart->getXAxisLabel(), $pChart->getYAxisLabel(), $pChart->getChartAxisX(), $pChart->getChartAxisY(), $pChart->getMajorGridlines(), $pChart->getMinorGridlines());
|
||||||
|
|
||||||
$this->writeLegend($objWriter, $pChart->getLegend());
|
$this->writeLegend($objWriter, $pChart->getLegend());
|
||||||
|
|
||||||
|
|
@ -202,7 +202,7 @@ class Chart extends WriterPart
|
||||||
* @param Axis $xAxis
|
* @param Axis $xAxis
|
||||||
* @param Axis $yAxis
|
* @param Axis $yAxis
|
||||||
*/
|
*/
|
||||||
private function writePlotArea(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $worksheet, PlotArea $plotArea, ?Title $xAxisLabel = null, ?Title $yAxisLabel = null, ?Axis $xAxis = null, ?Axis $yAxis = null, ?GridLines $majorGridlines = null, ?GridLines $minorGridlines = null): void
|
private function writePlotArea(XMLWriter $objWriter, PlotArea $plotArea, ?Title $xAxisLabel = null, ?Title $yAxisLabel = null, ?Axis $xAxis = null, ?Axis $yAxis = null, ?GridLines $majorGridlines = null, ?GridLines $minorGridlines = null): void
|
||||||
{
|
{
|
||||||
if ($plotArea === null) {
|
if ($plotArea === null) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue