allow null replacement character
Cette révision appartient à :
Parent
c631f9a6ac
révision
dad34c0b61
@ -12,7 +12,7 @@ class sensitiveMessageFormatter extends MessageFormatter
|
||||
public function __construct(
|
||||
?string $template = self::CLF,
|
||||
protected array $anonymizations = [],
|
||||
protected string $replaceChar = '*'
|
||||
protected ?string $replaceChar = null
|
||||
) {
|
||||
$this->createReplacements($this->anonymizations);
|
||||
|
||||
@ -22,6 +22,7 @@ class sensitiveMessageFormatter extends MessageFormatter
|
||||
protected function createReplacements(array $search = []): void
|
||||
{
|
||||
$replacements = [];
|
||||
$this->replaceChar = $this->replaceChar ?? '*';
|
||||
|
||||
array_map(
|
||||
function ($search) use (&$replacements) {
|
||||
|
Chargement…
x
Référencer dans un nouveau ticket
Bloquer un utilisateur