Removed previous warning suppressions.

This commit is contained in:
James Cole 2014-12-19 21:18:42 +01:00
parent 30ac62ffb7
commit 1a0cbbdb31
45 changed files with 35 additions and 145 deletions

View File

@ -11,9 +11,6 @@ use FireflyIII\Shared\Preferences\PreferencesInterface as Pref;
* TODO Find out what constitutes proper camelCase * TODO Find out what constitutes proper camelCase
* TODO How is object coupling counted? * TODO How is object coupling counted?
* *
* @SuppressWarnings("CamelCase")
* @SuppressWarnings("TooManyMethods")
* @SuppressWarnings("CouplingBetweenObjects")
*/ */
class BudgetController extends BaseController class BudgetController extends BaseController
{ {

View File

@ -6,8 +6,6 @@ use FireflyIII\Exception\FireflyException;
* *
* TODO Find out what constitutes proper camelCase * TODO Find out what constitutes proper camelCase
* *
* @SuppressWarnings("CamelCase")
*
* Class CategoryController * Class CategoryController
*/ */
class CategoryController extends BaseController class CategoryController extends BaseController

View File

@ -3,8 +3,6 @@ use Carbon\Carbon;
use Grumpydictator\Gchart\GChart as GChart; use Grumpydictator\Gchart\GChart as GChart;
/** /**
* @SuppressWarnings("CamelCase")
*
* Class GoogleChartController * Class GoogleChartController
*/ */
class GoogleChartController extends BaseController class GoogleChartController extends BaseController
@ -33,7 +31,7 @@ class GoogleChartController extends BaseController
$this->_chart->addColumn('Day of month', 'date'); $this->_chart->addColumn('Day of month', 'date');
$this->_chart->addColumn('Balance for ' . $account->name, 'number'); $this->_chart->addColumn('Balance for ' . $account->name, 'number');
// TODO this can be combined in some method, it's // TODO this can be combined in some method, it's coming up quite often, is it?
$start = Session::get('start', Carbon::now()->startOfMonth()); $start = Session::get('start', Carbon::now()->startOfMonth());
$end = Session::get('end'); $end = Session::get('end');
$count = $account->transactions()->count(); $count = $account->transactions()->count();
@ -48,6 +46,7 @@ class GoogleChartController extends BaseController
$start = new Carbon($first->date); $start = new Carbon($first->date);
$end = new Carbon($last->date); $end = new Carbon($last->date);
} }
// todo until this part.
$current = clone $start; $current = clone $start;
@ -117,55 +116,31 @@ class GoogleChartController extends BaseController
$bdt = App::make('FireflyIII\Database\Budget\Budget'); $bdt = App::make('FireflyIII\Database\Budget\Budget');
$budgets = $bdt->get(); $budgets = $bdt->get();
/*
* Loop budgets:
*/
/** @var Budget $budget */ /** @var Budget $budget */
foreach ($budgets as $budget) { foreach ($budgets as $budget) {
/*
* Is there a repetition starting on this particular date? We can use that.
*/
/** @var \LimitRepetition $repetition */ /** @var \LimitRepetition $repetition */
$repetition = $bdt->repetitionOnStartingOnDate($budget, Session::get('start', Carbon::now()->startOfMonth())); $repetition = $bdt->repetitionOnStartingOnDate($budget, Session::get('start', Carbon::now()->startOfMonth()));
/*
* If there is, use it. Otherwise, forget it.
*/
if (is_null($repetition)) { if (is_null($repetition)) {
// use the session start and end for our search query // use the session start and end for our search query
$searchStart = Session::get('start', Carbon::now()->startOfMonth()); $searchStart = Session::get('start', Carbon::now()->startOfMonth());
$searchEnd = Session::get('end'); $searchEnd = Session::get('end');
// the limit is zero: $limit = 0; // the limit is zero:
$limit = 0;
} else { } else {
// use the limit's start and end for our search query // use the limit's start and end for our search query
$searchStart = $repetition->startdate; $searchStart = $repetition->startdate;
$searchEnd = $repetition->enddate; $searchEnd = $repetition->enddate;
// the limit is the repetitions limit: $limit = floatval($repetition->amount); // the limit is the repetitions limit:
$limit = floatval($repetition->amount);
} }
/*
* No matter the result of the search for the repetition, get all the transactions associated
* with the budget, and sum up the expenses made.
*/
$expenses = floatval($budget->transactionjournals()->before($searchEnd)->after($searchStart)->lessThan(0)->sum('amount')) * -1; $expenses = floatval($budget->transactionjournals()->before($searchEnd)->after($searchStart)->lessThan(0)->sum('amount')) * -1;
if ($expenses > 0) { if ($expenses > 0) {
$this->_chart->addRow($budget->name, $limit, $expenses); $this->_chart->addRow($budget->name, $limit, $expenses);
} }
} }
/*
* Finally, get all transactions WITHOUT a budget and add those as well.
* (yes this method is oddly specific).
*/
$noBudgetSet = $bdt->transactionsWithoutBudgetInDateRange(Session::get('start', Carbon::now()->startOfMonth()), Session::get('end')); $noBudgetSet = $bdt->transactionsWithoutBudgetInDateRange(Session::get('start', Carbon::now()->startOfMonth()), Session::get('end'));
$sum = $noBudgetSet->sum('amount') * -1; $sum = $noBudgetSet->sum('amount') * -1;
$this->_chart->addRow('No budget', 0, $sum); $this->_chart->addRow('No budget', 0, $sum);
$this->_chart->generate(); $this->_chart->generate();
return Response::json($this->_chart->getData()); return Response::json($this->_chart->getData());

