mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Some code cleanup
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
This commit is contained in:
@@ -24,17 +24,17 @@ use FireflyIII\Models\TransactionJournal;
|
||||
class AddTag implements ActionInterface
|
||||
{
|
||||
|
||||
/** @var RuleAction */
|
||||
/** @var RuleAction */
|
||||
private $action;
|
||||
|
||||
/**
|
||||
* TriggerInterface constructor.
|
||||
*
|
||||
* @param RuleAction $action
|
||||
* @param RuleAction $action
|
||||
*/
|
||||
public function __construct(RuleAction $action)
|
||||
{
|
||||
$this->action = $action;
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -27,11 +27,11 @@ class AppendDescription implements ActionInterface
|
||||
/**
|
||||
* TriggerInterface constructor.
|
||||
*
|
||||
* @param RuleAction $action
|
||||
* @param RuleAction $action
|
||||
*/
|
||||
public function __construct(RuleAction $action)
|
||||
{
|
||||
$this->action = $action;
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -28,11 +28,11 @@ class ClearBudget implements ActionInterface
|
||||
/**
|
||||
* TriggerInterface constructor.
|
||||
*
|
||||
* @param RuleAction $action
|
||||
* @param RuleAction $action
|
||||
*/
|
||||
public function __construct(RuleAction $action)
|
||||
{
|
||||
$this->action = $action;
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -28,11 +28,11 @@ class ClearCategory implements ActionInterface
|
||||
/**
|
||||
* TriggerInterface constructor.
|
||||
*
|
||||
* @param RuleAction $action
|
||||
* @param RuleAction $action
|
||||
*/
|
||||
public function __construct(RuleAction $action)
|
||||
{
|
||||
$this->action = $action;
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -27,11 +27,11 @@ class PrependDescription implements ActionInterface
|
||||
/**
|
||||
* TriggerInterface constructor.
|
||||
*
|
||||
* @param RuleAction $action
|
||||
* @param RuleAction $action
|
||||
*/
|
||||
public function __construct(RuleAction $action)
|
||||
{
|
||||
$this->action = $action;
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -27,11 +27,11 @@ class RemoveAllTags implements ActionInterface
|
||||
/**
|
||||
* TriggerInterface constructor.
|
||||
*
|
||||
* @param RuleAction $action
|
||||
* @param RuleAction $action
|
||||
*/
|
||||
public function __construct(RuleAction $action)
|
||||
{
|
||||
$this->action = $action;
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,11 +30,11 @@ class RemoveTag implements ActionInterface
|
||||
/**
|
||||
* TriggerInterface constructor.
|
||||
*
|
||||
* @param RuleAction $action
|
||||
* @param RuleAction $action
|
||||
*/
|
||||
public function __construct(RuleAction $action)
|
||||
{
|
||||
$this->action = $action;
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -31,11 +31,11 @@ class SetBudget implements ActionInterface
|
||||
/**
|
||||
* TriggerInterface constructor.
|
||||
*
|
||||
* @param RuleAction $action
|
||||
* @param RuleAction $action
|
||||
*/
|
||||
public function __construct(RuleAction $action)
|
||||
{
|
||||
$this->action = $action;
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -31,11 +31,11 @@ class SetCategory implements ActionInterface
|
||||
/**
|
||||
* TriggerInterface constructor.
|
||||
*
|
||||
* @param RuleAction $action
|
||||
* @param RuleAction $action
|
||||
*/
|
||||
public function __construct(RuleAction $action)
|
||||
{
|
||||
$this->action = $action;
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -27,11 +27,11 @@ class SetDescription implements ActionInterface
|
||||
/**
|
||||
* TriggerInterface constructor.
|
||||
*
|
||||
* @param RuleAction $action
|
||||
* @param RuleAction $action
|
||||
*/
|
||||
public function __construct(RuleAction $action)
|
||||
{
|
||||
$this->action = $action;
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -51,6 +51,7 @@ class AbstractTrigger
|
||||
$self = new static;
|
||||
$self->triggerValue = $triggerValue;
|
||||
$self->stopProcessing = $stopProcessing;
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
@@ -54,7 +54,7 @@ final class FromAccountStarts extends AbstractTrigger implements TriggerInterfac
|
||||
public function triggered(TransactionJournal $journal)
|
||||
{
|
||||
$name = $journal->source_account_name ?? strtolower(TransactionJournal::sourceAccount($journal)->name);
|
||||
$search = strtolower($this->triggerValue);
|
||||
$search = strtolower($this->triggerValue);
|
||||
|
||||
$part = substr($name, 0, strlen($search));
|
||||
|
||||
|
Reference in New Issue
Block a user