mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Expand test coverage.
This commit is contained in:
@@ -276,6 +276,9 @@ class BudgetController extends Controller
|
||||
$cache->addProperty($end);
|
||||
$cache->addProperty('info-income');
|
||||
|
||||
Log::debug(sprintf('infoIncome start is %s', $start->format('Y-m-d')));
|
||||
Log::debug(sprintf('infoIncome end is %s', $end->format('Y-m-d')));
|
||||
|
||||
if ($cache->has()) {
|
||||
// @codeCoverageIgnoreStart
|
||||
$result = $cache->get();
|
||||
@@ -292,18 +295,24 @@ class BudgetController extends Controller
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
$begin = app('navigation')->subtractPeriod($start, $range, 3);
|
||||
|
||||
Log::debug(sprintf('Range is %s', $range));
|
||||
Log::debug(sprintf('infoIncome begin is %s', $begin->format('Y-m-d')));
|
||||
|
||||
// get average amount available.
|
||||
$total = '0';
|
||||
$count = 0;
|
||||
$currentStart = clone $begin;
|
||||
while ($currentStart < $start) {
|
||||
Log::debug(sprintf('Loop: currentStart is %s', $currentStart->format('Y-m-d')));
|
||||
$currentEnd = app('navigation')->endOfPeriod($currentStart, $range);
|
||||
$total = bcadd($total, $this->repository->getAvailableBudget($currency, $currentStart, $currentEnd));
|
||||
$currentStart = app('navigation')->addPeriod($currentStart, $range, 0);
|
||||
++$count;
|
||||
}
|
||||
Log::debug('Loop end');
|
||||
|
||||
if (0 === $count) {
|
||||
$count = 1; // @codeCoverageIgnore
|
||||
$count = 1;
|
||||
}
|
||||
$result['available'] = bcdiv($total, strval($count));
|
||||
|
||||
|
@@ -73,7 +73,7 @@ class IndexController extends Controller
|
||||
public function create(string $bank)
|
||||
{
|
||||
if (true === !(config(sprintf('import.enabled.%s', $bank)))) {
|
||||
throw new FireflyException(sprintf('Cannot import from "%s" at this time.', $bank));
|
||||
throw new FireflyException(sprintf('Cannot import from "%s" at this time.', $bank)); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
$importJob = $this->repository->create($bank);
|
||||
|
@@ -24,6 +24,7 @@ namespace FireflyIII\Http\Controllers\Import;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Middleware\IsDemoUser;
|
||||
use FireflyIII\Import\Prerequisites\PrerequisitesInterface;
|
||||
use Illuminate\Http\Request;
|
||||
use Log;
|
||||
@@ -33,6 +34,25 @@ use Log;
|
||||
*/
|
||||
class PrerequisitesController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
app('view')->share('mainTitleIcon', 'fa-archive');
|
||||
app('view')->share('title', trans('firefly.import_index_title'));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
$this->middleware(IsDemoUser::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Once there are no prerequisites, this method will create an importjob object and
|
||||
* redirect the user to a view where this object can be used by a bank specific
|
||||
@@ -47,11 +67,11 @@ class PrerequisitesController extends Controller
|
||||
public function index(string $bank)
|
||||
{
|
||||
if (true === !(config(sprintf('import.enabled.%s', $bank)))) {
|
||||
throw new FireflyException(sprintf('Cannot import from "%s" at this time.', $bank));
|
||||
throw new FireflyException(sprintf('Cannot import from "%s" at this time.', $bank)); // @codeCoverageIgnore
|
||||
}
|
||||
$class = strval(config(sprintf('import.prerequisites.%s', $bank)));
|
||||
if (!class_exists($class)) {
|
||||
throw new FireflyException(sprintf('No class to handle "%s".', $bank));
|
||||
throw new FireflyException(sprintf('No class to handle "%s".', $bank)); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
/** @var PrerequisitesInterface $object */
|
||||
@@ -61,7 +81,7 @@ class PrerequisitesController extends Controller
|
||||
if ($object->hasPrerequisites()) {
|
||||
$view = $object->getView();
|
||||
$parameters = ['title' => strval(trans('firefly.import_index_title')), 'mainTitleIcon' => 'fa-archive'];
|
||||
$parameters = $object->getViewParameters() + $parameters;
|
||||
$parameters = array_merge($object->getViewParameters(), $parameters);
|
||||
|
||||
return view($view, $parameters);
|
||||
}
|
||||
@@ -88,9 +108,14 @@ class PrerequisitesController extends Controller
|
||||
public function post(Request $request, string $bank)
|
||||
{
|
||||
Log::debug(sprintf('Now in postPrerequisites for %s', $bank));
|
||||
|
||||
if (true === !(config(sprintf('import.enabled.%s', $bank)))) {
|
||||
throw new FireflyException(sprintf('Cannot import from "%s" at this time.', $bank)); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
$class = strval(config(sprintf('import.prerequisites.%s', $bank)));
|
||||
if (!class_exists($class)) {
|
||||
throw new FireflyException(sprintf('Cannot find class %s', $class));
|
||||
throw new FireflyException(sprintf('Cannot find class %s', $class)); // @codeCoverageIgnore
|
||||
}
|
||||
/** @var PrerequisitesInterface $object */
|
||||
$object = app($class);
|
||||
@@ -106,10 +131,8 @@ class PrerequisitesController extends Controller
|
||||
|
||||
if ($result->count() > 0) {
|
||||
$request->session()->flash('error', $result->first());
|
||||
|
||||
return redirect(route('import.prerequisites', [$bank]));
|
||||
}
|
||||
|
||||
return redirect(route('import.create-job', [$bank]));
|
||||
return redirect(route('import.prerequisites', [$bank]));
|
||||
}
|
||||
}
|
||||
|
@@ -56,9 +56,9 @@ class StatusController extends Controller
|
||||
*/
|
||||
public function index(ImportJob $job)
|
||||
{
|
||||
$statuses = ['configured', 'running', 'finished', 'errored'];
|
||||
$statuses = ['configured', 'running', 'finished', 'error'];
|
||||
if (!in_array($job->status, $statuses)) {
|
||||
return redirect(route('import.file.configure', [$job->key]));
|
||||
return redirect(route('import.configure', [$job->key]));
|
||||
}
|
||||
$subTitle = trans('import.status_sub_title');
|
||||
$subTitleIcon = 'fa-star';
|
||||
@@ -108,7 +108,7 @@ class StatusController extends Controller
|
||||
$result['running'] = true;
|
||||
}
|
||||
|
||||
// TODO cannot handle 'errored'
|
||||
// TODO cannot handle 'error'
|
||||
|
||||
return Response::json($result);
|
||||
}
|
||||
|
@@ -29,6 +29,7 @@ use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use Log;
|
||||
use Response;
|
||||
|
||||
/**
|
||||
@@ -81,7 +82,7 @@ class AutoCompleteController extends Controller
|
||||
$set = $repository->getAccountsByType([AccountType::EXPENSE, AccountType::BENEFICIARY]);
|
||||
$filtered = $set->filter(
|
||||
function (Account $account) {
|
||||
if ($account->active) {
|
||||
if ($account->active === true) {
|
||||
return $account;
|
||||
}
|
||||
|
||||
@@ -138,7 +139,7 @@ class AutoCompleteController extends Controller
|
||||
$set = $repository->getAccountsByType([AccountType::REVENUE]);
|
||||
$filtered = $set->filter(
|
||||
function (Account $account) {
|
||||
if ($account->active) {
|
||||
if ($account->active === true) {
|
||||
return $account;
|
||||
}
|
||||
|
||||
|
@@ -32,6 +32,8 @@ use Response;
|
||||
class IntroController
|
||||
{
|
||||
/**
|
||||
* Get the intro steps. There are currently no specific routes with an outro step.
|
||||
*
|
||||
* @param string $route
|
||||
* @param string $specificPage
|
||||
*
|
||||
@@ -39,12 +41,15 @@ class IntroController
|
||||
*/
|
||||
public function getIntroSteps(string $route, string $specificPage = '')
|
||||
{
|
||||
Log::debug(sprintf('getIntroSteps for route "%s" and page "%s"', $route, $specificPage));
|
||||
$steps = $this->getBasicSteps($route);
|
||||
$specificSteps = $this->getSpecificSteps($route, $specificPage);
|
||||
if (0 === count($specificSteps)) {
|
||||
Log::debug(sprintf('No specific steps for route "%s" and page "%s"', $route, $specificPage));
|
||||
return Response::json($steps);
|
||||
}
|
||||
if ($this->hasOutroStep($route)) {
|
||||
// @codeCoverageIgnoreStart
|
||||
// save last step:
|
||||
$lastStep = $steps[count($steps) - 1];
|
||||
// remove last step:
|
||||
@@ -52,6 +57,7 @@ class IntroController
|
||||
// merge arrays and add last step again
|
||||
$steps = array_merge($steps, $specificSteps);
|
||||
$steps[] = $lastStep;
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
if (!$this->hasOutroStep($route)) {
|
||||
$steps = array_merge($steps, $specificSteps);
|
||||
@@ -68,13 +74,16 @@ class IntroController
|
||||
public function hasOutroStep(string $route): bool
|
||||
{
|
||||
$routeKey = str_replace('.', '_', $route);
|
||||
Log::debug(sprintf('Has outro step for route %s', $routeKey));
|
||||
$elements = config(sprintf('intro.%s', $routeKey));
|
||||
if (!is_array($elements)) {
|
||||
return false;
|
||||
}
|
||||
$keys = array_keys($elements);
|
||||
Log::debug('Elements is array', $elements);
|
||||
Log::debug('Keys is', array_keys($elements));
|
||||
Log::debug(sprintf('Keys has "outro": %s', var_export(in_array('outro', array_keys($elements)), true)));
|
||||
|
||||
return in_array('outro', $keys);
|
||||
return in_array('outro', array_keys($elements));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -135,6 +144,7 @@ class IntroController
|
||||
$steps[] = $currentStep;
|
||||
}
|
||||
}
|
||||
Log::debug(sprintf('Total basic steps for %s is %d', $routeKey, count($steps)));
|
||||
|
||||
return $steps;
|
||||
}
|
||||
@@ -147,7 +157,8 @@ class IntroController
|
||||
*/
|
||||
private function getSpecificSteps(string $route, string $specificPage): array
|
||||
{
|
||||
$steps = [];
|
||||
$steps = [];
|
||||
$routeKey = '';
|
||||
|
||||
// user is on page with specific instructions:
|
||||
if (strlen($specificPage) > 0) {
|
||||
@@ -165,6 +176,7 @@ class IntroController
|
||||
}
|
||||
}
|
||||
}
|
||||
Log::debug(sprintf('Total specific steps for route "%s" and page "%s" (routeKey is "%s") is %d', $route, $specificPage, $routeKey, count($steps)));
|
||||
|
||||
return $steps;
|
||||
}
|
||||
|
@@ -99,13 +99,13 @@ class LinkController extends Controller
|
||||
JournalRepositoryInterface $journalRepository,
|
||||
TransactionJournal $journal
|
||||
) {
|
||||
Log::debug('We are here (store)');
|
||||
$linkInfo = $request->getLinkInfo();
|
||||
if (0 === $linkInfo['transaction_journal_id']) {
|
||||
Session::flash('error', trans('firefly.invalid_link_selection'));
|
||||
|
||||
return redirect(route('transactions.show', [$journal->id]));
|
||||
}
|
||||
$linkType = $repository->find($linkInfo['link_type_id']);
|
||||
$other = $journalRepository->find($linkInfo['transaction_journal_id']);
|
||||
$alreadyLinked = $repository->findLink($journal, $other);
|
||||
if ($alreadyLinked) {
|
||||
@@ -115,22 +115,7 @@ class LinkController extends Controller
|
||||
}
|
||||
Log::debug(sprintf('Journal is %d, opposing is %d', $journal->id, $other->id));
|
||||
|
||||
$journalLink = new TransactionJournalLink;
|
||||
$journalLink->linkType()->associate($linkType);
|
||||
if ('inward' === $linkInfo['direction']) {
|
||||
Log::debug(sprintf('Link type is inwards ("%s"), so %d is source and %d is destination.', $linkType->inward, $other->id, $journal->id));
|
||||
$journalLink->source()->associate($other);
|
||||
$journalLink->destination()->associate($journal);
|
||||
}
|
||||
|
||||
if ('outward' === $linkInfo['direction']) {
|
||||
Log::debug(sprintf('Link type is inwards ("%s"), so %d is source and %d is destination.', $linkType->outward, $journal->id, $other->id));
|
||||
$journalLink->source()->associate($journal);
|
||||
$journalLink->destination()->associate($other);
|
||||
}
|
||||
|
||||
$journalLink->comment = $linkInfo['comments'];
|
||||
$journalLink->save();
|
||||
$repository->storeLink($linkInfo, $other, $journal);
|
||||
Session::flash('success', trans('firefly.journals_linked'));
|
||||
|
||||
return redirect(route('transactions.show', [$journal->id]));
|
||||
|
@@ -143,7 +143,7 @@ class SingleController extends Controller
|
||||
];
|
||||
|
||||
/** @var Note $note */
|
||||
$note = $journal->notes()->first();
|
||||
$note = $this->repository->getNote($journal);
|
||||
if (null !== $note) {
|
||||
$preFilled['notes'] = $note->text;
|
||||
}
|
||||
@@ -302,7 +302,7 @@ class SingleController extends Controller
|
||||
'destination_currency' => $foreignCurrency,
|
||||
];
|
||||
/** @var Note $note */
|
||||
$note = $journal->notes()->first();
|
||||
$note = $this->repository->getNote($journal);
|
||||
if (null !== $note) {
|
||||
$preFilled['notes'] = $note->text;
|
||||
}
|
||||
|
@@ -47,6 +47,7 @@ use Illuminate\Routing\Middleware\ThrottleRequests;
|
||||
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class Kernel
|
||||
*/
|
||||
class Kernel extends HttpKernel
|
||||
|
@@ -25,6 +25,7 @@ namespace FireflyIII\Http\Middleware;
|
||||
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class EncryptCookies
|
||||
*/
|
||||
class EncryptCookies extends Middleware
|
||||
|
@@ -26,6 +26,7 @@ use Closure;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class RedirectIfAuthenticated
|
||||
*/
|
||||
class RedirectIfAuthenticated
|
||||
|
@@ -25,6 +25,7 @@ namespace FireflyIII\Http\Middleware;
|
||||
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class TrimStrings
|
||||
*/
|
||||
class TrimStrings extends Middleware
|
||||
|
@@ -27,6 +27,7 @@ use Illuminate\Contracts\Config\Repository;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class TrustProxies
|
||||
*/
|
||||
class TrustProxies extends Middleware
|
||||
|
@@ -25,6 +25,7 @@ namespace FireflyIII\Http\Middleware;
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class VerifyCsrfToken
|
||||
*/
|
||||
class VerifyCsrfToken extends Middleware
|
||||
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class AttachmentFormRequest.
|
||||
*/
|
||||
class AttachmentFormRequest extends Request
|
||||
|
@@ -64,9 +64,9 @@ class BillFormRequest extends Request
|
||||
{
|
||||
$nameRule = 'required|between:1,255|uniqueObjectForUser:bills,name';
|
||||
$matchRule = 'required|between:1,255|uniqueObjectForUser:bills,match';
|
||||
if (intval($this->get('id')) > 0) {
|
||||
$nameRule .= ',' . intval($this->get('id'));
|
||||
$matchRule .= ',' . intval($this->get('id'));
|
||||
if ($this->integer('id') > 0) {
|
||||
$nameRule .= ',' . $this->integer('id');
|
||||
$matchRule .= ',' . $this->integer('id');
|
||||
}
|
||||
// is OK
|
||||
$rules = [
|
||||
|
@@ -25,6 +25,7 @@ namespace FireflyIII\Http\Requests;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class BudgetFormRequest.
|
||||
*/
|
||||
class BudgetFormRequest extends Request
|
||||
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class BudgetIncomeRequest.
|
||||
*/
|
||||
class BudgetIncomeRequest extends Request
|
||||
|
@@ -56,8 +56,8 @@ class CategoryFormRequest extends Request
|
||||
/** @var CategoryRepositoryInterface $repository */
|
||||
$repository = app(CategoryRepositoryInterface::class);
|
||||
$nameRule = 'required|between:1,100|uniqueObjectForUser:categories,name';
|
||||
if (null !== $repository->find(intval($this->get('id')))->id) {
|
||||
$nameRule = 'required|between:1,100|uniqueObjectForUser:categories,name,' . intval($this->get('id'));
|
||||
if (null !== $repository->find($this->integer('id'))->id) {
|
||||
$nameRule = 'required|between:1,100|uniqueObjectForUser:categories,name,' . $this->integer('id');
|
||||
}
|
||||
|
||||
// fixed
|
||||
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class ConfigurationRequest.
|
||||
*/
|
||||
class ConfigurationRequest extends Request
|
||||
|
@@ -23,7 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
/**
|
||||
* Class BillFormRequest.
|
||||
* Class CurrencyFormRequest.
|
||||
*/
|
||||
class CurrencyFormRequest extends Request
|
||||
{
|
||||
@@ -61,7 +61,7 @@ class CurrencyFormRequest extends Request
|
||||
'symbol' => 'required|min:1|max:8|unique:transaction_currencies,symbol',
|
||||
'decimal_places' => 'required|min:0|max:12|numeric',
|
||||
];
|
||||
if (intval($this->get('id')) > 0) {
|
||||
if ($this->integer('id') > 0) {
|
||||
$rules = [
|
||||
'name' => 'required|max:48|min:1',
|
||||
'code' => 'required|min:3|max:3',
|
||||
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class DeleteAccountFormRequest.
|
||||
*/
|
||||
class DeleteAccountFormRequest extends Request
|
||||
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class EmailFormRequest.
|
||||
*/
|
||||
class EmailFormRequest extends Request
|
||||
|
@@ -1,53 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* ImportUploadRequest.php
|
||||
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* 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\Http\Requests;
|
||||
|
||||
/**
|
||||
* Class ImportUploadRequest.
|
||||
*/
|
||||
class ImportUploadRequest extends Request
|
||||
{
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
// Only allow logged in users
|
||||
return auth()->check();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
// fixed
|
||||
$types = array_keys(config('firefly.import_formats'));
|
||||
|
||||
return [
|
||||
'import_file' => 'required|file',
|
||||
'import_file_type' => 'required|in:' . join(',', $types),
|
||||
'configuration_file' => 'file',
|
||||
];
|
||||
}
|
||||
}
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class MassDeleteJournalRequest.
|
||||
*/
|
||||
class MassDeleteJournalRequest extends Request
|
||||
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class MassEditJournalRequest.
|
||||
*/
|
||||
class MassEditJournalRequest extends Request
|
||||
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class NewUserFormRequest.
|
||||
*/
|
||||
class NewUserFormRequest extends Request
|
||||
|
@@ -57,8 +57,8 @@ class PiggyBankFormRequest extends Request
|
||||
public function rules()
|
||||
{
|
||||
$nameRule = 'required|between:1,255|uniquePiggyBankForUser';
|
||||
if (intval($this->get('id'))) {
|
||||
$nameRule = 'required|between:1,255|uniquePiggyBankForUser:' . intval($this->get('id'));
|
||||
if ($this->integer('id')) {
|
||||
$nameRule = 'required|between:1,255|uniquePiggyBankForUser:' . $this->integer('id');
|
||||
}
|
||||
|
||||
$rules = [
|
||||
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class ProfileFormRequest.
|
||||
*/
|
||||
class ProfileFormRequest extends Request
|
||||
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class ReconciliationFormRequest.
|
||||
*/
|
||||
class ReconciliationFormRequest extends Request
|
||||
|
@@ -25,6 +25,7 @@ namespace FireflyIII\Http\Requests;
|
||||
use Carbon\Carbon;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class ExportFormRequest.
|
||||
*/
|
||||
class SelectTransactionsRequest extends Request
|
||||
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class RuleFormRequest.
|
||||
*/
|
||||
class TestRuleFormRequest extends Request
|
||||
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class TokenFormRequest.
|
||||
*/
|
||||
class TokenFormRequest extends Request
|
||||
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class UserFormRequest.
|
||||
*/
|
||||
class UserFormRequest extends Request
|
||||
|
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
/**
|
||||
* @CodeCoverageIgnore
|
||||
* Class UserRegistrationRequest.
|
||||
*/
|
||||
class UserRegistrationRequest extends Request
|
||||
|
Reference in New Issue
Block a user