Code clean up.

This commit is contained in:
James Cole
2017-11-15 12:25:49 +01:00
parent 57dcdfa0c4
commit ffca858b8d
476 changed files with 2055 additions and 4181 deletions

View File

@@ -1,7 +1,7 @@
<?php
/**
* ActionFactory.php
* Copyright (C) 2016 Robert Horlings
* Copyright (C) 2016 Robert Horlings.
*
* This file is part of Firefly III.
*
@@ -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\Factory;
@@ -32,8 +31,6 @@ use Log;
/**
* @codeCoverageIgnore
* Class ActionFactory
*
* @package FireflyIII\TransactionRules\Factory
*/
class ActionFactory
{
@@ -65,6 +62,7 @@ class ActionFactory
* @param string $actionType
*
* @return string
*
* @throws FireflyException
*/
public static function getActionClass(string $actionType): string
@@ -84,13 +82,13 @@ class ActionFactory
}
/**
* Returns a map with actiontypes, mapped to the class representing that type
* Returns a map with actiontypes, mapped to the class representing that type.
*
* @return array
*/
protected static function getActionTypes(): array
{
if (count(self::$actionTypes) === 0) {
if (0 === count(self::$actionTypes)) {
self::$actionTypes = Domain::getRuleActions();
}

View File

@@ -1,7 +1,7 @@
<?php
/**
* TriggerFactory.php
* Copyright (C) 2016 Robert Horlings
* Copyright (C) 2016 Robert Horlings.
*
* This file is part of Firefly III.
*
@@ -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\Factory;
@@ -33,8 +32,6 @@ use Log;
/**
* @codeCoverageIgnore
* Interface TriggerInterface
*
* @package FireflyIII\TransactionRules\Triggers
*/
class TriggerFactory
{
@@ -78,7 +75,9 @@ class TriggerFactory
* @param bool $stopProcessing
*
* @see TriggerFactory::getTrigger
*
* @return AbstractTrigger
*
* @throws FireflyException
*/
public static function makeTriggerFromStrings(string $triggerType, string $triggerValue, bool $stopProcessing)
@@ -98,7 +97,7 @@ class TriggerFactory
*/
protected static function getTriggerTypes(): array
{
if (count(self::$triggerTypes) === 0) {
if (0 === count(self::$triggerTypes)) {
self::$triggerTypes = Domain::getRuleTriggers();
}
@@ -113,6 +112,7 @@ class TriggerFactory
* @param string $triggerType
*
* @return TriggerInterface|string
*
* @throws FireflyException
*/
private static function getTriggerClass(string $triggerType): string