Skip to content

Commit 8cef8c0

Browse files
committed
Help Scrutinizer
1 parent c3c93c5 commit 8cef8c0

File tree

6 files changed

+11
-25
lines changed

6 files changed

+11
-25
lines changed

CHANGELOG.PHPExcel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,7 @@ documentation for more information on entering dates into a cell.
15181518
### Bugfixes
15191519

15201520
- PHPExcel->removeSheetByIndex now re-orders sheets after deletion, so no array indexes are lost - @JV
1521-
- PHPExcel_Writer_Excel2007_Worksheet::_writeCols() used direct assignment to $pSheet->getColumnDimension('A')->Width instead of ~~~~$pSheet->getColumnDimension('A')->setWidth() - @JV
1521+
- PHPExcel_Writer_Excel2007_Worksheet::_writeCols() used direct assignment to $pSheet->getColumnDimension('A')->Width instead of $pSheet->getColumnDimension('A')->setWidth() - @JV
15221522
- DocumentProperties used $this->LastModifiedBy instead of $this->_lastModifiedBy. - @JV
15231523

15241524
### General

src/PhpSpreadsheet/Calculation/Calculation.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4724,7 +4724,7 @@ private function processTokenStack($tokens, $cellID = null, ?Cell $pCell = null)
47244724
}
47254725
} else {
47264726
if ($pCell === null) {
4727-
// We can't access the cell, so return a REF error
4727+
// We can't access the cell, so return a REF error
47284728
$cellValue = Functions::REF();
47294729
} else {
47304730
$cellRef = $matches[6] . $matches[7];
@@ -5307,7 +5307,6 @@ public function extractNamedRange(string &$range = 'A1', ?Worksheet $worksheet =
53075307
$returnValue = [];
53085308

53095309
if ($worksheet !== null) {
5310-
$worksheetName = $worksheet->getTitle();
53115310
if (strpos($range, '!') !== false) {
53125311
[$worksheetName, $range] = Worksheet::extractSheetTitle($range, true);
53135312
$worksheet = $this->spreadsheet->getSheetByName($worksheetName);

src/PhpSpreadsheet/Cell/Coordinate.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,24 +156,24 @@ public static function splitRange($range)
156156
/**
157157
* Build range from coordinate strings.
158158
*
159-
* @param array $rangea Array containg one or more arrays containing one or two coordinate strings
159+
* @param array $range Array containing one or more arrays containing one or two coordinate strings
160160
*
161161
* @return string String representation of $pRange
162162
*/
163-
public static function buildRange(array $rangea)
163+
public static function buildRange(array $range)
164164
{
165165
// Verify range
166-
if (empty($rangea) || !is_array($rangea[0])) {
166+
if (empty($range) || !is_array($range[0])) {
167167
throw new Exception('Range does not contain any information');
168168
}
169169

170170
// Build range
171-
$counter = count($rangea);
171+
$counter = count($range);
172172
for ($i = 0; $i < $counter; ++$i) {
173-
$rangea[$i] = implode(':', $rangea[$i]);
173+
$range[$i] = implode(':', $range[$i]);
174174
}
175175

176-
return implode(',', $rangea);
176+
return implode(',', $range);
177177
}
178178

179179
/**

src/PhpSpreadsheet/Reader/Csv.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -427,19 +427,6 @@ public function getEscapeCharacter(): string
427427
return $this->escapeCharacter;
428428
}
429429

430-
/**
431-
* Scrutinizer believes, incorrectly, that the specific pathinfo
432-
* call in canRead can return something other than an array.
433-
* Phpstan knows better.
434-
* This function satisfies both.
435-
*
436-
* @param mixed $extension
437-
*/
438-
private static function extractStringLower($extension): string
439-
{
440-
return is_string($extension) ? strtolower($extension) : '';
441-
}
442-
443430
/**
444431
* Can the current IReader read the file?
445432
*/

src/PhpSpreadsheet/Shared/Drawing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public static function degreesToAngle($degrees)
143143
*/
144144
public static function angleToDegrees($angle)
145145
{
146-
$pValue = (int) $angle;
146+
$angle = (int) $angle;
147147
if ($angle != 0) {
148148
return (int) round($angle / 60000);
149149
}

src/PhpSpreadsheet/Writer/Xlsx/Chart.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function writeChart(\PhpOffice\PhpSpreadsheet\Chart\Chart $pChart, $calcu
7575
$objWriter->writeAttribute('val', 0);
7676
$objWriter->endElement();
7777

78-
$this->writePlotArea($objWriter, $pChart->getWorksheet(), $pChart->getPlotArea(), $pChart->getXAxisLabel(), $pChart->getYAxisLabel(), $pChart->getChartAxisX(), $pChart->getChartAxisY(), $pChart->getMajorGridlines(), $pChart->getMinorGridlines());
78+
$this->writePlotArea($objWriter, $pChart->getPlotArea(), $pChart->getXAxisLabel(), $pChart->getYAxisLabel(), $pChart->getChartAxisX(), $pChart->getChartAxisY(), $pChart->getMajorGridlines(), $pChart->getMinorGridlines());
7979

8080
$this->writeLegend($objWriter, $pChart->getLegend());
8181

@@ -202,7 +202,7 @@ private function writeLegend(XMLWriter $objWriter, ?Legend $legend = null): void
202202
* @param Axis $xAxis
203203
* @param Axis $yAxis
204204
*/
205-
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
205+
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
206206
{
207207
if ($plotArea === null) {
208208
return;

0 commit comments

Comments
 (0)