From 08aad80b84826fab4fbd154f568a6e092aa19949 Mon Sep 17 00:00:00 2001 From: George Steel Date: Mon, 6 Jan 2025 21:26:38 +0000 Subject: [PATCH] Deprecate getters and setters in the `HtmlEntities` filter Signed-off-by: George Steel --- psalm-baseline.xml | 35 ++++++++++++++++++++++++++++++++++- src/HtmlEntities.php | 24 ++++++++++++++++++++---- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 561dd054..c0261ab3 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1249,6 +1249,20 @@ + + + + + + + + + + + + + + @@ -2061,8 +2075,8 @@ - + @@ -2134,6 +2148,25 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/HtmlEntities.php b/src/HtmlEntities.php index 8a2584d0..c3836e10 100644 --- a/src/HtmlEntities.php +++ b/src/HtmlEntities.php @@ -94,6 +94,8 @@ public function __construct($options = []) /** * Returns the quoteStyle option * + * @deprecated Since 2.40.0. This method will be removed in 3.0 without replacement + * * @return int */ public function getQuoteStyle() @@ -104,7 +106,9 @@ public function getQuoteStyle() /** * Sets the quoteStyle option * - * @param int $quoteStyle + * @deprecated Since 2.40.0. This method will be removed in 3.0. Set options during construction instead + * + * @param int $quoteStyle * @return self Provides a fluent interface */ public function setQuoteStyle($quoteStyle) @@ -116,6 +120,8 @@ public function setQuoteStyle($quoteStyle) /** * Get encoding * + * @deprecated Since 2.40.0. This method will be removed in 3.0 without replacement + * * @return string */ public function getEncoding() @@ -126,7 +132,9 @@ public function getEncoding() /** * Set encoding * - * @param string $value + * @deprecated Since 2.40.0. This method will be removed in 3.0. Set options during construction instead + * + * @param string $value * @return self */ public function setEncoding($value) @@ -138,6 +146,8 @@ public function setEncoding($value) /** * Returns the charSet option * + * @deprecated Since 2.40.0. This method will be removed in 3.0 without replacement + * * Proxies to {@link getEncoding()} * * @return string @@ -150,9 +160,11 @@ public function getCharSet() /** * Sets the charSet option * + * @deprecated Since 2.40.0. This method will be removed in 3.0. Set options during construction instead + * * Proxies to {@link setEncoding()} * - * @param string $charSet + * @param string $charSet * @return self Provides a fluent interface */ public function setCharSet($charSet) @@ -163,6 +175,8 @@ public function setCharSet($charSet) /** * Returns the doubleQuote option * + * @deprecated Since 2.40.0. This method will be removed in 3.0 without replacement + * * @return bool */ public function getDoubleQuote() @@ -173,7 +187,9 @@ public function getDoubleQuote() /** * Sets the doubleQuote option * - * @param bool $doubleQuote + * @deprecated Since 2.40.0. This method will be removed in 3.0. Set options during construction instead + * + * @param bool $doubleQuote * @return self Provides a fluent interface */ public function setDoubleQuote($doubleQuote)