Update PropertiesBase to new patterns and improve static analysis checks

This commit is contained in:
Alex Cabal 2022-06-30 13:23:05 -05:00
parent 5f0b57f7e9
commit 6c8414f844
33 changed files with 335 additions and 148 deletions

View file

@ -33,10 +33,10 @@ class Formatter{
}
public static function ToPlainText(?string $text): string{
return htmlspecialchars(trim($text), ENT_QUOTES, 'utf-8');
return htmlspecialchars(trim($text ?? ''), ENT_QUOTES, 'utf-8');
}
public static function ToPlainXmlText(?string $text): string{
return htmlspecialchars(trim($text), ENT_QUOTES|ENT_XML1, 'utf-8');
return htmlspecialchars(trim($text ?? ''), ENT_QUOTES|ENT_XML1, 'utf-8');
}
}