Some code cleanup.

This commit is contained in:
James Cole
2016-02-05 15:41:40 +01:00
parent 4ef840e210
commit f5b89ca783
32 changed files with 183 additions and 72 deletions

View File

@@ -33,6 +33,9 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface
parent::__construct($job); parent::__construct($job);
} }
/**
*
*/
public function run() public function run()
{ {
// grab all the users attachments: // grab all the users attachments:

View File

@@ -29,6 +29,8 @@ class BasicCollector
/** /**
* BasicCollector constructor. * BasicCollector constructor.
*
* @param ExportJob $job
*/ */
public function __construct(ExportJob $job) public function __construct(ExportJob $job)
{ {

View File

@@ -22,6 +22,11 @@ class ConfigurationFile
/** @var ExportJob */ /** @var ExportJob */
private $job; private $job;
/**
* ConfigurationFile constructor.
*
* @param ExportJob $job
*/
public function __construct(ExportJob $job) public function __construct(ExportJob $job)
{ {
$this->job = $job; $this->job = $job;

View File

@@ -28,6 +28,8 @@ class BasicExporter
/** /**
* BasicExporter constructor. * BasicExporter constructor.
*
* @param ExportJob $job
*/ */
public function __construct(ExportJob $job) public function __construct(ExportJob $job)
{ {

View File

@@ -30,6 +30,8 @@ class CsvExporter extends BasicExporter implements ExporterInterface
/** /**
* CsvExporter constructor. * CsvExporter constructor.
*
* @param ExportJob $job
*/ */
public function __construct(ExportJob $job) public function __construct(ExportJob $job)
{ {

View File

@@ -154,7 +154,9 @@ class AccountController extends Controller
$subTitleIcon = Config::get('firefly.subIconsByIdentifier.' . $what); $subTitleIcon = Config::get('firefly.subIconsByIdentifier.' . $what);
$types = Config::get('firefly.accountTypesByIdentifier.' . $what); $types = Config::get('firefly.accountTypesByIdentifier.' . $what);
$accounts = $repository->getAccounts($types); $accounts = $repository->getAccounts($types);
/** @var Carbon $start */
$start = clone session('start', Carbon::now()->startOfMonth()); $start = clone session('start', Carbon::now()->startOfMonth());
/** @var Carbon $end */
$end = clone session('end', Carbon::now()->endOfMonth()); $end = clone session('end', Carbon::now()->endOfMonth());
$start->subDay(); $start->subDay();

View File

@@ -45,6 +45,7 @@ class BudgetController extends Controller
public function amount(BudgetRepositoryInterface $repository, Budget $budget) 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()); $date = session('start', Carbon::now()->startOfMonth());
$limitRepetition = $repository->updateLimitAmount($budget, $date, $amount); $limitRepetition = $repository->updateLimitAmount($budget, $date, $amount);
if ($amount == 0) { if ($amount == 0) {
@@ -145,7 +146,9 @@ class BudgetController extends Controller
$spent = '0'; $spent = '0';
$budgeted = '0'; $budgeted = '0';
$range = Preferences::get('viewRange', '1M')->data; $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); $end = Navigation::endOfPeriod($start, $range);
$key = 'budgetIncomeTotal' . $start->format('Ymd') . $end->format('Ymd'); $key = 'budgetIncomeTotal' . $start->format('Ymd') . $end->format('Ymd');
$budgetIncomeTotal = Preferences::get($key, 1000)->data; $budgetIncomeTotal = Preferences::get($key, 1000)->data;
@@ -187,7 +190,9 @@ class BudgetController extends Controller
public function noBudget(BudgetRepositoryInterface $repository) public function noBudget(BudgetRepositoryInterface $repository)
{ {
$range = Preferences::get('viewRange', '1M')->data; $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); $end = Navigation::endOfPeriod($start, $range);
$list = $repository->getWithoutBudget($start, $end); $list = $repository->getWithoutBudget($start, $end);
$subTitle = trans( $subTitle = trans(
@@ -204,7 +209,9 @@ class BudgetController extends Controller
public function postUpdateIncome() public function postUpdateIncome()
{ {
$range = Preferences::get('viewRange', '1M')->data; $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); $end = Navigation::endOfPeriod($start, $range);
$key = 'budgetIncomeTotal' . $start->format('Ymd') . $end->format('Ymd'); $key = 'budgetIncomeTotal' . $start->format('Ymd') . $end->format('Ymd');
@@ -323,7 +330,10 @@ class BudgetController extends Controller
public function updateIncome() public function updateIncome()
{ {
$range = Preferences::get('viewRange', '1M')->data; $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); $end = Navigation::endOfPeriod($start, $range);
$key = 'budgetIncomeTotal' . $start->format('Ymd') . $end->format('Ymd'); $key = 'budgetIncomeTotal' . $start->format('Ymd') . $end->format('Ymd');
$amount = Preferences::get($key, 1000); $amount = Preferences::get($key, 1000);

View File

@@ -133,7 +133,9 @@ class CategoryController extends Controller
*/ */
public function noCategory(CRI $repository) public function noCategory(CRI $repository)
{ {
/** @var Carbon $start */
$start = session('start', Carbon::now()->startOfMonth()); $start = session('start', Carbon::now()->startOfMonth());
/** @var Carbon $end */
$end = session('end', Carbon::now()->startOfMonth()); $end = session('end', Carbon::now()->startOfMonth());
$list = $repository->listNoCategory($start, $end); $list = $repository->listNoCategory($start, $end);
$subTitle = trans( $subTitle = trans(

View File

@@ -66,6 +66,8 @@ class ExportController extends Controller
} }
/** /**
* @param ExportJob $job
*
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */
public function getStatus(ExportJob $job) public function getStatus(ExportJob $job)
@@ -76,6 +78,8 @@ class ExportController extends Controller
/** /**
* @param ARI $repository * @param ARI $repository
* *
* @param EJRI $jobs
*
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/ */
public function index(ARI $repository, EJRI $jobs) public function index(ARI $repository, EJRI $jobs)
@@ -100,7 +104,10 @@ class ExportController extends Controller
* @param ExportFormRequest $request * @param ExportFormRequest $request
* @param ARI $repository * @param ARI $repository
* *
* @param EJRI $jobs
*
* @return string * @return string
* @throws \FireflyIII\Exceptions\FireflyException
*/ */
public function postIndex(ExportFormRequest $request, ARI $repository, EJRI $jobs) public function postIndex(ExportFormRequest $request, ARI $repository, EJRI $jobs)
{ {

View File

@@ -90,7 +90,9 @@ class HomeController extends Controller
$mainTitleIcon = 'fa-fire'; $mainTitleIcon = 'fa-fire';
$transactions = []; $transactions = [];
$frontPage = Preferences::get('frontPageAccounts', []); $frontPage = Preferences::get('frontPageAccounts', []);
/** @var Carbon $start */
$start = session('start', Carbon::now()->startOfMonth()); $start = session('start', Carbon::now()->startOfMonth());
/** @var Carbon $end */
$end = session('end', Carbon::now()->endOfMonth()); $end = session('end', Carbon::now()->endOfMonth());
$showTour = Preferences::get('tour', true)->data; $showTour = Preferences::get('tour', true)->data;
$accounts = $repository->getFrontpageAccounts($frontPage); $accounts = $repository->getFrontpageAccounts($frontPage);
@@ -105,11 +107,11 @@ class HomeController extends Controller
$sum = $repository->sumOfEverything(); $sum = $repository->sumOfEverything();
if ($sum != 0) { if (bccomp($sum, '0') !== 0) {
Session::flash( Session::flash(
'error', 'Your transactions are unbalanced. This means a' 'error', 'Your transactions are unbalanced. This means a'
. ' withdrawal, deposit or transfer was not stored properly. ' . ' 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 . ').'
); );
} }

View File

@@ -48,6 +48,7 @@ class PiggyBankController extends Controller
public function add(ARI $repository, PiggyBank $piggyBank) public function add(ARI $repository, PiggyBank $piggyBank)
{ {
bcscale(2); bcscale(2);
/** @var Carbon $date */
$date = session('end', Carbon::now()->endOfMonth()); $date = session('end', Carbon::now()->endOfMonth());
$leftOnAccount = $repository->leftOnAccount($piggyBank->account, $date); $leftOnAccount = $repository->leftOnAccount($piggyBank->account, $date);
$savedSoFar = $piggyBank->currentRelevantRep()->currentamount; $savedSoFar = $piggyBank->currentRelevantRep()->currentamount;
@@ -229,6 +230,7 @@ class PiggyBankController extends Controller
{ {
bcscale(2); bcscale(2);
$amount = round(Input::get('amount'), 2); $amount = round(Input::get('amount'), 2);
/** @var Carbon $date */
$date = session('end', Carbon::now()->endOfMonth()); $date = session('end', Carbon::now()->endOfMonth());
$leftOnAccount = $accounts->leftOnAccount($piggyBank->account, $date); $leftOnAccount = $accounts->leftOnAccount($piggyBank->account, $date);
$savedSoFar = $piggyBank->currentRelevantRep()->currentamount; $savedSoFar = $piggyBank->currentRelevantRep()->currentamount;

View File

@@ -52,6 +52,7 @@ class ReportController extends Controller
*/ */
public function index(ARI $repository) public function index(ARI $repository)
{ {
/** @var Carbon $start */
$start = session('first'); $start = session('first');
$months = $this->helper->listOfMonths($start); $months = $this->helper->listOfMonths($start);
$customFiscalYear = Preferences::get('customFiscalYear', 0)->data; $customFiscalYear = Preferences::get('customFiscalYear', 0)->data;

View File

@@ -696,11 +696,11 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
/** /**
* @param Budget $budget * @param Budget $budget
* @param Carbon $date * @param Carbon $date
* @param $amount * @param int $amount
* *
* @return BudgetLimit * @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: // there should be a budget limit for this startdate:
/** @var BudgetLimit $limit */ /** @var BudgetLimit $limit */

View File

@@ -253,10 +253,10 @@ interface BudgetRepositoryInterface
/** /**
* @param Budget $budget * @param Budget $budget
* @param Carbon $date * @param Carbon $date
* @param $amount * @param int $amount
* *
* @return mixed * @return mixed
*/ */
public function updateLimitAmount(Budget $budget, Carbon $date, $amount); public function updateLimitAmount(Budget $budget, Carbon $date, int $amount);
} }

View File

@@ -112,7 +112,7 @@ class Amount
/** /**
* @param string $symbol * @param string $symbol
* @param float $amount * @param float|string $amount
* @param bool $coloured * @param bool $coloured
* *
* @return string * @return string

View File

@@ -323,6 +323,7 @@ class TestData
} }
/** /**
* @param User $user
* @param Carbon $date * @param Carbon $date
* @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/ */
@@ -651,9 +652,10 @@ class TestData
} }
/** /**
* @param $description * @param User $user
* @param string $description
* @param Carbon $date * @param Carbon $date
* @param $amount * @param string $amount
* *
* @return TransactionJournal * @return TransactionJournal
*/ */
@@ -848,6 +850,7 @@ class TestData
} }
/** /**
* @param User $user
* @param Carbon $date * @param Carbon $date
* *
* @return TransactionJournal * @return TransactionJournal
@@ -985,7 +988,7 @@ class TestData
* @param Carbon $date * @param Carbon $date
* @param string $amount * @param string $amount
* *
* @return static * @return TransactionJournal|static
*/ */
public static function createWater(User $user, string $description, Carbon $date, string $amount): TransactionJournal public static function createWater(User $user, string $description, Carbon $date, string $amount): TransactionJournal
{ {

View File

@@ -1,7 +1,6 @@
<?php <?php
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
/** /**
* @SuppressWarnings(PHPMD.ShortMethodName) * @SuppressWarnings(PHPMD.ShortMethodName)
@@ -29,14 +28,16 @@ class CreateSessionTable extends Migration
*/ */
public function up() public function up()
{ {
Schema::create('sessions', function ($table) { Schema::create(
'sessions', function ($table) {
$table->string('id')->unique(); $table->string('id')->unique();
$table->integer('user_id')->nullable(); $table->integer('user_id')->nullable();
$table->string('ip_address', 45)->nullable(); $table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable(); $table->text('user_agent')->nullable();
$table->text('payload'); $table->text('payload');
$table->integer('last_activity'); $table->integer('last_activity');
}); }
);
} }
} }

View File

@@ -16,6 +16,8 @@ class AccountControllerTest extends TestCase
* @covers FireflyIII\Http\Controllers\AccountController::create * @covers FireflyIII\Http\Controllers\AccountController::create
* @covers FireflyIII\Http\Controllers\AccountController::__construct * @covers FireflyIII\Http\Controllers\AccountController::__construct
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testCreate($range) public function testCreate($range)
{ {
@@ -61,6 +63,8 @@ class AccountControllerTest extends TestCase
* @covers FireflyIII\Http\Controllers\AccountController::index * @covers FireflyIII\Http\Controllers\AccountController::index
* @covers FireflyIII\Http\Controllers\AccountController::isInArray * @covers FireflyIII\Http\Controllers\AccountController::isInArray
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testIndex($range) public function testIndex($range)
{ {
@@ -73,6 +77,8 @@ class AccountControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\AccountController::show * @covers FireflyIII\Http\Controllers\AccountController::show
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testShow($range) public function testShow($range)
{ {

View File

@@ -60,6 +60,8 @@ class BillControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BillController::index * @covers FireflyIII\Http\Controllers\BillController::index
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testIndex($range) public function testIndex($range)
{ {
@@ -72,6 +74,8 @@ class BillControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BillController::rescan * @covers FireflyIII\Http\Controllers\BillController::rescan
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testRescan($range) public function testRescan($range)
{ {
@@ -85,6 +89,8 @@ class BillControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BillController::show * @covers FireflyIII\Http\Controllers\BillController::show
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testShow($range) public function testShow($range)
{ {

View File

@@ -17,6 +17,8 @@ class BudgetControllerTest extends TestCase
* @covers FireflyIII\Http\Controllers\BudgetController::amount * @covers FireflyIII\Http\Controllers\BudgetController::amount
* @covers FireflyIII\Http\Controllers\BudgetController::__construct * @covers FireflyIII\Http\Controllers\BudgetController::__construct
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testAmount($range) public function testAmount($range)
{ {
@@ -76,6 +78,8 @@ class BudgetControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BudgetController::index * @covers FireflyIII\Http\Controllers\BudgetController::index
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testIndex($range) public function testIndex($range)
{ {
@@ -88,6 +92,8 @@ class BudgetControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BudgetController::noBudget * @covers FireflyIII\Http\Controllers\BudgetController::noBudget
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testNoBudget($range) public function testNoBudget($range)
{ {
@@ -100,6 +106,8 @@ class BudgetControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BudgetController::postUpdateIncome * @covers FireflyIII\Http\Controllers\BudgetController::postUpdateIncome
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testPostUpdateIncome($range) public function testPostUpdateIncome($range)
{ {
@@ -116,6 +124,8 @@ class BudgetControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BudgetController::show * @covers FireflyIII\Http\Controllers\BudgetController::show
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testShow($range) public function testShow($range)
{ {
@@ -165,6 +175,8 @@ class BudgetControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BudgetController::updateIncome * @covers FireflyIII\Http\Controllers\BudgetController::updateIncome
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testUpdateIncome($range) public function testUpdateIncome($range)
{ {

View File

@@ -63,6 +63,7 @@ class CategoryControllerTest extends TestCase
* @covers FireflyIII\Http\Controllers\CategoryController::index * @covers FireflyIII\Http\Controllers\CategoryController::index
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
* *
* @param $range
*/ */
public function testIndex($range) public function testIndex($range)
{ {
@@ -75,6 +76,8 @@ class CategoryControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\CategoryController::noCategory * @covers FireflyIII\Http\Controllers\CategoryController::noCategory
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testNoCategory($range) public function testNoCategory($range)
{ {
@@ -88,6 +91,8 @@ class CategoryControllerTest extends TestCase
* @covers FireflyIII\Http\Controllers\CategoryController::show * @covers FireflyIII\Http\Controllers\CategoryController::show
* @covers FireflyIII\Http\Controllers\Controller::getSumOfRange * @covers FireflyIII\Http\Controllers\Controller::getSumOfRange
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testShow($range) public function testShow($range)
{ {
@@ -101,6 +106,8 @@ class CategoryControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\CategoryController::showWithDate * @covers FireflyIII\Http\Controllers\CategoryController::showWithDate
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testShowWithDate($range) public function testShowWithDate($range)
{ {

View File

@@ -74,6 +74,8 @@ class CurrencyControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\CurrencyController::index * @covers FireflyIII\Http\Controllers\CurrencyController::index
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testIndex($range) public function testIndex($range)
{ {

View File

@@ -43,6 +43,8 @@ class HomeControllerTest extends TestCase
* @covers FireflyIII\Http\Controllers\HomeController::index * @covers FireflyIII\Http\Controllers\HomeController::index
* @covers FireflyIII\Http\Controllers\Controller::__construct * @covers FireflyIII\Http\Controllers\Controller::__construct
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testIndex($range) public function testIndex($range)
{ {

View File

@@ -29,6 +29,8 @@ class JsonControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\JsonController::boxBillsPaid * @covers FireflyIII\Http\Controllers\JsonController::boxBillsPaid
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testBoxBillsPaid($range) public function testBoxBillsPaid($range)
{ {
@@ -41,6 +43,8 @@ class JsonControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\JsonController::boxBillsUnpaid * @covers FireflyIII\Http\Controllers\JsonController::boxBillsUnpaid
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testBoxBillsUnpaid($range) public function testBoxBillsUnpaid($range)
{ {
@@ -53,6 +57,8 @@ class JsonControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\JsonController::boxIn * @covers FireflyIII\Http\Controllers\JsonController::boxIn
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testBoxIn($range) public function testBoxIn($range)
{ {
@@ -65,6 +71,8 @@ class JsonControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\JsonController::boxOut * @covers FireflyIII\Http\Controllers\JsonController::boxOut
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testBoxOut($range) public function testBoxOut($range)
{ {
@@ -77,6 +85,8 @@ class JsonControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\JsonController::categories * @covers FireflyIII\Http\Controllers\JsonController::categories
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testCategories($range) public function testCategories($range)
{ {
@@ -140,6 +150,8 @@ class JsonControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\JsonController::transactionJournals * @covers FireflyIII\Http\Controllers\JsonController::transactionJournals
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testTransactionJournals($range) public function testTransactionJournals($range)
{ {

View File

@@ -17,6 +17,8 @@ class PiggyBankControllerTest extends TestCase
* @covers FireflyIII\Http\Controllers\PiggyBankController::add * @covers FireflyIII\Http\Controllers\PiggyBankController::add
* @covers FireflyIII\Http\Controllers\PiggyBankController::__construct * @covers FireflyIII\Http\Controllers\PiggyBankController::__construct
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testAdd($range) public function testAdd($range)
{ {
@@ -71,6 +73,8 @@ class PiggyBankControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\PiggyBankController::index * @covers FireflyIII\Http\Controllers\PiggyBankController::index
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testIndex($range) public function testIndex($range)
{ {
@@ -138,6 +142,8 @@ class PiggyBankControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\PiggyBankController::show * @covers FireflyIII\Http\Controllers\PiggyBankController::show
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testShow($range) public function testShow($range)
{ {

View File

@@ -28,6 +28,8 @@ class PreferencesControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\PreferencesController::postIndex * @covers FireflyIII\Http\Controllers\PreferencesController::postIndex
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testPostIndex($range) public function testPostIndex($range)
{ {

View File

@@ -21,6 +21,8 @@ class ReportControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\ReportController::index * @covers FireflyIII\Http\Controllers\ReportController::index
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testIndex($range) public function testIndex($range)
{ {
@@ -36,6 +38,8 @@ class ReportControllerTest extends TestCase
* @covers FireflyIII\Http\Controllers\ReportController::report * @covers FireflyIII\Http\Controllers\ReportController::report
* @covers FireflyIII\Http\Controllers\ReportController::defaultMonth * @covers FireflyIII\Http\Controllers\ReportController::defaultMonth
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testReportDefaultMonth($range) public function testReportDefaultMonth($range)
{ {
@@ -57,6 +61,8 @@ class ReportControllerTest extends TestCase
* @covers FireflyIII\Http\Controllers\ReportController::report * @covers FireflyIII\Http\Controllers\ReportController::report
* @covers FireflyIII\Http\Controllers\ReportController::defaultYear * @covers FireflyIII\Http\Controllers\ReportController::defaultYear
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testReportDefaultYear($range) public function testReportDefaultYear($range)
{ {
@@ -70,6 +76,8 @@ class ReportControllerTest extends TestCase
* @covers FireflyIII\Http\Controllers\ReportController::report * @covers FireflyIII\Http\Controllers\ReportController::report
* @covers FireflyIII\Http\Controllers\ReportController::defaultMultiYear * @covers FireflyIII\Http\Controllers\ReportController::defaultMultiYear
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testReportDefaultMultiYear($range) public function testReportDefaultMultiYear($range)
{ {

View File

@@ -61,6 +61,8 @@ class TransactionControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\TransactionController::index * @covers FireflyIII\Http\Controllers\TransactionController::index
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testIndex($range) public function testIndex($range)
{ {
@@ -87,6 +89,8 @@ class TransactionControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\TransactionController::show * @covers FireflyIII\Http\Controllers\TransactionController::show
* @dataProvider dateRangeProvider * @dataProvider dateRangeProvider
*
* @param $range
*/ */
public function testShow($range) public function testShow($range)
{ {