From 5ec0e333dd06f3ef187b94fdeb799ea1f7e57578 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Sun, 17 Nov 2019 17:44:02 +0100 Subject: [PATCH] Fix code style --- src/PhpSpreadsheet/Calculation/Calculation.php | 1 + src/PhpSpreadsheet/IOFactory.php | 2 ++ src/PhpSpreadsheet/Reader/Xml.php | 1 + src/PhpSpreadsheet/Worksheet/Worksheet.php | 1 + src/PhpSpreadsheet/Writer/Html.php | 1 + src/PhpSpreadsheet/Writer/Xls/Parser.php | 2 ++ 6 files changed, 8 insertions(+) diff --git a/src/PhpSpreadsheet/Calculation/Calculation.php b/src/PhpSpreadsheet/Calculation/Calculation.php index 737efe7b..69fa756e 100644 --- a/src/PhpSpreadsheet/Calculation/Calculation.php +++ b/src/PhpSpreadsheet/Calculation/Calculation.php @@ -4786,6 +4786,7 @@ class Calculation return $value; }, $tokens); + return '[ ' . implode(' | ', $tokensStr) . ' ]'; } } diff --git a/src/PhpSpreadsheet/IOFactory.php b/src/PhpSpreadsheet/IOFactory.php index dcd2716c..4266ea54 100644 --- a/src/PhpSpreadsheet/IOFactory.php +++ b/src/PhpSpreadsheet/IOFactory.php @@ -52,6 +52,7 @@ abstract class IOFactory // Instantiate writer $className = self::$writers[$writerType]; + return new $className($spreadsheet); } @@ -72,6 +73,7 @@ abstract class IOFactory // Instantiate reader $className = self::$readers[$readerType]; + return new $className(); } diff --git a/src/PhpSpreadsheet/Reader/Xml.php b/src/PhpSpreadsheet/Reader/Xml.php index 5cddd331..b4fffa4f 100644 --- a/src/PhpSpreadsheet/Reader/Xml.php +++ b/src/PhpSpreadsheet/Reader/Xml.php @@ -285,6 +285,7 @@ class Xml extends BaseReader { $pixels = ($widthUnits / 256) * 7; $offsetWidthUnits = $widthUnits % 256; + return $pixels + round($offsetWidthUnits / (256 / 7)); } diff --git a/src/PhpSpreadsheet/Worksheet/Worksheet.php b/src/PhpSpreadsheet/Worksheet/Worksheet.php index 3caa6f94..f01632bc 100644 --- a/src/PhpSpreadsheet/Worksheet/Worksheet.php +++ b/src/PhpSpreadsheet/Worksheet/Worksheet.php @@ -2912,6 +2912,7 @@ class Worksheet implements IComparable $rangeSet = $rangeBoundaries[0][0] . $rangeBoundaries[0][1] . ':' . $rangeBoundaries[1][0] . $rangeBoundaries[1][1]; } unset($rangeSet); + return implode(' ', $rangeBlocks); } diff --git a/src/PhpSpreadsheet/Writer/Html.php b/src/PhpSpreadsheet/Writer/Html.php index 852a246a..0f55f2f4 100644 --- a/src/PhpSpreadsheet/Writer/Html.php +++ b/src/PhpSpreadsheet/Writer/Html.php @@ -1058,6 +1058,7 @@ class Html extends BaseWriter { // Create CSS - add !important to non-none border styles for merged cells $borderStyle = $this->mapBorderStyle($pStyle->getBorderStyle()); + return $borderStyle . ' #' . $pStyle->getColor()->getRGB() . (($borderStyle == 'none') ? '' : ' !important'); } diff --git a/src/PhpSpreadsheet/Writer/Xls/Parser.php b/src/PhpSpreadsheet/Writer/Xls/Parser.php index b49b9b9e..1b8bae27 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Parser.php +++ b/src/PhpSpreadsheet/Writer/Xls/Parser.php @@ -1161,12 +1161,14 @@ class Parser // catch "-" Term $this->advance(); $result2 = $this->expression(); + return $this->createTree('ptgUminus', $result2, ''); // If it's a positive value } elseif ($this->currentToken == '+') { // catch "+" Term $this->advance(); $result2 = $this->expression(); + return $this->createTree('ptgUplus', $result2, ''); } $result = $this->term();