Reformat code.

This commit is contained in:
James Cole
2024-03-10 06:17:31 +01:00
parent c9ce5df74b
commit 1961487055
21 changed files with 572 additions and 571 deletions

View File

@@ -122,13 +122,13 @@ class Account extends Model
protected $casts
= [
'created_at' => 'datetime',
'updated_at' => 'datetime',
'user_id' => 'integer',
'deleted_at' => 'datetime',
'active' => 'boolean',
'encrypted' => 'boolean',
];
'created_at' => 'datetime',
'updated_at' => 'datetime',
'user_id' => 'integer',
'deleted_at' => 'datetime',
'active' => 'boolean',
'encrypted' => 'boolean',
];
protected $fillable = ['user_id', 'user_group_id', 'account_type_id', 'name', 'active', 'virtual_balance', 'iban'];

View File

@@ -76,6 +76,13 @@ class RuleAction extends Model
protected $fillable = ['rule_id', 'action_type', 'action_value', 'order', 'active', 'stop_processing'];
public function getValue(array $journal): string
{
$expr = new ActionExpression($this->action_value);
return $expr->evaluate($journal);
}
public function rule(): BelongsTo
{
return $this->belongsTo(Rule::class);
@@ -94,10 +101,4 @@ class RuleAction extends Model
get: static fn ($value) => (int)$value,
);
}
public function getValue(array $journal): string
{
$expr = new ActionExpression($this->action_value);
return $expr->evaluate($journal);
}
}