Skip to content

Commit 8115ccd

Browse files
Merge pull request #3 from Treblle/fix/type-fix
Expanding type allowance on 'handleString' to be more forgiving, but …
2 parents 08fab51 + 5301636 commit 8115ccd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Masking/FieldMasker.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ public function mask(array $data): array
3030
return $collector;
3131
}
3232

33-
private function handleString(string $key, string $value): string
33+
private function handleString(string|int|float|bool $key, string $value): string
3434
{
35+
if (! is_string($key)) {
36+
$key = (string) $key;
37+
}
38+
3539
static $lowerFields = null;
3640
if ($lowerFields === null) {
3741
$lowerFields = array_map('strtolower', $this->fields);

0 commit comments

Comments
 (0)