From 5854ce3738e870f17665402db50513c746baf668 Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Tue, 20 Nov 2018 08:18:35 +0100 Subject: [PATCH] phpcs cleanup --- src/PhpSpreadsheet/Reader/Ods.php | 2 +- src/PhpSpreadsheet/Reader/Security/XmlScanner.php | 14 ++++++++------ .../Reader/Security/XmlScannerTest.php | 5 ++--- tests/PhpSpreadsheetTests/Reader/XmlTest.php | 1 - 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/PhpSpreadsheet/Reader/Ods.php b/src/PhpSpreadsheet/Reader/Ods.php index c9c7ff21..7b25901e 100644 --- a/src/PhpSpreadsheet/Reader/Ods.php +++ b/src/PhpSpreadsheet/Reader/Ods.php @@ -4,11 +4,11 @@ namespace PhpOffice\PhpSpreadsheet\Reader; use DateTime; use DateTimeZone; -use PhpOffice\PhpSpreadsheet\Reader\Security\XmlScanner; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Cell\Coordinate; use PhpOffice\PhpSpreadsheet\Cell\DataType; use PhpOffice\PhpSpreadsheet\Document\Properties; +use PhpOffice\PhpSpreadsheet\Reader\Security\XmlScanner; use PhpOffice\PhpSpreadsheet\RichText\RichText; use PhpOffice\PhpSpreadsheet\Settings; use PhpOffice\PhpSpreadsheet\Shared\Date; diff --git a/src/PhpSpreadsheet/Reader/Security/XmlScanner.php b/src/PhpSpreadsheet/Reader/Security/XmlScanner.php index 7bd21402..ecac4a8a 100644 --- a/src/PhpSpreadsheet/Reader/Security/XmlScanner.php +++ b/src/PhpSpreadsheet/Reader/Security/XmlScanner.php @@ -7,7 +7,7 @@ use PhpOffice\PhpSpreadsheet\Reader\Exception; class XmlScanner { /** - * Identifies whether the thread-safe libxmlDisableEntityLoader() function is available + * Identifies whether the thread-safe libxmlDisableEntityLoader() function is available. * * @var bool */ @@ -30,12 +30,13 @@ class XmlScanner if (PHP_MAJOR_VERSION > 7) { switch (PHP_MINOR_VERSION) { case 2: - return (PHP_RELEASE_VERSION >= 1); + return PHP_RELEASE_VERSION >= 1; case 1: - return (PHP_RELEASE_VERSION >= 13); + return PHP_RELEASE_VERSION >= 13; case 0: - return (PHP_RELEASE_VERSION >= 27); + return PHP_RELEASE_VERSION >= 27; } + return true; } @@ -45,13 +46,14 @@ class XmlScanner /** * Scan the XML for use of