mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Some code cleanup.
This commit is contained in:
@@ -33,6 +33,9 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface
|
||||
parent::__construct($job);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// grab all the users attachments:
|
||||
|
@@ -29,6 +29,8 @@ class BasicCollector
|
||||
|
||||
/**
|
||||
* BasicCollector constructor.
|
||||
*
|
||||
* @param ExportJob $job
|
||||
*/
|
||||
public function __construct(ExportJob $job)
|
||||
{
|
||||
|
@@ -22,6 +22,11 @@ class ConfigurationFile
|
||||
/** @var ExportJob */
|
||||
private $job;
|
||||
|
||||
/**
|
||||
* ConfigurationFile constructor.
|
||||
*
|
||||
* @param ExportJob $job
|
||||
*/
|
||||
public function __construct(ExportJob $job)
|
||||
{
|
||||
$this->job = $job;
|
||||
|
@@ -28,6 +28,8 @@ class BasicExporter
|
||||
|
||||
/**
|
||||
* BasicExporter constructor.
|
||||
*
|
||||
* @param ExportJob $job
|
||||
*/
|
||||
public function __construct(ExportJob $job)
|
||||
{
|
||||
|
@@ -30,6 +30,8 @@ class CsvExporter extends BasicExporter implements ExporterInterface
|
||||
|
||||
/**
|
||||
* CsvExporter constructor.
|
||||
*
|
||||
* @param ExportJob $job
|
||||
*/
|
||||
public function __construct(ExportJob $job)
|
||||
{
|
||||
|
@@ -85,8 +85,8 @@ class ChartJsBudgetChartGenerator implements BudgetChartGeneratorInterface
|
||||
foreach ($filtered as $entry) {
|
||||
$data['labels'][] = $entry[0];
|
||||
$left[] = round($entry[1], 2);
|
||||
$spent[] = round(bcmul($entry[2],'-1'), 2); // spent is coming in negative, must be positive
|
||||
$overspent[] = round(bcmul($entry[3],'-1'), 2); // same
|
||||
$spent[] = round(bcmul($entry[2], '-1'), 2); // spent is coming in negative, must be positive
|
||||
$overspent[] = round(bcmul($entry[3], '-1'), 2); // same
|
||||
}
|
||||
|
||||
$data['datasets'][] = [
|
||||
|
@@ -58,7 +58,7 @@ class ConnectJournalToPiggyBank
|
||||
$amount = $journal->amount_positive;
|
||||
// if piggy account matches source account, the amount is positive
|
||||
if ($piggyBank->account_id == $journal->source_account->id) {
|
||||
$amount = bcmul($amount,'-1');
|
||||
$amount = bcmul($amount, '-1');
|
||||
}
|
||||
|
||||
|
||||
|
@@ -154,7 +154,9 @@ class AccountController extends Controller
|
||||
$subTitleIcon = Config::get('firefly.subIconsByIdentifier.' . $what);
|
||||
$types = Config::get('firefly.accountTypesByIdentifier.' . $what);
|
||||
$accounts = $repository->getAccounts($types);
|
||||
/** @var Carbon $start */
|
||||
$start = clone session('start', Carbon::now()->startOfMonth());
|
||||
/** @var Carbon $end */
|
||||
$end = clone session('end', Carbon::now()->endOfMonth());
|
||||
$start->subDay();
|
||||
|
||||
|
@@ -44,7 +44,8 @@ class BudgetController extends Controller
|
||||
*/
|
||||
public function amount(BudgetRepositoryInterface $repository, Budget $budget)
|
||||
{
|
||||
$amount = intval(Input::get('amount'));
|
||||
$amount = intval(Input::get('amount'));
|
||||
/** @var Carbon $date */
|
||||
$date = session('start', Carbon::now()->startOfMonth());
|
||||
$limitRepetition = $repository->updateLimitAmount($budget, $date, $amount);
|
||||
if ($amount == 0) {
|
||||
@@ -140,12 +141,14 @@ class BudgetController extends Controller
|
||||
*/
|
||||
public function index(BudgetRepositoryInterface $repository, ARI $accountRepository)
|
||||
{
|
||||
$budgets = $repository->getActiveBudgets();
|
||||
$inactive = $repository->getInactiveBudgets();
|
||||
$spent = '0';
|
||||
$budgeted = '0';
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
$start = Navigation::startOfPeriod(session('start', new Carbon), $range);
|
||||
$budgets = $repository->getActiveBudgets();
|
||||
$inactive = $repository->getInactiveBudgets();
|
||||
$spent = '0';
|
||||
$budgeted = '0';
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
/** @var Carbon $date */
|
||||
$date = session('start', new Carbon);
|
||||
$start = Navigation::startOfPeriod($date, $range);
|
||||
$end = Navigation::endOfPeriod($start, $range);
|
||||
$key = 'budgetIncomeTotal' . $start->format('Ymd') . $end->format('Ymd');
|
||||
$budgetIncomeTotal = Preferences::get($key, 1000)->data;
|
||||
@@ -186,8 +189,10 @@ class BudgetController extends Controller
|
||||
*/
|
||||
public function noBudget(BudgetRepositoryInterface $repository)
|
||||
{
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
$start = Navigation::startOfPeriod(session('start', new Carbon), $range);
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
/** @var Carbon $date */
|
||||
$date = session('start', new Carbon);
|
||||
$start = Navigation::startOfPeriod($date, $range);
|
||||
$end = Navigation::endOfPeriod($start, $range);
|
||||
$list = $repository->getWithoutBudget($start, $end);
|
||||
$subTitle = trans(
|
||||
@@ -204,7 +209,9 @@ class BudgetController extends Controller
|
||||
public function postUpdateIncome()
|
||||
{
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
$start = Navigation::startOfPeriod(session('start', new Carbon), $range);
|
||||
/** @var Carbon $date */
|
||||
$date = session('start', new Carbon);
|
||||
$start = Navigation::startOfPeriod($date, $range);
|
||||
$end = Navigation::endOfPeriod($start, $range);
|
||||
$key = 'budgetIncomeTotal' . $start->format('Ymd') . $end->format('Ymd');
|
||||
|
||||
@@ -322,8 +329,11 @@ class BudgetController extends Controller
|
||||
*/
|
||||
public function updateIncome()
|
||||
{
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
$start = Navigation::startOfPeriod(session('start', new Carbon), $range);
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
|
||||
/** @var Carbon $date */
|
||||
$date = session('start', new Carbon);
|
||||
$start = Navigation::startOfPeriod($date, $range);
|
||||
$end = Navigation::endOfPeriod($start, $range);
|
||||
$key = 'budgetIncomeTotal' . $start->format('Ymd') . $end->format('Ymd');
|
||||
$amount = Preferences::get($key, 1000);
|
||||
|
@@ -133,7 +133,9 @@ class CategoryController extends Controller
|
||||
*/
|
||||
public function noCategory(CRI $repository)
|
||||
{
|
||||
$start = session('start', Carbon::now()->startOfMonth());
|
||||
/** @var Carbon $start */
|
||||
$start = session('start', Carbon::now()->startOfMonth());
|
||||
/** @var Carbon $end */
|
||||
$end = session('end', Carbon::now()->startOfMonth());
|
||||
$list = $repository->listNoCategory($start, $end);
|
||||
$subTitle = trans(
|
||||
|
@@ -66,6 +66,8 @@ class ExportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ExportJob $job
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function getStatus(ExportJob $job)
|
||||
@@ -74,7 +76,9 @@ class ExportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ARI $repository
|
||||
* @param ARI $repository
|
||||
*
|
||||
* @param EJRI $jobs
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
@@ -100,7 +104,10 @@ class ExportController extends Controller
|
||||
* @param ExportFormRequest $request
|
||||
* @param ARI $repository
|
||||
*
|
||||
* @param EJRI $jobs
|
||||
*
|
||||
* @return string
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
*/
|
||||
public function postIndex(ExportFormRequest $request, ARI $repository, EJRI $jobs)
|
||||
{
|
||||
|
@@ -90,7 +90,9 @@ class HomeController extends Controller
|
||||
$mainTitleIcon = 'fa-fire';
|
||||
$transactions = [];
|
||||
$frontPage = Preferences::get('frontPageAccounts', []);
|
||||
/** @var Carbon $start */
|
||||
$start = session('start', Carbon::now()->startOfMonth());
|
||||
/** @var Carbon $end */
|
||||
$end = session('end', Carbon::now()->endOfMonth());
|
||||
$showTour = Preferences::get('tour', true)->data;
|
||||
$accounts = $repository->getFrontpageAccounts($frontPage);
|
||||
@@ -105,11 +107,11 @@ class HomeController extends Controller
|
||||
|
||||
$sum = $repository->sumOfEverything();
|
||||
|
||||
if ($sum != 0) {
|
||||
if (bccomp($sum, '0') !== 0) {
|
||||
Session::flash(
|
||||
'error', 'Your transactions are unbalanced. This means a'
|
||||
. ' withdrawal, deposit or transfer was not stored properly. '
|
||||
. 'Please check your accounts and transactions for errors.'
|
||||
. 'Please check your accounts and transactions for errors (' . $sum . ').'
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -66,7 +66,7 @@ class JsonController extends Controller
|
||||
if ($creditCardDue >= 0) {
|
||||
$amount = bcadd($amount, $creditCardDue);
|
||||
}
|
||||
$amount = bcmul($amount,'-1');
|
||||
$amount = bcmul($amount, '-1');
|
||||
|
||||
$data = ['box' => 'bills-paid', 'amount' => Amount::format($amount, false), 'amount_raw' => $amount];
|
||||
|
||||
|
@@ -48,6 +48,7 @@ class PiggyBankController extends Controller
|
||||
public function add(ARI $repository, PiggyBank $piggyBank)
|
||||
{
|
||||
bcscale(2);
|
||||
/** @var Carbon $date */
|
||||
$date = session('end', Carbon::now()->endOfMonth());
|
||||
$leftOnAccount = $repository->leftOnAccount($piggyBank->account, $date);
|
||||
$savedSoFar = $piggyBank->currentRelevantRep()->currentamount;
|
||||
@@ -229,6 +230,7 @@ class PiggyBankController extends Controller
|
||||
{
|
||||
bcscale(2);
|
||||
$amount = round(Input::get('amount'), 2);
|
||||
/** @var Carbon $date */
|
||||
$date = session('end', Carbon::now()->endOfMonth());
|
||||
$leftOnAccount = $accounts->leftOnAccount($piggyBank->account, $date);
|
||||
$savedSoFar = $piggyBank->currentRelevantRep()->currentamount;
|
||||
|
@@ -52,6 +52,7 @@ class ReportController extends Controller
|
||||
*/
|
||||
public function index(ARI $repository)
|
||||
{
|
||||
/** @var Carbon $start */
|
||||
$start = session('first');
|
||||
$months = $this->helper->listOfMonths($start);
|
||||
$customFiscalYear = Preferences::get('customFiscalYear', 0)->data;
|
||||
|
@@ -696,11 +696,11 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
|
||||
/**
|
||||
* @param Budget $budget
|
||||
* @param Carbon $date
|
||||
* @param $amount
|
||||
* @param int $amount
|
||||
*
|
||||
* @return BudgetLimit
|
||||
*/
|
||||
public function updateLimitAmount(Budget $budget, Carbon $date, $amount)
|
||||
public function updateLimitAmount(Budget $budget, Carbon $date, int $amount)
|
||||
{
|
||||
// there should be a budget limit for this startdate:
|
||||
/** @var BudgetLimit $limit */
|
||||
|
@@ -253,10 +253,10 @@ interface BudgetRepositoryInterface
|
||||
/**
|
||||
* @param Budget $budget
|
||||
* @param Carbon $date
|
||||
* @param $amount
|
||||
* @param int $amount
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function updateLimitAmount(Budget $budget, Carbon $date, $amount);
|
||||
public function updateLimitAmount(Budget $budget, Carbon $date, int $amount);
|
||||
|
||||
}
|
||||
|
@@ -111,9 +111,9 @@ class Amount
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $symbol
|
||||
* @param float $amount
|
||||
* @param bool $coloured
|
||||
* @param string $symbol
|
||||
* @param float|string $amount
|
||||
* @param bool $coloured
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
@@ -323,6 +323,7 @@ class TestData
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
* @param Carbon $date
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
*/
|
||||
@@ -651,9 +652,10 @@ class TestData
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $description
|
||||
* @param User $user
|
||||
* @param string $description
|
||||
* @param Carbon $date
|
||||
* @param $amount
|
||||
* @param string $amount
|
||||
*
|
||||
* @return TransactionJournal
|
||||
*/
|
||||
@@ -848,6 +850,7 @@ class TestData
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
* @param Carbon $date
|
||||
*
|
||||
* @return TransactionJournal
|
||||
@@ -985,7 +988,7 @@ class TestData
|
||||
* @param Carbon $date
|
||||
* @param string $amount
|
||||
*
|
||||
* @return static
|
||||
* @return TransactionJournal|static
|
||||
*/
|
||||
public static function createWater(User $user, string $description, Carbon $date, string $amount): TransactionJournal
|
||||
{
|
||||
|
@@ -184,7 +184,7 @@ class Steam
|
||||
|
||||
if (!(strpos($string, 'm') === false)) {
|
||||
// has a M in it, remove the M and multiply by 1048576.
|
||||
$bytes = bcmul(rtrim($string, 'm'),'1048576');
|
||||
$bytes = bcmul(rtrim($string, 'm'), '1048576');
|
||||
|
||||
return intval($bytes);
|
||||
}
|
||||
|
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||
@@ -29,14 +28,16 @@ class CreateSessionTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sessions', function ($table) {
|
||||
Schema::create(
|
||||
'sessions', function ($table) {
|
||||
$table->string('id')->unique();
|
||||
$table->integer('user_id')->nullable();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
$table->text('user_agent')->nullable();
|
||||
$table->text('payload');
|
||||
$table->integer('last_activity');
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -16,6 +16,8 @@ class AccountControllerTest extends TestCase
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::create
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::__construct
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testCreate($range)
|
||||
{
|
||||
@@ -58,9 +60,11 @@ class AccountControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::index
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::isInArray
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::index
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::isInArray
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testIndex($range)
|
||||
{
|
||||
@@ -71,8 +75,10 @@ class AccountControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::show
|
||||
* @covers FireflyIII\Http\Controllers\AccountController::show
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testShow($range)
|
||||
{
|
||||
|
@@ -58,8 +58,10 @@ class BillControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BillController::index
|
||||
* @covers FireflyIII\Http\Controllers\BillController::index
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testIndex($range)
|
||||
{
|
||||
@@ -70,8 +72,10 @@ class BillControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BillController::rescan
|
||||
* @covers FireflyIII\Http\Controllers\BillController::rescan
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testRescan($range)
|
||||
{
|
||||
@@ -83,8 +87,10 @@ class BillControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BillController::show
|
||||
* @covers FireflyIII\Http\Controllers\BillController::show
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testShow($range)
|
||||
{
|
||||
|
@@ -14,9 +14,11 @@
|
||||
class BudgetControllerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::amount
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::__construct
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::amount
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::__construct
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testAmount($range)
|
||||
{
|
||||
@@ -74,8 +76,10 @@ class BudgetControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::index
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::index
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testIndex($range)
|
||||
{
|
||||
@@ -86,8 +90,10 @@ class BudgetControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::noBudget
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::noBudget
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testNoBudget($range)
|
||||
{
|
||||
@@ -98,8 +104,10 @@ class BudgetControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::postUpdateIncome
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::postUpdateIncome
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testPostUpdateIncome($range)
|
||||
{
|
||||
@@ -114,8 +122,10 @@ class BudgetControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::show
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::show
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testShow($range)
|
||||
{
|
||||
@@ -163,8 +173,10 @@ class BudgetControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::updateIncome
|
||||
* @covers FireflyIII\Http\Controllers\BudgetController::updateIncome
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testUpdateIncome($range)
|
||||
{
|
||||
|
@@ -60,9 +60,10 @@ class CategoryControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::index
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::index
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testIndex($range)
|
||||
{
|
||||
@@ -73,8 +74,10 @@ class CategoryControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::noCategory
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::noCategory
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testNoCategory($range)
|
||||
{
|
||||
@@ -85,9 +88,11 @@ class CategoryControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::show
|
||||
* @covers FireflyIII\Http\Controllers\Controller::getSumOfRange
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::show
|
||||
* @covers FireflyIII\Http\Controllers\Controller::getSumOfRange
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testShow($range)
|
||||
{
|
||||
@@ -99,8 +104,10 @@ class CategoryControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::showWithDate
|
||||
* @covers FireflyIII\Http\Controllers\CategoryController::showWithDate
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testShowWithDate($range)
|
||||
{
|
||||
|
@@ -72,8 +72,10 @@ class CurrencyControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\CurrencyController::index
|
||||
* @covers FireflyIII\Http\Controllers\CurrencyController::index
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testIndex($range)
|
||||
{
|
||||
|
@@ -40,9 +40,11 @@ class HomeControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\HomeController::index
|
||||
* @covers FireflyIII\Http\Controllers\Controller::__construct
|
||||
* @covers FireflyIII\Http\Controllers\HomeController::index
|
||||
* @covers FireflyIII\Http\Controllers\Controller::__construct
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testIndex($range)
|
||||
{
|
||||
|
@@ -27,8 +27,10 @@ class JsonControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::boxBillsPaid
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::boxBillsPaid
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testBoxBillsPaid($range)
|
||||
{
|
||||
@@ -39,8 +41,10 @@ class JsonControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::boxBillsUnpaid
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::boxBillsUnpaid
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testBoxBillsUnpaid($range)
|
||||
{
|
||||
@@ -51,8 +55,10 @@ class JsonControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::boxIn
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::boxIn
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testBoxIn($range)
|
||||
{
|
||||
@@ -63,8 +69,10 @@ class JsonControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::boxOut
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::boxOut
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testBoxOut($range)
|
||||
{
|
||||
@@ -75,8 +83,10 @@ class JsonControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::categories
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::categories
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testCategories($range)
|
||||
{
|
||||
@@ -138,8 +148,10 @@ class JsonControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::transactionJournals
|
||||
* @covers FireflyIII\Http\Controllers\JsonController::transactionJournals
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testTransactionJournals($range)
|
||||
{
|
||||
|
@@ -17,6 +17,8 @@ class PiggyBankControllerTest extends TestCase
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::add
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::__construct
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testAdd($range)
|
||||
{
|
||||
@@ -71,6 +73,8 @@ class PiggyBankControllerTest extends TestCase
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::index
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testIndex($range)
|
||||
{
|
||||
@@ -138,6 +142,8 @@ class PiggyBankControllerTest extends TestCase
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PiggyBankController::show
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testShow($range)
|
||||
{
|
||||
|
@@ -26,8 +26,10 @@ class PreferencesControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\PreferencesController::postIndex
|
||||
* @covers FireflyIII\Http\Controllers\PreferencesController::postIndex
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testPostIndex($range)
|
||||
{
|
||||
|
@@ -19,8 +19,10 @@ class ReportControllerTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::index
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::index
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testIndex($range)
|
||||
{
|
||||
@@ -32,10 +34,12 @@ class ReportControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::__construct
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::report
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::defaultMonth
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::__construct
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::report
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::defaultMonth
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testReportDefaultMonth($range)
|
||||
{
|
||||
@@ -54,9 +58,11 @@ class ReportControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::report
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::defaultYear
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::report
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::defaultYear
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testReportDefaultYear($range)
|
||||
{
|
||||
@@ -67,9 +73,11 @@ class ReportControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::report
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::defaultMultiYear
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::report
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::defaultMultiYear
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testReportDefaultMultiYear($range)
|
||||
{
|
||||
|
@@ -59,8 +59,10 @@ class TransactionControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::index
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::index
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testIndex($range)
|
||||
{
|
||||
@@ -85,8 +87,10 @@ class TransactionControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::show
|
||||
* @covers FireflyIII\Http\Controllers\TransactionController::show
|
||||
* @dataProvider dateRangeProvider
|
||||
*
|
||||
* @param $range
|
||||
*/
|
||||
public function testShow($range)
|
||||
{
|
||||
|
Reference in New Issue
Block a user