Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/OutputFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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("'<script[^>]*>.*?</script>'si", '', $text);
$text = preg_replace('/<a\s+.*?href="([^"]+)"[^>]*>([^<]+)<\/a>/is', '\2 (\1)', $text);
Expand Down