PHPstan fixes.

This commit is contained in:
James Cole
2023-11-05 08:15:17 +01:00
parent ff599795d3
commit c1cc71f85c
48 changed files with 101 additions and 166 deletions

View File

@@ -64,7 +64,6 @@ class BelongsUserGroup implements ValidationRule
$fail('validation.belongs_user_or_user_group')->translate();
return;
}
$attribute = (string)$attribute;
app('log')->debug(sprintf('Group: Going to validate "%s"', $attribute));
$result = match ($attribute) {
@@ -150,7 +149,7 @@ class BelongsUserGroup implements ValidationRule
}
$count = 0;
foreach ($objects as $object) {
$objectValue = trim((string)$object->$field);
$objectValue = trim((string)$object->$field); // @phpstan-ignore-line
app('log')->debug(sprintf('Comparing object "%s" with value "%s"', $objectValue, $value));
if ($objectValue === $value) {
$count++;