PHPStan: Fixed found issues after merge

This commit is contained in:
Dan Brown
2026-08-26 10:30:57 +01:00
parent b4894ee23e
commit fac26126d5
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -294,7 +294,7 @@ class SearchRunner
$query->where('name', '=', $tagParts['name']);
}
if (is_numeric($tagParts['value']) && is_finite($tagParts['value']) && $tagParts['operator'] !== 'like') {
if (is_numeric($tagParts['value']) && is_finite(floatval($tagParts['value'])) && $tagParts['operator'] !== 'like') {
// We have to do a raw sql query for this since otherwise PDO will quote the value and MySQL will
// search the value as a string which prevents being able to do number-based operations
// on the tag values. We ensure it has a numeric value and then cast it just to be sure.
+1 -1
View File
@@ -166,7 +166,7 @@ class UserRepo
/**
* Update the given user with the given data.
*
* @param array{name: ?string, email: ?string, external_auth_id: ?string, password: ?string, roles: ?array<int>, language: ?string} $data
* @param array{name: ?string, email: ?string, external_auth_id: ?string, password: ?string, roles: ?array<int>, language: ?string, display_mode: ?string} $data
*
* @throws UserUpdateException
*/
+1
View File
@@ -42,6 +42,7 @@ class ViewBlockPreferences
}
$validatedLayoutData[$position] = array_filter($blockIds, function ($id) use ($validIds) {
// @phpstan-ignore function.alreadyNarrowedType
return is_string($id) && in_array($id, $validIds);
});
}