Refactor string concatenation and update function signatures for improved readability and null handling in shared helper functions
This commit is contained in:
parent
ec9315f24e
commit
74311f4feb
1 changed files with 4 additions and 1 deletions
|
|
@ -90,8 +90,11 @@ function metrics_dir(): string
|
|||
return base_configuration_dir().'/metrics';
|
||||
}
|
||||
|
||||
function sanitize_string(string $input): string
|
||||
function sanitize_string(?string $input = null): ?string
|
||||
{
|
||||
if (is_null($input)) {
|
||||
return null;
|
||||
}
|
||||
// Remove any HTML/PHP tags
|
||||
$sanitized = strip_tags($input);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue