mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-08-19 01:14:43 -05:00
Fix code quality with rector [skip ci]
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user