Various code cleanup.

This commit is contained in:
James Cole
2017-12-22 18:32:43 +01:00
parent f13a93348f
commit 8bd76d1ff0
188 changed files with 383 additions and 396 deletions

View File

@@ -51,6 +51,7 @@ class ClearNotes implements ActionInterface
* @param TransactionJournal $journal
*
* @return bool
*
* @throws \Exception
*/
public function act(TransactionJournal $journal): bool

View File

@@ -67,6 +67,7 @@ class RemoveTag implements ActionInterface
Log::debug(sprintf('RuleAction RemoveTag removed tag #%d ("%s") from journal #%d.', $tag->id, $tag->tag, $journal->id));
$journal->tags()->detach([$tag->id]);
$journal->touch();
return true;
}
Log::debug(sprintf('RuleAction RemoveTag tried to remove tag "%s" from journal #%d but no such tag exists.', $name, $journal->id));

View File

@@ -89,6 +89,7 @@ class SetBudget implements ActionInterface
$journal->budgets()->sync([$budget->id]);
$journal->touch();
return true;
}
}

View File

@@ -35,7 +35,6 @@ class SetDescription implements ActionInterface
private $action;
/**
*
* TriggerInterface constructor.
*
* @param RuleAction $action

View File

@@ -59,6 +59,7 @@ class SetDestinationAccount implements ActionInterface
/**
* Set destination account to X
*
* @param TransactionJournal $journal
*
* @return bool

View File

@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;

View File

@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
@@ -42,7 +41,7 @@ class SetSourceAccount implements ActionInterface
/** @var TransactionJournal The journal */
private $journal;
/** @var Account The new source account*/
/** @var Account The new source account */
private $newSourceAccount;
/** @var AccountRepositoryInterface Account repository */

View File

@@ -47,6 +47,7 @@ class ActionFactory
* @param RuleAction $action
*
* @return ActionInterface
*
* @throws FireflyException
*/
public static function getAction(RuleAction $action): ActionInterface

View File

@@ -49,6 +49,7 @@ class TriggerFactory
* @param RuleTrigger $trigger
*
* @return AbstractTrigger
*
* @throws FireflyException
*/
public static function getTrigger(RuleTrigger $trigger)

View File

@@ -45,7 +45,7 @@ final class Processor
public $journal;
/** @var Rule Rule that applies */
public $rule;
/** @var Collection All triggers*/
/** @var Collection All triggers */
public $triggers;
/** @var int Found triggers */
private $foundTriggers = 0;
@@ -95,6 +95,7 @@ final class Processor
* @param string $triggerValue
*
* @return Processor
*
* @throws \FireflyIII\Exceptions\FireflyException
*/
public static function makeFromString(string $triggerName, string $triggerValue)
@@ -119,6 +120,7 @@ final class Processor
* @param array $triggers
*
* @return Processor
*
* @throws \FireflyIII\Exceptions\FireflyException
*/
public static function makeFromStringArray(array $triggers)

View File

@@ -109,6 +109,7 @@ class TransactionMatcher
/**
* Return limit
*
* @return int
*/
public function getLimit(): int
@@ -132,6 +133,7 @@ class TransactionMatcher
/**
* Get range
*
* @return int
*/
public function getRange(): int
@@ -155,6 +157,7 @@ class TransactionMatcher
/**
* Get triggers
*
* @return array
*/
public function getTriggers(): array

View File

@@ -73,6 +73,7 @@ class AbstractTrigger
/**
* Make a new trigger from the rule trigger in the parameter
*
* @codeCoverageIgnore
*
* @param RuleTrigger $trigger

View File

@@ -64,6 +64,7 @@ final class DescriptionContains extends AbstractTrigger implements TriggerInterf
/**
* Returns true when description contains X
*
* @param TransactionJournal $journal
*
* @return bool

View File

@@ -54,6 +54,7 @@ final class HasNoBudget extends AbstractTrigger implements TriggerInterface
/**
* Returns true when journal has no budget
*
* @param TransactionJournal $journal
*
* @return bool

View File

@@ -65,6 +65,7 @@ final class NotesEnd extends AbstractTrigger implements TriggerInterface
/**
* Returns true when notes end with X
*
* @param TransactionJournal $journal
*
* @return bool

View File

@@ -64,6 +64,7 @@ final class ToAccountIs extends AbstractTrigger implements TriggerInterface
/**
* Returns true when to-account is X.
*
* @param TransactionJournal $journal
*
* @return bool