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

View File

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

View File

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