From 4ae95e5f7c66ae1830b3acba319164b976f5df09 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Thu, 16 Feb 2017 11:01:35 +0900 Subject: [PATCH] Drop obsolete method check existence --- src/PhpSpreadsheet/Chart/DataSeriesValues.php | 2 +- src/PhpSpreadsheet/Shared/XMLWriter.php | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/PhpSpreadsheet/Chart/DataSeriesValues.php b/src/PhpSpreadsheet/Chart/DataSeriesValues.php index b752c3c2..d1e92df1 100644 --- a/src/PhpSpreadsheet/Chart/DataSeriesValues.php +++ b/src/PhpSpreadsheet/Chart/DataSeriesValues.php @@ -79,8 +79,8 @@ class DataSeriesValues /** * Create a new DataSeriesValues object. * - * @param string $dataSource * @param mixed $dataType + * @param string $dataSource * @param null|mixed $formatCode * @param mixed $pointCount * @param mixed $dataValues diff --git a/src/PhpSpreadsheet/Shared/XMLWriter.php b/src/PhpSpreadsheet/Shared/XMLWriter.php index 3a5cc301..8390c765 100644 --- a/src/PhpSpreadsheet/Shared/XMLWriter.php +++ b/src/PhpSpreadsheet/Shared/XMLWriter.php @@ -103,9 +103,9 @@ class XMLWriter extends \XMLWriter } /** - * Fallback method for writeRaw, introduced in PHP 5.2. + * Wrapper method for writeRaw. * - * @param string $text + * @param string|string[] $text * * @return bool */ @@ -115,10 +115,6 @@ class XMLWriter extends \XMLWriter $text = implode("\n", $text); } - if (method_exists($this, 'writeRaw')) { - return $this->writeRaw(htmlspecialchars($text)); - } - - return $this->text($text); + return $this->writeRaw(htmlspecialchars($text)); } }