From 79c4e9a2936438450b0a0f04dbb016c7b2a88fd4 Mon Sep 17 00:00:00 2001 From: George Steel Date: Tue, 17 Dec 2024 23:51:39 +0000 Subject: [PATCH] `SeparatorToSeparator` Deprecations See #193 Closes #197 Signed-off-by: George Steel --- psalm-baseline.xml | 12 ++++++++++++ src/Word/SeparatorToSeparator.php | 12 ++++++++++-- src/Word/Service/SeparatorToSeparatorFactory.php | 6 +++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 1677e983..d1318643 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1179,6 +1179,8 @@ + + InvokableFactory::class]]> @@ -1614,6 +1616,10 @@ + + + + searchSeparator === null]]> @@ -2091,6 +2097,12 @@ + + + + + + diff --git a/src/Word/SeparatorToSeparator.php b/src/Word/SeparatorToSeparator.php index 83fbfcf3..08809d91 100644 --- a/src/Word/SeparatorToSeparator.php +++ b/src/Word/SeparatorToSeparator.php @@ -40,7 +40,9 @@ public function __construct($searchSeparator = ' ', $replacementSeparator = '-') /** * Sets a new separator to search for * - * @param string $separator Separator to search for + * @deprecated This method will be removed in 3.0.0 without replacement + * + * @param string $separator Separator to search for * @return self */ public function setSearchSeparator($separator) @@ -52,6 +54,8 @@ public function setSearchSeparator($separator) /** * Returns the actual set separator to search for * + * @deprecated This method will be removed in 3.0.0 without replacement + * * @return string */ public function getSearchSeparator() @@ -62,7 +66,9 @@ public function getSearchSeparator() /** * Sets a new separator which replaces the searched one * - * @param string $separator Separator which replaces the searched one + * @deprecated This method will be removed in 3.0.0 without replacement + * + * @param string $separator Separator which replaces the searched one * @return self */ public function setReplacementSeparator($separator) @@ -74,6 +80,8 @@ public function setReplacementSeparator($separator) /** * Returns the actual set separator which replaces the searched one * + * @deprecated This method will be removed in 3.0.0 without replacement + * * @return string */ public function getReplacementSeparator() diff --git a/src/Word/Service/SeparatorToSeparatorFactory.php b/src/Word/Service/SeparatorToSeparatorFactory.php index 416701c5..0020963f 100644 --- a/src/Word/Service/SeparatorToSeparatorFactory.php +++ b/src/Word/Service/SeparatorToSeparatorFactory.php @@ -16,7 +16,11 @@ use function iterator_to_array; use function sprintf; -/** @final */ +/** + * @deprecated This factory will be removed in 3.0.0 without replacement + * + * @final + */ class SeparatorToSeparatorFactory implements FactoryInterface { /**