mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-10-12 02:01:37 +00:00
PHPStan: Fixed found issues after merge
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user