View File

@ -27,7 +27,6 @@ class ProfileController extends BaseController
/** /**
* @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View * @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View
* @SuppressWarnings("CyclomaticComplexity")
*/ */
public function postChangePassword() public function postChangePassword()
{ {

View File

@ -5,8 +5,6 @@ use FireflyIII\Database\TransactionJournal\TransactionJournal as TransactionJour
use FireflyIII\Report\ReportInterface as Report; use FireflyIII\Report\ReportInterface as Report;
/** /**
* @SuppressWarnings("CamelCase")
*
* *
* Class ReportController * Class ReportController
*/ */
@ -52,9 +50,6 @@ class ReportController extends BaseController
* @param $year * @param $year
* @param $month * @param $month
* *
* @SuppressWarnings("CyclomaticComplexity")
* @SuppressWarnings("MethodLength")
*
* @return \Illuminate\View\View * @return \Illuminate\View\View
*/ */
public function unbalanced($year, $month) public function unbalanced($year, $month)

View File

@ -5,8 +5,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateUsersTable * Class CreateUsersTable
*
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateUsersTable extends Migration class CreateUsersTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateAccountTypesTable * Class CreateAccountTypesTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateAccountTypesTable extends Migration class CreateAccountTypesTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateAccountsTable * Class CreateAccountsTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateAccountsTable extends Migration class CreateAccountsTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateComponentsTable * Class CreateComponentsTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateComponentsTable extends Migration class CreateComponentsTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreatePiggybanksTable * Class CreatePiggybanksTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreatePiggybanksTable extends Migration class CreatePiggybanksTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateTransactionCurrenciesTable * Class CreateTransactionCurrenciesTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateTransactionCurrenciesTable extends Migration class CreateTransactionCurrenciesTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateTransactionTypesTable * Class CreateTransactionTypesTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateTransactionTypesTable extends Migration class CreateTransactionTypesTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateRecurringTransactionsTable * Class CreateRecurringTransactionsTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateRecurringTransactionsTable extends Migration class CreateRecurringTransactionsTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateTransactionJournalsTable * Class CreateTransactionJournalsTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateTransactionJournalsTable extends Migration class CreateTransactionJournalsTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateTransactionsTable * Class CreateTransactionsTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateTransactionsTable extends Migration class CreateTransactionsTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateComponentTransactionTable * Class CreateComponentTransactionTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateComponentTransactionTable extends Migration class CreateComponentTransactionTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateComponentTransactionJournalTable * Class CreateComponentTransactionJournalTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateComponentTransactionJournalTable extends Migration class CreateComponentTransactionJournalTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreatePreferencesTable * Class CreatePreferencesTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreatePreferencesTable extends Migration class CreatePreferencesTable extends Migration
{ {

View File

@ -5,7 +5,6 @@ use Illuminate\Database\Migrations\Migration;
/** /**
* Class CreateSessionTable * Class CreateSessionTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateSessionTable extends Migration class CreateSessionTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateLimitsTable * Class CreateLimitsTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateLimitsTable extends Migration class CreateLimitsTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateLimitRepeatTable * Class CreateLimitRepeatTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateLimitRepeatTable extends Migration class CreateLimitRepeatTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateComponentRecurringTransactionTable * Class CreateComponentRecurringTransactionTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateComponentRecurringTransactionTable extends Migration class CreateComponentRecurringTransactionTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreatePiggyInstance * Class CreatePiggyInstance
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreatePiggybankRepetitionsTable extends Migration class CreatePiggybankRepetitionsTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreatePiggybankEventsTable * Class CreatePiggybankEventsTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreatePiggybankEventsTable extends Migration class CreatePiggybankEventsTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateRemindersTable * Class CreateRemindersTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateRemindersTable extends Migration class CreateRemindersTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateAccountMetaTable * Class CreateAccountMetaTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateAccountMetaTable extends Migration class CreateAccountMetaTable extends Migration
{ {

View File

@ -6,7 +6,6 @@ use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateTransactionGroupsTable * Class CreateTransactionGroupsTable
* *
* @SuppressWarnings(PHPMD.ShortMethodName)
*/ */
class CreateTransactionGroupsTable extends Migration class CreateTransactionGroupsTable extends Migration
{ {

View File

@ -4,7 +4,6 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* SuppressWarnings(PHPMD.ShortMethodName)
* Down: * Down:
* 1. Create new Components based on Budgets. * 1. Create new Components based on Budgets.
* 2. Create new Components based on Categories * 2. Create new Components based on Categories

View File

@ -459,13 +459,13 @@ class Account implements CUD, CommonDatabaseCalls, AccountInterface
/** /**
* Returns an object with id $id. * Returns an object with id $id.
* *
* @param int $id * @param int $objectId
* *
* @return \Eloquent * @return \Eloquent
*/ */
public function find($id) public function find($objectId)
{ {
return $this->getUser()->accounts()->find($id); return $this->getUser()->accounts()->find($objectId);
} }
/** /**

View File

@ -71,12 +71,12 @@ class AccountType implements CUD, CommonDatabaseCalls
/** /**
* Returns an object with id $id. * Returns an object with id $id.
* *
* @param int $id * @param int $objectId
* *
* @return \Eloquent * @return \Eloquent
* @throws NotImplementedException * @throws NotImplementedException
*/ */
public function find($id) public function find($objectId)
{ {
// TODO: Implement find() method. // TODO: Implement find() method.
throw new NotImplementedException; throw new NotImplementedException;

View File

@ -100,13 +100,13 @@ class Budget implements CUD, CommonDatabaseCalls, BudgetInterface
/** /**
* Returns an object with id $id. * Returns an object with id $id.
* *
* @param int $id * @param int $objectId
* *
* @return \Eloquent * @return \Eloquent
*/ */
public function find($id) public function find($objectId)
{ {
return $this->getUser()->budgets()->find($id); return $this->getUser()->budgets()->find($objectId);
} }
/** /**

View File

@ -107,12 +107,12 @@ class Category implements CUD, CommonDatabaseCalls
/** /**
* Returns an object with id $id. * Returns an object with id $id.
* *
* @param int $id * @param int $objectId
* *
* @return \Eloquent * @return \Eloquent
* @throws NotImplementedException * @throws NotImplementedException
*/ */
public function find($id) public function find($objectId)
{ {
// TODO: Implement find() method. // TODO: Implement find() method.
throw new NotImplementedException; throw new NotImplementedException;

View File

@ -16,11 +16,11 @@ interface CommonDatabaseCalls
/** /**
* Returns an object with id $id. * Returns an object with id $id.
* *
* @param int $id * @param int $objectId
* *
* @return \Eloquent * @return \Eloquent
*/ */
public function find($id); public function find($objectId);
/** /**
* Finds an account type using one of the "$what"'s: expense, asset, revenue, opening, etc. * Finds an account type using one of the "$what"'s: expense, asset, revenue, opening, etc.
@ -39,10 +39,10 @@ interface CommonDatabaseCalls
public function get(); public function get();
/** /**
* @param array $ids * @param array $objectIds
* *
* @return Collection * @return Collection
*/ */
public function getByIds(array $ids); public function getByIds(array $objectIds);
} }

View File

@ -89,10 +89,6 @@ class PiggyBank implements CUD, CommonDatabaseCalls, PiggyBankInterface
* *
* Ignore PHPMD rules because Laravel 5.0 will make this method superfluous anyway. * Ignore PHPMD rules because Laravel 5.0 will make this method superfluous anyway.
* *
* @SuppressWarnings("Cyclomatic")
* @SuppressWarnings("NPath")
* @SuppressWarnings("MethodLength")
*
* @param array $model * @param array $model
* *
* @return array * @return array
@ -175,14 +171,14 @@ class PiggyBank implements CUD, CommonDatabaseCalls, PiggyBankInterface
/** /**
* Returns an object with id $id. * Returns an object with id $id.
* *
* @param int $id * @param int $objectId
* *
* @return \Eloquent * @return \Eloquent
*/ */
public function find($id) public function find($objectId)
{ {
return \Piggybank:: return \Piggybank::
leftJoin('accounts', 'accounts.id', '=', 'piggybanks.account_id')->where('piggybanks.id', '=', $id)->where('accounts.user_id', $this->getUser()->id) leftJoin('accounts', 'accounts.id', '=', 'piggybanks.account_id')->where('piggybanks.id', '=', $objectId)->where('accounts.user_id', $this->getUser()->id)
->first(['piggybanks.*']); ->first(['piggybanks.*']);
} }
@ -246,6 +242,7 @@ class PiggyBank implements CUD, CommonDatabaseCalls, PiggyBankInterface
if ($date >= $rep->startdate && $date <= $rep->targetdate) { if ($date >= $rep->startdate && $date <= $rep->targetdate) {
return $rep; return $rep;
} }
return null;
} }
); );
if ($repetitions->count() == 0) { if ($repetitions->count() == 0) {

View File

@ -153,9 +153,6 @@ class RepeatedExpense implements CUD, CommonDatabaseCalls, PiggyBankInterface
* *
* *
* ignored because this method will be gone soon. * ignored because this method will be gone soon.
* @SuppressWarnings("Cyclomatic")
* @SuppressWarnings("NPath")
* @SuppressWarnings("MethodLength")
* *
* @param array $model * @param array $model
* *
@ -250,12 +247,12 @@ class RepeatedExpense implements CUD, CommonDatabaseCalls, PiggyBankInterface
/** /**
* Returns an object with id $id. * Returns an object with id $id.
* *
* @param int $id * @param int $objectId
* *
* @return \Eloquent * @return \Eloquent
* @throws NotImplementedException * @throws NotImplementedException
*/ */
public function find($id) public function find($objectId)
{ {
// TODO: Implement find() method. // TODO: Implement find() method.
throw new NotImplementedException; throw new NotImplementedException;

View File

@ -103,9 +103,6 @@ class RecurringTransaction implements CUD, CommonDatabaseCalls, RecurringTransac
* errors/warnings/successes. * errors/warnings/successes.
* *
* ignored because this method will be gone soon. * ignored because this method will be gone soon.
* @SuppressWarnings("Cyclomatic")
* @SuppressWarnings("NPath")
* @SuppressWarnings("MethodLength")
* *
* @param array $model * @param array $model
* *
@ -169,12 +166,12 @@ class RecurringTransaction implements CUD, CommonDatabaseCalls, RecurringTransac
/** /**
* Returns an object with id $id. * Returns an object with id $id.
* *
* @param int $id * @param int $objectId
* *
* @return \Eloquent * @return \Eloquent
* @throws NotImplementedException * @throws NotImplementedException
*/ */
public function find($id) public function find($objectId)
{ {
// TODO: Implement find() method. // TODO: Implement find() method.
throw new NotImplementedException; throw new NotImplementedException;

View File

@ -96,12 +96,12 @@ class Transaction implements CUD, CommonDatabaseCalls
/** /**
* Returns an object with id $id. * Returns an object with id $id.
* *
* @param int $id * @param int $objectId
* *
* @return \Eloquent * @return \Eloquent
* @throws NotImplementedException * @throws NotImplementedException
*/ */
public function find($id) public function find($objectId)
{ {
// TODO: Implement find() method. // TODO: Implement find() method.
throw new NotImplementedException; throw new NotImplementedException;

View File

@ -108,7 +108,6 @@ class TransactionJournal implements TransactionJournalInterface, CUD, CommonData
$this->storeCategory($data, $model); $this->storeCategory($data, $model);
/* /*
* TODO move to transaction thing.
* Now we can update the transactions related to this journal. * Now we can update the transactions related to this journal.
*/ */
$amount = floatval($data['amount']); $amount = floatval($data['amount']);
@ -136,9 +135,6 @@ class TransactionJournal implements TransactionJournalInterface, CUD, CommonData
* errors/warnings/successes. * errors/warnings/successes.
* *
* ignored because this method will be gone soon. * ignored because this method will be gone soon.
* @SuppressWarnings("Cyclomatic")
* @SuppressWarnings("NPath")
* @SuppressWarnings("MethodLength")
* *
* @param array $model * @param array $model
* *
@ -256,27 +252,6 @@ class TransactionJournal implements TransactionJournalInterface, CUD, CommonData
break; break;
} }
// if (isset($model['to_id']) && intval($model['to_id']) < 1) {
// $errors->add('account_to', 'Invalid to-account');
// }
//
// if (isset($model['from_id']) && intval($model['from_id']) < 1) {
// $errors->add('account_from', 'Invalid from-account');
//
// }
// if (isset($model['account_id']) && intval($model['account_id']) < 1) {
// $errors->add('account_id', 'Invalid account!');
// }
// if (isset($model['to']) && !($model['to'] instanceof \Account)) {
// $errors->add('account_to', 'Invalid to-account');
// }
// if (isset($model['from']) && !($model['from'] instanceof \Account)) {
// $errors->add('account_from', 'Invalid from-account');
// }
// if (!isset($model['amount']) || (isset($model['amount']) && floatval($model['amount']) < 0)) {
// $errors->add('amount', 'Invalid amount');
// }
$validator = \Validator::make([$model], \TransactionJournal::$rules); $validator = \Validator::make([$model], \TransactionJournal::$rules);
if ($validator->invalid()) { if ($validator->invalid()) {
@ -419,13 +394,13 @@ class TransactionJournal implements TransactionJournalInterface, CUD, CommonData
/** /**
* Returns an object with id $id. * Returns an object with id $id.
* *
* @param int $id * @param int $objectId
* *
* @return \Eloquent * @return \Eloquent
*/ */
public function find($id) public function find($objectId)
{ {
return $this->getUser()->transactionjournals()->find($id); return $this->getUser()->transactionjournals()->find($objectId);
} }
/** /**

View File

@ -73,12 +73,12 @@ class TransactionType implements CUD, CommonDatabaseCalls
/** /**
* Returns an object with id $id. * Returns an object with id $id.
* *
* @param int $id * @param int $objectId
* *
* @return \Eloquent * @return \Eloquent
* @throws NotImplementedException * @throws NotImplementedException
*/ */
public function find($id) public function find($objectId)
{ {
// TODO: Implement find() method. // TODO: Implement find() method.
throw new NotImplementedException; throw new NotImplementedException;

View File

@ -12,7 +12,6 @@ use Illuminate\Support\Collection;
/** /**
* Class Report * Class Report
* *
* @SuppressWarnings("CamelCase")
* *
* @package FireflyIII\Report * @package FireflyIII\Report
*/ */

View File

@ -9,7 +9,6 @@ use FireflyIII\Exception\FireflyException;
* Class Date * Class Date
* *
* @package FireflyIII\Shared\Toolkit * @package FireflyIII\Shared\Toolkit
* @SuppressWarnings("ExcessiveClassComplexity")
*/ */
class Date class Date
{ {
@ -17,7 +16,6 @@ class Date
* @param Carbon $theDate * @param Carbon $theDate
* @param $repeatFreq * @param $repeatFreq
* @param $skip * @param $skip
* @SuppressWarnings("Cyclomatic")
* *
* @return Carbon * @return Carbon
* @throws FireflyException * @throws FireflyException
@ -63,7 +61,6 @@ class Date
/** /**
* @param Carbon $theCurrentEnd * @param Carbon $theCurrentEnd
* @param $repeatFreq * @param $repeatFreq
* @SuppressWarnings("Cyclomatic")
* *
* @return mixed * @return mixed
* @throws FireflyException * @throws FireflyException
@ -106,8 +103,6 @@ class Date
* @param Carbon $theCurrentEnd * @param Carbon $theCurrentEnd
* @param $repeatFreq * @param $repeatFreq
* @param Carbon $maxDate * @param Carbon $maxDate
* @SuppressWarnings("Cyclomatic")
* @SuppressWarnings("MethodLength")
* *
* @return mixed * @return mixed
* @throws FireflyException * @throws FireflyException
@ -156,7 +151,6 @@ class Date
/** /**
* @param Carbon $date * @param Carbon $date
* @param $repeatFrequency * @param $repeatFrequency
* @SuppressWarnings("Cyclomatic")
* *
* @return string * @return string
* @throws FireflyException * @throws FireflyException
@ -191,7 +185,6 @@ class Date
/** /**
* @param Carbon $theDate * @param Carbon $theDate
* @param $repeatFreq * @param $repeatFreq
* @SuppressWarnings("Cyclomatic")
* *
* @return Carbon * @return Carbon
* @throws FireflyException * @throws FireflyException
@ -238,7 +231,6 @@ class Date
* @param Carbon $theDate * @param Carbon $theDate
* @param $repeatFreq * @param $repeatFreq
* @param int $subtract * @param int $subtract
* @SuppressWarnings("Cyclomatic")
* *
* @return Carbon * @return Carbon
* @throws FireflyException * @throws FireflyException

View File

@ -63,7 +63,6 @@ class Filter
/** /**
* @param $range * @param $range
* @param Carbon $start * @param Carbon $start
* @SuppressWarnings("Cyclomatic")
* *
* @return Carbon * @return Carbon
* @throws FireflyException * @throws FireflyException
@ -189,7 +188,6 @@ class Filter
/** /**
* @param $range * @param $range
* @param Carbon $date * @param Carbon $date
* @SuppressWarnings("CyclomaticComplexity")
* *
* @return Carbon * @return Carbon
* @throws FireflyException * @throws FireflyException

View File

@ -16,7 +16,6 @@ class Form
* *
* @param Collection $set * @param Collection $set
* @param bool $addEmpty * @param bool $addEmpty
* @SuppressWarnings("CyclomaticComplexity")
* *
* @return mixed * @return mixed
*/ */

View File

@ -1,7 +1,4 @@
<?php <?php
use Carbon\Carbon;
use FireflyIII\Shared\SingleTableInheritanceEntity;
use Illuminate\Database\Eloquent\SoftDeletingTrait;
use Watson\Validating\ValidatingTrait; use Watson\Validating\ValidatingTrait;
/** /**

View File

@ -21,9 +21,8 @@ if (!function_exists('mf')) {
if ($amount > 0) { if ($amount > 0) {
return '<span class="text-success">&#8364; ' . $string . '</span>'; return '<span class="text-success">&#8364; ' . $string . '</span>';
} }
if ($amount < 0) {
return '<span class="text-danger">&#8364; ' . $string . '</span>'; return '<span class="text-danger">&#8364; ' . $string . '</span>';
}
} }
return '&#8364; ' . $string; return '&#8364; ' . $string;