Fix code quality with rector [skip ci]

This commit is contained in:
James Cole
2025-11-09 09:08:03 +01:00
parent d2610be790
commit 68183a0a0e
209 changed files with 1021 additions and 1248 deletions
+5 -4
View File
@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Rules;
use Illuminate\Support\Facades\Log;
use Closure;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Account;
@@ -56,7 +57,7 @@ class BelongsUserGroup implements ValidationRule
return;
}
app('log')->debug(sprintf('Group: Going to validate "%s"', $attribute));
Log::debug(sprintf('Group: Going to validate "%s"', $attribute));
$result = match ($attribute) {
'piggy_bank_id' => $this->validatePiggyBankId((int) $value),
@@ -121,10 +122,10 @@ class BelongsUserGroup implements ValidationRule
$count = 0;
foreach ($objects as $object) {
$objectValue = trim((string) $object->{$field}); // @phpstan-ignore-line
app('log')->debug(sprintf('Comparing object "%s" with value "%s"', $objectValue, $value));
Log::debug(sprintf('Comparing object "%s" with value "%s"', $objectValue, $value));
if ($objectValue === $value) {
++$count;
app('log')->debug(sprintf('Hit! Count is now %d', $count));
Log::debug(sprintf('Hit! Count is now %d', $count));
}
}
@@ -154,7 +155,7 @@ class BelongsUserGroup implements ValidationRule
private function validateBillName(string $value): bool
{
$count = $this->countField(Bill::class, 'name', $value);
app('log')->debug(sprintf('Result of countField for bill name "%s" is %d', $value, $count));
Log::debug(sprintf('Result of countField for bill name "%s" is %d', $value, $count));
return 1 === $count;
}