mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-15 19:09:50 +00:00
Update code to use php 8.4 code, using Nestor.
This commit is contained in:
@@ -31,10 +31,7 @@ class Updated
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public Account $account;
|
||||
|
||||
public function __construct(Account $account)
|
||||
public function __construct(public Account $account)
|
||||
{
|
||||
$this->account = $account;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,10 +35,7 @@ class Created extends Event
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public BudgetLimit $budgetLimit;
|
||||
|
||||
public function __construct(BudgetLimit $budgetLimit)
|
||||
public function __construct(public BudgetLimit $budgetLimit)
|
||||
{
|
||||
$this->budgetLimit = $budgetLimit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,10 +35,7 @@ class Deleted extends Event
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public BudgetLimit $budgetLimit;
|
||||
|
||||
public function __construct(BudgetLimit $budgetLimit)
|
||||
public function __construct(public BudgetLimit $budgetLimit)
|
||||
{
|
||||
$this->budgetLimit = $budgetLimit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,10 +35,7 @@ class Updated extends Event
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public BudgetLimit $budgetLimit;
|
||||
|
||||
public function __construct(BudgetLimit $budgetLimit)
|
||||
public function __construct(public BudgetLimit $budgetLimit)
|
||||
{
|
||||
$this->budgetLimit = $budgetLimit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,18 +39,14 @@ class ChangedAmount extends Event
|
||||
|
||||
public string $amount;
|
||||
public PiggyBank $piggyBank;
|
||||
public ?TransactionGroup $transactionGroup;
|
||||
public ?TransactionJournal $transactionJournal;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*/
|
||||
public function __construct(PiggyBank $piggyBank, string $amount, ?TransactionJournal $transactionJournal, ?TransactionGroup $transactionGroup)
|
||||
public function __construct(PiggyBank $piggyBank, string $amount, public ?TransactionJournal $transactionJournal, public ?TransactionGroup $transactionGroup)
|
||||
{
|
||||
app('log')->debug(sprintf('Created piggy bank event for piggy bank #%d with amount %s', $piggyBank->id, $amount));
|
||||
$this->piggyBank = $piggyBank;
|
||||
$this->transactionJournal = $transactionJournal;
|
||||
$this->transactionGroup = $transactionGroup;
|
||||
$this->amount = $amount;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,15 +34,8 @@ class RuleActionFailedOnArray
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public string $error;
|
||||
public array $journal;
|
||||
public RuleAction $ruleAction;
|
||||
|
||||
public function __construct(RuleAction $ruleAction, array $journal, string $error)
|
||||
public function __construct(public RuleAction $ruleAction, public array $journal, public string $error)
|
||||
{
|
||||
app('log')->debug('Created new RuleActionFailedOnArray');
|
||||
$this->ruleAction = $ruleAction;
|
||||
$this->journal = $journal;
|
||||
$this->error = $error;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,15 +35,8 @@ class RuleActionFailedOnObject
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public string $error;
|
||||
public TransactionJournal $journal;
|
||||
public RuleAction $ruleAction;
|
||||
|
||||
public function __construct(RuleAction $ruleAction, TransactionJournal $journal, string $error)
|
||||
public function __construct(public RuleAction $ruleAction, public TransactionJournal $journal, public string $error)
|
||||
{
|
||||
app('log')->debug('Created new RuleActionFailedOnObject');
|
||||
$this->ruleAction = $ruleAction;
|
||||
$this->journal = $journal;
|
||||
$this->error = $error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user