diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
index 5578f462..78094ae4 100644
--- a/phpstan-baseline.neon
+++ b/phpstan-baseline.neon
@@ -17,3 +17,9 @@ parameters:
identifier: function.alreadyNarrowedType
count: 1
path: src/OutputFilter.php
+
+ -
+ message: '#^Method Joomla\\Filter\\OutputFilter\:\:cleanText\(\) never assigns null to &\$text so it can be removed from the by\-ref type\.$#'
+ identifier: parameterByRef.unusedType
+ count: 1
+ path: src/OutputFilter.php
diff --git a/src/OutputFilter.php b/src/OutputFilter.php
index be4b649e..8643435c 100644
--- a/src/OutputFilter.php
+++ b/src/OutputFilter.php
@@ -223,7 +223,7 @@ public static function ampReplace($text)
*
* @since 1.0
*/
- public static function cleanText($text)
+ public static function cleanText(&$text)
{
$text = preg_replace("''si", '', $text);
$text = preg_replace('/]*>([^<]+)<\/a>/is', '\2 (\1)', $text);