Skip to content

Commit

Permalink
Merge pull request #3 from Treblle/fix/type-fix
Browse files Browse the repository at this point in the history
Expanding type allowance on 'handleString' to be more forgiving, but …
  • Loading branch information
JustSteveKing authored Apr 19, 2024
2 parents 08fab51 + 5301636 commit 8115ccd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Masking/FieldMasker.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ public function mask(array $data): array
return $collector;
}

private function handleString(string $key, string $value): string
private function handleString(string|int|float|bool $key, string $value): string
{
if (! is_string($key)) {
$key = (string) $key;
}

static $lowerFields = null;
if ($lowerFields === null) {
$lowerFields = array_map('strtolower', $this->fields);
Expand Down

0 comments on commit 8115ccd

Please sign in to comment.