PHPCS Fixes

This commit is contained in:
MarkBaker 2021-01-29 17:47:37 +01:00
parent 8ab02883be
commit 03ab6305e6
4 changed files with 6 additions and 6 deletions

View File

@ -532,7 +532,7 @@ class Xlsx extends BaseReader
$excel->addCellXf($objStyle);
}
foreach (isset($xmlStyles->cellStyleXfs->xf) ? $xmlStyles->cellStyleXfs->xf : [] as $xf) {
foreach ($xmlStyles->cellStyleXfs->xf ?? [] as $xf) {
$numFmt = NumberFormat::FORMAT_GENERAL;
if ($numFmts && $xf['numFmtId']) {
$tmpNumFmt = self::getArrayItem($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]"));
@ -1148,7 +1148,7 @@ class Xlsx extends BaseReader
$shadow->setDistance(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'dist')));
$shadow->setDirection(Drawing::angleToDegrees(self::getArrayItem($outerShdw->attributes(), 'dir')));
$shadow->setAlignment((string) self::getArrayItem($outerShdw->attributes(), 'algn'));
$clr = isset($outerShdw->srgbClr) ? $outerShdw->srgbClr : $outerShdw->prstClr;
$clr = $outerShdw->srgbClr ?? $outerShdw->prstClr;
$shadow->getColor()->setRGB(self::getArrayItem($clr->attributes(), 'val'));
$shadow->setAlpha(self::getArrayItem($clr->alpha->attributes(), 'val') / 1000);
}
@ -1201,7 +1201,7 @@ class Xlsx extends BaseReader
$shadow->setDistance(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'dist')));
$shadow->setDirection(Drawing::angleToDegrees(self::getArrayItem($outerShdw->attributes(), 'dir')));
$shadow->setAlignment((string) self::getArrayItem($outerShdw->attributes(), 'algn'));
$clr = isset($outerShdw->srgbClr) ? $outerShdw->srgbClr : $outerShdw->prstClr;
$clr = $outerShdw->srgbClr ?? $outerShdw->prstClr;
$shadow->getColor()->setRGB(self::getArrayItem($clr->attributes(), 'val'));
$shadow->setAlpha(self::getArrayItem($clr->alpha->attributes(), 'val') / 1000);
}

View File

@ -1164,7 +1164,7 @@ class Matrix
*
* @return Matrix ... Solution if A is square, least squares solution otherwise
*/
public function solve($B)
public function solve(self $B)
{
if ($this->m == $this->n) {
$LU = new LUDecomposition($this);

View File

@ -189,7 +189,7 @@ class PPS
. "\x00\x00\x00\x00" // 100
. OLE::localDateToOLE($this->Time1st) // 108
. OLE::localDateToOLE($this->Time2nd) // 116
. pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120
. pack('V', $this->startBlock ?? 0) // 120
. pack('V', $this->Size) // 124
. pack('V', 0); // 128

View File

@ -757,7 +757,7 @@ class Workbook extends BIFFwriter
*
* @param string $name
* @param string $sheetIndex 1-based sheet index the defined name applies to. 0 = global
* @param integer[][] $rangeBounds range boundaries
* @param int[][] $rangeBounds range boundaries
* @param bool $isHidden
*
* @return string Complete binary record data