action = $action; } /** * @param TransactionJournal $journal * * @return bool */ public function act(TransactionJournal $journal): bool { Log::debug(sprintf('RuleAction ClearNotes removed all notes.')); $notes = $journal->notes()->get(); /** @var Note $note */ foreach ($notes as $note) { $note->delete(); } return true; } }