for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Squareetlabs\VeriFactu\Helpers;
class StringHelper
{
/**
* Sanitizes a string by trimming whitespace and replacing '&' and '<' characters.
*
* @param string $inputString The string to sanitize.
* @return string The sanitized string.
*/
public static function sanitize(string $inputString): string
$trimmedString = trim($inputString);
$sanitizedString = str_replace(['&', '<'], ['&', '<'], $trimmedString);
return $sanitizedString;
}