Fix phpstan issues.

This commit is contained in:
James Cole
2025-09-07 07:51:01 +02:00
parent 602df95f3c
commit c3a3bdf525
21 changed files with 52 additions and 219 deletions

View File

@@ -118,7 +118,7 @@ class FireflyValidator extends Validator
}
$regex = '/^[a-z]{6}[0-9a-z]{2}([0-9a-z]{3})?\z/i';
$result = preg_match($regex, $value);
if (false === $result || 0 === $result) {
if (0 === $result) {
return false;
}
@@ -207,7 +207,7 @@ class FireflyValidator extends Validator
$value = strtoupper($value);
// replace characters outside of ASCI range.
$value = (string) iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $value);
$value = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $value);
$search = [' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
$replace = ['', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35'];