Skip to content

Commit

Permalink
Expanding type allowance on 'handleString' to be more forgiving, but …
Browse files Browse the repository at this point in the history
…then type casting for assurance
  • Loading branch information
JustSteveKing committed Apr 19, 2024
1 parent 08fab51 commit 5301636
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 5301636

Please sign in to comment.