mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Various code cleaning things.
This commit is contained in:
@@ -371,8 +371,8 @@ class Importer
|
|||||||
|
|
||||||
/** @var Rule $rule */
|
/** @var Rule $rule */
|
||||||
foreach ($group->rules as $rule) {
|
foreach ($group->rules as $rule) {
|
||||||
$processor = new Processor($rule, $journal);
|
$processor = Processor::make($rule);
|
||||||
$processor->handle();
|
$processor->handleTransactionJournal($journal);
|
||||||
if ($rule->stop_processing) {
|
if ($rule->stop_processing) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -97,6 +97,8 @@ class AuthController extends Controller
|
|||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
|
* @throws FireflyException
|
||||||
|
* @throws \Illuminate\Foundation\Validation\ValidationException
|
||||||
*/
|
*/
|
||||||
public function register(Request $request)
|
public function register(Request $request)
|
||||||
{
|
{
|
||||||
|
@@ -27,11 +27,6 @@ class HomeController extends Controller
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function displayError() {
|
|
||||||
throw new FireflyException('A very simple test error.');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function dateRange()
|
public function dateRange()
|
||||||
{
|
{
|
||||||
$start = new Carbon(Input::get('start'));
|
$start = new Carbon(Input::get('start'));
|
||||||
@@ -47,6 +42,11 @@ class HomeController extends Controller
|
|||||||
Session::put('end', $end);
|
Session::put('end', $end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function displayError()
|
||||||
|
{
|
||||||
|
throw new FireflyException('A very simple test error.');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Illuminate\Http\RedirectResponse
|
* @return \Illuminate\Http\RedirectResponse
|
||||||
*/
|
*/
|
||||||
|
@@ -139,7 +139,8 @@ class RuleController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Rule $rule
|
* @param RuleRepositoryInterface $repository
|
||||||
|
* @param Rule $rule
|
||||||
*
|
*
|
||||||
* @return View
|
* @return View
|
||||||
*/
|
*/
|
||||||
@@ -174,6 +175,8 @@ class RuleController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param RuleGroupRepositoryInterface $repository
|
||||||
|
*
|
||||||
* @return View
|
* @return View
|
||||||
*/
|
*/
|
||||||
public function index(RuleGroupRepositoryInterface $repository)
|
public function index(RuleGroupRepositoryInterface $repository)
|
||||||
@@ -263,6 +266,8 @@ class RuleController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param TestRuleFormRequest $request
|
||||||
|
*
|
||||||
* @return \Illuminate\View\View
|
* @return \Illuminate\View\View
|
||||||
*/
|
*/
|
||||||
public function testTriggers(TestRuleFormRequest $request)
|
public function testTriggers(TestRuleFormRequest $request)
|
||||||
|
@@ -7,6 +7,11 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Role
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Models
|
||||||
|
*/
|
||||||
class Role extends Model
|
class Role extends Model
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@@ -455,6 +455,7 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
* @return Account
|
* @return Account
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
private function storeAccount(array $data): Account
|
private function storeAccount(array $data): Account
|
||||||
{
|
{
|
||||||
|
@@ -112,6 +112,8 @@ class JournalRepository implements JournalRepositoryInterface
|
|||||||
* @param int $offset
|
* @param int $offset
|
||||||
* @param int $page
|
* @param int $page
|
||||||
*
|
*
|
||||||
|
* @param int $pagesize
|
||||||
|
*
|
||||||
* @return LengthAwarePaginator
|
* @return LengthAwarePaginator
|
||||||
*/
|
*/
|
||||||
public function getJournalsOfTypes(array $types, int $offset, int $page, int $pagesize = 50)
|
public function getJournalsOfTypes(array $types, int $offset, int $page, int $pagesize = 50)
|
||||||
@@ -347,7 +349,7 @@ class JournalRepository implements JournalRepositoryInterface
|
|||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*
|
* @throws FireflyException
|
||||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||||
*/
|
*/
|
||||||
protected function storeAccounts(TransactionType $type, array $data)
|
protected function storeAccounts(TransactionType $type, array $data)
|
||||||
|
@@ -36,9 +36,8 @@ class TransactionMatcher
|
|||||||
/**
|
/**
|
||||||
* Find matching transactions for the current set of triggers
|
* Find matching transactions for the current set of triggers
|
||||||
*
|
*
|
||||||
* @param int $maxResults The maximum number of transactions returned
|
|
||||||
*
|
|
||||||
* @return array
|
* @return array
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public function findMatchingTransactions()
|
public function findMatchingTransactions()
|
||||||
{
|
{
|
||||||
|
@@ -48,6 +48,8 @@ class TriggerFactory
|
|||||||
* @param string $triggerType
|
* @param string $triggerType
|
||||||
* @param string $triggerValue
|
* @param string $triggerValue
|
||||||
*
|
*
|
||||||
|
* @param bool $stopProcessing
|
||||||
|
*
|
||||||
* @return AbstractTrigger
|
* @return AbstractTrigger
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
|
@@ -221,9 +221,9 @@ return [
|
|||||||
],
|
],
|
||||||
'test-triggers' => [
|
'test-triggers' => [
|
||||||
// The maximum number of transactions shown when testing a list of triggers
|
// The maximum number of transactions shown when testing a list of triggers
|
||||||
'limit' => 10,
|
'limit' => 50,
|
||||||
|
|
||||||
// The maximum number of transactions to analyse, when testing a list of triggers
|
// The maximum number of transactions to analyse, when testing a list of triggers
|
||||||
'range' => 100
|
'range' => 1000
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
Reference in New Issue
Block a user