Remove unnecessary slash from in_array()

This commit is contained in:
James Cole
2019-06-22 13:09:25 +02:00
parent 940a730827
commit 956ec23d3c
20 changed files with 34 additions and 34 deletions

View File

@@ -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',
];
}

View File

@@ -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);

View File

@@ -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[] = [