Autoformat lol

This commit is contained in:
James Cole
2026-01-23 15:09:50 +01:00
parent ae1347c550
commit 8f15a32bd6
1071 changed files with 21111 additions and 21687 deletions

View File

@@ -23,13 +23,13 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
use Illuminate\Support\Facades\Log;
use FireflyIII\Events\Model\Rule\RuleActionFailedOnArray;
use FireflyIII\Events\TriggeredAuditLog;
use FireflyIII\Models\Note;
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
/**
* Class ClearNotes.
@@ -39,7 +39,9 @@ class ClearNotes implements ActionInterface
/**
* TriggerInterface constructor.
*/
public function __construct(private readonly RuleAction $action) {}
public function __construct(
private readonly RuleAction $action
) {}
public function actOnArray(array $journal): bool
{
@@ -47,7 +49,7 @@ class ClearNotes implements ActionInterface
$object = TransactionJournal::where('user_id', $journal['user_id'])->find($journal['transaction_journal_id']);
/** @var null|Note $notes */
$notes = $object->notes()->first();
$notes = $object->notes()->first();
if (null === $notes) {
Log::debug(sprintf('RuleAction ClearNotes, journal #%d has no notes.', $journal['transaction_journal_id']));
event(new RuleActionFailedOnArray($this->action, $journal, trans('rules.journal_already_no_notes')));
@@ -59,8 +61,7 @@ class ClearNotes implements ActionInterface
DB::table('notes')
->where('noteable_id', $journal['transaction_journal_id'])
->where('noteable_type', TransactionJournal::class)
->delete()
;
->delete();
Log::debug(sprintf('RuleAction ClearNotes removed all notes from journal #%d.', $journal['transaction_journal_id']));
event(new TriggeredAuditLog($this->action->rule, $object, 'clear_notes', $before, null));