From dfa808a955d21f345f281a62b5a85d2f0857a1e7 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Mon, 19 Nov 2018 01:46:44 -0200 Subject: [PATCH] Simplify some conditions and ternary expressions --- src/PhpSpreadsheet/Chart/Renderer/JpGraph.php | 2 +- src/PhpSpreadsheet/Document/Properties.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PhpSpreadsheet/Chart/Renderer/JpGraph.php b/src/PhpSpreadsheet/Chart/Renderer/JpGraph.php index b6034b2c..c0445d49 100644 --- a/src/PhpSpreadsheet/Chart/Renderer/JpGraph.php +++ b/src/PhpSpreadsheet/Chart/Renderer/JpGraph.php @@ -401,7 +401,7 @@ class JpGraph implements IRenderer $seriesPlots[] = $seriesPlot; } // Reverse the plot order for bar rather than column chart - if (($rotation == 'bar') && (!($grouping == 'percentStacked'))) { + if (($rotation == 'bar') && ($grouping != 'percentStacked')) { $seriesPlots = array_reverse($seriesPlots); } diff --git a/src/PhpSpreadsheet/Document/Properties.php b/src/PhpSpreadsheet/Document/Properties.php index b7610206..bbac96d9 100644 --- a/src/PhpSpreadsheet/Document/Properties.php +++ b/src/PhpSpreadsheet/Document/Properties.php @@ -543,7 +543,7 @@ class Properties break; case 'bool': // Boolean - return ($propertyValue == 'true') ? true : false; + return $propertyValue == 'true'; break; case 'cy': // Currency