From 257c3eca5870dbfaf89eb344fb31c07dfbb74456 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Tue, 16 Jan 2018 20:41:24 -0200 Subject: [PATCH] Simplify returns --- src/PhpSpreadsheet/Shared/TimeZone.php | 6 +----- src/PhpSpreadsheet/Worksheet/Worksheet.php | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/PhpSpreadsheet/Shared/TimeZone.php b/src/PhpSpreadsheet/Shared/TimeZone.php index d27deda3..e5a99b9b 100644 --- a/src/PhpSpreadsheet/Shared/TimeZone.php +++ b/src/PhpSpreadsheet/Shared/TimeZone.php @@ -23,11 +23,7 @@ class TimeZone */ private static function validateTimeZone($timezone) { - if (in_array($timezone, DateTimeZone::listIdentifiers())) { - return true; - } - - return false; + return in_array($timezone, DateTimeZone::listIdentifiers()); } /** diff --git a/src/PhpSpreadsheet/Worksheet/Worksheet.php b/src/PhpSpreadsheet/Worksheet/Worksheet.php index 5db7f222..31ddc62d 100644 --- a/src/PhpSpreadsheet/Worksheet/Worksheet.php +++ b/src/PhpSpreadsheet/Worksheet/Worksheet.php @@ -1469,11 +1469,7 @@ class Worksheet implements IComparable */ public function conditionalStylesExists($pCoordinate) { - if (isset($this->conditionalStylesCollection[strtoupper($pCoordinate)])) { - return true; - } - - return false; + return isset($this->conditionalStylesCollection[strtoupper($pCoordinate)]); } /**