Apply Scrutinizer patches for spacing

This commit is contained in:
Adrien Crivelli 2016-08-25 18:46:02 +09:00
parent 20ccfa0d59
commit a85f1bdbed
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
58 changed files with 1061 additions and 1067 deletions

View File

@ -169,8 +169,7 @@ class ReferenceHelper
{ {
$aBreaks = $pSheet->getBreaks(); $aBreaks = $pSheet->getBreaks();
($pNumCols > 0 || $pNumRows > 0) ? ($pNumCols > 0 || $pNumRows > 0) ?
uksort($aBreaks, ['self', 'cellReverseSort']) : uksort($aBreaks, ['self', 'cellReverseSort']) : uksort($aBreaks, ['self', 'cellSort']);
uksort($aBreaks, ['self', 'cellSort']);
foreach ($aBreaks as $key => $value) { foreach ($aBreaks as $key => $value) {
if (self::cellAddressInDeleteRange($key, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols)) { if (self::cellAddressInDeleteRange($key, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols)) {
@ -230,8 +229,7 @@ class ReferenceHelper
{ {
$aHyperlinkCollection = $pSheet->getHyperlinkCollection(); $aHyperlinkCollection = $pSheet->getHyperlinkCollection();
($pNumCols > 0 || $pNumRows > 0) ? ($pNumCols > 0 || $pNumRows > 0) ?
uksort($aHyperlinkCollection, ['self', 'cellReverseSort']) : uksort($aHyperlinkCollection, ['self', 'cellReverseSort']) : uksort($aHyperlinkCollection, ['self', 'cellSort']);
uksort($aHyperlinkCollection, ['self', 'cellSort']);
foreach ($aHyperlinkCollection as $key => $value) { foreach ($aHyperlinkCollection as $key => $value) {
$newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows);
@ -256,8 +254,7 @@ class ReferenceHelper
{ {
$aDataValidationCollection = $pSheet->getDataValidationCollection(); $aDataValidationCollection = $pSheet->getDataValidationCollection();
($pNumCols > 0 || $pNumRows > 0) ? ($pNumCols > 0 || $pNumRows > 0) ?
uksort($aDataValidationCollection, ['self', 'cellReverseSort']) : uksort($aDataValidationCollection, ['self', 'cellReverseSort']) : uksort($aDataValidationCollection, ['self', 'cellSort']);
uksort($aDataValidationCollection, ['self', 'cellSort']);
foreach ($aDataValidationCollection as $key => $value) { foreach ($aDataValidationCollection as $key => $value) {
$newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows);
@ -303,8 +300,7 @@ class ReferenceHelper
{ {
$aProtectedCells = $pSheet->getProtectedCells(); $aProtectedCells = $pSheet->getProtectedCells();
($pNumCols > 0 || $pNumRows > 0) ? ($pNumCols > 0 || $pNumRows > 0) ?
uksort($aProtectedCells, ['self', 'cellReverseSort']) : uksort($aProtectedCells, ['self', 'cellReverseSort']) : uksort($aProtectedCells, ['self', 'cellSort']);
uksort($aProtectedCells, ['self', 'cellSort']);
foreach ($aProtectedCells as $key => $value) { foreach ($aProtectedCells as $key => $value) {
$newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows);
if ($key != $newReference) { if ($key != $newReference) {

View File

@ -137,8 +137,7 @@ class BaseDrawing implements \PhpSpreadsheet\IComparable
$this->rotation = 0; $this->rotation = 0;
$this->shadow = new Drawing\Shadow(); $this->shadow = new Drawing\Shadow();
// Set image index // Set image index++self::$imageCounter;
++self::$imageCounter;
$this->imageIndex = self::$imageCounter; $this->imageIndex = self::$imageCounter;
} }

View File

@ -1079,8 +1079,7 @@ class Worksheet extends WriterPart
break; break;
case 'f': // Formula case 'f': // Formula
$calculatedValue = ($this->getParentWriter()->getPreCalculateFormulas()) ? $calculatedValue = ($this->getParentWriter()->getPreCalculateFormulas()) ?
$pCell->getCalculatedValue() : $pCell->getCalculatedValue() : $cellValue;
$cellValue;
if (is_string($calculatedValue)) { if (is_string($calculatedValue)) {
$objWriter->writeAttribute('t', 'str'); $objWriter->writeAttribute('t', 'str');
} }