mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 22:21:42 +00:00
Remove unnecessary slash from in_array()
This commit is contained in:
@@ -49,8 +49,8 @@ class ReconciliationStoreRequest extends Request
|
||||
*/
|
||||
public function getAll(): array
|
||||
{
|
||||
$transactions = $this->get('transactions');
|
||||
if (!\is_array($transactions)) {
|
||||
$transactions = $this->get('journals');
|
||||
if (!is_array($transactions)) {
|
||||
$transactions = []; // @codeCoverageIgnore
|
||||
}
|
||||
$data = [
|
||||
@@ -59,7 +59,7 @@ class ReconciliationStoreRequest extends Request
|
||||
'start_balance' => $this->string('startBalance'),
|
||||
'end_balance' => $this->string('endBalance'),
|
||||
'difference' => $this->string('difference'),
|
||||
'transactions' => $transactions,
|
||||
'journals' => $transactions,
|
||||
'reconcile' => $this->string('reconcile'),
|
||||
];
|
||||
Log::debug('In ReconciliationStoreRequest::getAll(). Will now return data.');
|
||||
@@ -80,7 +80,7 @@ class ReconciliationStoreRequest extends Request
|
||||
'startBalance' => 'numeric',
|
||||
'endBalance' => 'numeric',
|
||||
'difference' => 'required|numeric',
|
||||
'transactions' => [new ValidTransactions],
|
||||
'journals' => [new ValidJournals],
|
||||
'reconcile' => 'required|in:create,nothing',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class ReportFormRequest extends Request
|
||||
$repository = app(AccountRepositoryInterface::class);
|
||||
$set = $this->get('accounts');
|
||||
$collection = new Collection;
|
||||
if (\is_array($set)) {
|
||||
if (is_array($set)) {
|
||||
foreach ($set as $accountId) {
|
||||
$account = $repository->findNull((int)$accountId);
|
||||
if (null !== $account) {
|
||||
@@ -83,7 +83,7 @@ class ReportFormRequest extends Request
|
||||
$repository = app(BudgetRepositoryInterface::class);
|
||||
$set = $this->get('budget');
|
||||
$collection = new Collection;
|
||||
if (\is_array($set)) {
|
||||
if (is_array($set)) {
|
||||
foreach ($set as $budgetId) {
|
||||
$budget = $repository->findNull((int)$budgetId);
|
||||
if (null !== $budget) {
|
||||
@@ -106,7 +106,7 @@ class ReportFormRequest extends Request
|
||||
$repository = app(CategoryRepositoryInterface::class);
|
||||
$set = $this->get('category');
|
||||
$collection = new Collection;
|
||||
if (\is_array($set)) {
|
||||
if (is_array($set)) {
|
||||
foreach ($set as $categoryId) {
|
||||
$category = $repository->findNull((int)$categoryId);
|
||||
if (null !== $category) {
|
||||
@@ -157,7 +157,7 @@ class ReportFormRequest extends Request
|
||||
$repository = app(AccountRepositoryInterface::class);
|
||||
$set = $this->get('exp_rev');
|
||||
$collection = new Collection;
|
||||
if (\is_array($set)) {
|
||||
if (is_array($set)) {
|
||||
foreach ($set as $accountId) {
|
||||
$account = $repository->findNull((int)$accountId);
|
||||
if (null !== $account) {
|
||||
@@ -208,7 +208,7 @@ class ReportFormRequest extends Request
|
||||
$set = $this->get('tag');
|
||||
$collection = new Collection;
|
||||
Log::debug('Set is:', $set ?? []);
|
||||
if (\is_array($set)) {
|
||||
if (is_array($set)) {
|
||||
foreach ($set as $tagTag) {
|
||||
Log::debug(sprintf('Now searching for "%s"', $tagTag));
|
||||
$tag = $repository->findByTag($tagTag);
|
||||
|
||||
@@ -112,7 +112,7 @@ class RuleFormRequest extends Request
|
||||
{
|
||||
$return = [];
|
||||
$actionData = $this->get('actions');
|
||||
if (\is_array($actionData)) {
|
||||
if (is_array($actionData)) {
|
||||
foreach ($actionData as $action) {
|
||||
$stopProcessing = $action['stop_processing'] ?? '0';
|
||||
$return[] = [
|
||||
@@ -133,7 +133,7 @@ class RuleFormRequest extends Request
|
||||
{
|
||||
$return = [];
|
||||
$triggerData = $this->get('triggers');
|
||||
if (\is_array($triggerData)) {
|
||||
if (is_array($triggerData)) {
|
||||
foreach ($triggerData as $trigger) {
|
||||
$stopProcessing = $trigger['stop_processing'] ?? '0';
|
||||
$return[] = [
|
||||
|
||||
Reference in New Issue
Block a user