Update more code.

This commit is contained in:
James Cole
2025-05-04 13:04:33 +02:00
parent abd9260193
commit e42107c03c
55 changed files with 106 additions and 278 deletions

View File

@@ -36,14 +36,11 @@ use Illuminate\Support\Facades\DB;
*/
class AddTag implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -37,14 +37,11 @@ class AppendDescription implements ActionInterface
{
use RefreshNotesTrait;
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -39,14 +39,11 @@ class AppendDescriptionToNotes implements ActionInterface
{
use RefreshNotesTrait;
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -37,14 +37,11 @@ class AppendNotes implements ActionInterface
{
use RefreshNotesTrait;
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -41,14 +41,11 @@ class AppendNotesToDescription implements ActionInterface
use ConvertsDataTypes;
use RefreshNotesTrait;
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -34,14 +34,11 @@ use Illuminate\Support\Facades\DB;
*/
class ClearBudget implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -34,14 +34,11 @@ use Illuminate\Support\Facades\DB;
*/
class ClearCategory implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -35,14 +35,11 @@ use Illuminate\Support\Facades\DB;
*/
class ClearNotes implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -43,14 +43,11 @@ use Illuminate\Support\Facades\DB;
*/
class ConvertToDeposit implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -42,14 +42,11 @@ use Illuminate\Support\Facades\DB;
*/
class ConvertToTransfer implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
/**

View File

@@ -43,14 +43,11 @@ use Illuminate\Support\Facades\DB;
*/
class ConvertToWithdrawal implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -35,14 +35,11 @@ use FireflyIII\Services\Internal\Destroy\TransactionGroupDestroyService;
*/
class DeleteTransaction implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -37,14 +37,11 @@ use Illuminate\Support\Facades\DB;
*/
class LinkToBill implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -36,14 +36,11 @@ use FireflyIII\Models\TransactionJournal;
*/
class MoveDescriptionToNotes implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -42,14 +42,11 @@ class MoveNotesToDescription implements ActionInterface
{
use ConvertsDataTypes;
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -34,14 +34,11 @@ use Illuminate\Support\Facades\DB;
*/
class PrependDescription implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -34,14 +34,11 @@ use FireflyIII\Models\TransactionJournal;
*/
class PrependNotes implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -34,14 +34,11 @@ use Illuminate\Support\Facades\DB;
*/
class RemoveAllTags implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -35,14 +35,11 @@ use Illuminate\Support\Facades\DB;
*/
class RemoveTag implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -35,14 +35,11 @@ class SetAmount implements ActionInterface
{
use RefreshNotesTrait;
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -36,14 +36,11 @@ use Illuminate\Support\Facades\DB;
*/
class SetBudget implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -36,14 +36,11 @@ use Illuminate\Support\Facades\DB;
*/
class SetCategory implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -36,14 +36,11 @@ class SetDescription implements ActionInterface
{
use RefreshNotesTrait;
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -39,15 +39,13 @@ use Illuminate\Support\Facades\DB;
*/
class SetDestinationAccount implements ActionInterface
{
private RuleAction $action;
private AccountRepositoryInterface $repository;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -39,14 +39,11 @@ use Illuminate\Support\Facades\DB;
*/
class SetDestinationToCashAccount implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -33,14 +33,11 @@ use FireflyIII\Models\TransactionJournal;
*/
class SetNotes implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -39,15 +39,13 @@ use Illuminate\Support\Facades\DB;
*/
class SetSourceAccount implements ActionInterface
{
private RuleAction $action;
private AccountRepositoryInterface $repository;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -39,14 +39,11 @@ use Illuminate\Support\Facades\DB;
*/
class SetSourceToCashAccount implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -36,14 +36,11 @@ use FireflyIII\Models\TransactionJournal;
*/
class SwitchAccounts implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool

View File

@@ -37,14 +37,11 @@ use Illuminate\Support\Facades\Log;
class UpdatePiggyBank implements ActionInterface
{
private RuleAction $action;
/**
* TriggerInterface constructor.
*/
public function __construct(RuleAction $action)
public function __construct(private readonly RuleAction $action)
{
$this->action = $action;
}
public function actOnArray(array $journal): bool