Cleanup, mostly I removed the coding standard ignore instructions.

This commit is contained in:
James Cole
2014-12-20 22:07:21 +01:00
parent 073fd5aa0d
commit 2072607889
13 changed files with 102 additions and 169 deletions

View File

@@ -7,9 +7,10 @@ use FireflyIII\Shared\Preferences\PreferencesInterface as Pref;
/** /**
* Class BudgetController * Class BudgetController
* *
* TODO move AJAX methods to their own BudgetAjaxController * @SuppressWarnings("CamelCase") // I'm fine with this.
* TODO Find out what constitutes proper camelCase * @SuppressWarnings("TooManyMethods") // I'm also fine with this.
* TODO How is object coupling counted? * @SuppressWarnings("CyclomaticComplexity") // It's all 5. So ok.
* @SuppressWarnings("CouplingBetweenObjects") // There's only so much I can remove.
* *
*/ */
class BudgetController extends BaseController class BudgetController extends BaseController
@@ -98,6 +99,7 @@ class BudgetController extends BaseController
/** /**
* The index of the budget controller contains all budgets and the current relevant limit repetition. * The index of the budget controller contains all budgets and the current relevant limit repetition.
* TODO move currentRep to the repository.
* *
* @return $this * @return $this
*/ */
@@ -108,14 +110,8 @@ class BudgetController extends BaseController
// loop the budgets: // loop the budgets:
$budgets->each( $budgets->each(
function (Budget $budget) { function (Budget $budget) {
/** @noinspection PhpUndefinedFieldInspection */ $budget->spent = $this->_repository->spentInMonth($budget, \Session::get('start', Carbon::now()->startOfMonth()));
$budget->spent = $this->_repository->spentInMonth($budget, \Session::get('start', Carbon::now()->startOfMonth())); $budget->currentRep = $this->_repository->getRepetitionByDate($budget, \Session::get('start', Carbon::now()->startOfMonth()));
/** @noinspection PhpUndefinedFieldInspection */
$budget->currentRep = $budget->limitrepetitions()->where(
'limit_repetitions.startdate', \Session::get('start', Carbon::now()->startOfMonth())->format('Y-m-d')
)->first(
['limit_repetitions.*']
);
} }
); );

View File

@@ -4,7 +4,8 @@ use FireflyIII\Exception\FireflyException;
/** /**
* *
* TODO Find out what constitutes proper camelCase * @SuppressWarnings("CamelCase") // I'm fine with this.
* @SuppressWarnings("CyclomaticComplexity") // It's all 5. So ok.
* *
* Class CategoryController * Class CategoryController
*/ */

View File

@@ -1,6 +1,7 @@
<?php <?php
use Carbon\Carbon; use Carbon\Carbon;
use Grumpydictator\Gchart\GChart as GChart; use Grumpydictator\Gchart\GChart as GChart;
use Illuminate\Database\Query\JoinClause;
/** /**
* Class GoogleChartController * Class GoogleChartController
@@ -51,7 +52,7 @@ class GoogleChartController extends BaseController
$current = clone $start; $current = clone $start;
while ($end >= $current) { while ($end >= $current) {
$this->_chart->addRow(clone $current, $current > Carbon::now() ? null : Steam::balance($account, $current)); $this->_chart->addRow(clone $current, Steam::balance($account, $current));
$current->addDay(); $current->addDay();
} }
@@ -85,7 +86,7 @@ class GoogleChartController extends BaseController
$this->_chart->addColumn('Balance for ' . $account->name, 'number'); $this->_chart->addColumn('Balance for ' . $account->name, 'number');
} }
$start = Session::get('start', Carbon::now()->startOfMonth()); $start = Session::get('start', Carbon::now()->startOfMonth());
$end = Session::get('end'); $end = Session::get('end', Carbon::now()->endOfMonth());
$current = clone $start; $current = clone $start;
while ($end >= $current) { while ($end >= $current) {
@@ -151,44 +152,35 @@ class GoogleChartController extends BaseController
*/ */
public function allCategoriesHomeChart() public function allCategoriesHomeChart()
{ {
$data = []; $this->_chart->addColumn('Category', 'string');
$this->_chart->addColumn('Spent', 'number');
/** @var \Grumpydictator\Gchart\GChart $chart */ // query!
$chart = App::make('gchart'); $set = \TransactionJournal::leftJoin(
$chart->addColumn('Category', 'string'); 'transactions',
$chart->addColumn('Spent', 'number'); function (JoinClause $join) {
$join->on('transaction_journals.id', '=', 'transactions.transaction_journal_id')->where('amount', '>', 0);
/** @var \FireflyIII\Database\TransactionJournal\TransactionJournal $tj */
$tj = App::make('FireflyIII\Database\TransactionJournal\TransactionJournal');
/*
* Get the journals:
*/
$journals = $tj->getInDateRange(Session::get('start', Carbon::now()->startOfMonth()), Session::get('end'));
/** @var \TransactionJournal $journal */
foreach ($journals as $journal) {
if ($journal->transactionType->type == 'Withdrawal') {
$amount = $journal->getAmount();
$category = $journal->categories()->first();
if (!is_null($category)) {
if (isset($data[$category->name])) {
$data[$category->name] += $amount;
} else {
$data[$category->name] = $amount;
}
}
} }
} )
arsort($data); ->leftJoin(
foreach ($data as $key => $entry) { 'category_transaction_journal', 'category_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id'
$chart->addRow($key, $entry); )
->leftJoin('categories', 'categories.id', '=', 'category_transaction_journal.category_id')
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
->before(Session::get('end', Carbon::now()->endOfMonth()))
->after(Session::get('start', Carbon::now()->startOfMonth()))
->where('transaction_types.type', 'Withdrawal')
->groupBy('categories.id')
->orderBy('sum', 'DESC')
->get(['categories.id', 'categories.name', DB::Raw('SUM(`transactions`.`amount`) AS `sum`')]);
foreach ($set as $entry) {
$entry->name = strlen($entry->name) == 0 ? '(no category)' : $entry->name;
$this->_chart->addRow($entry->name, floatval($entry->sum));
} }
$this->_chart->generate();
$chart->generate(); return Response::json($this->_chart->getData());
return Response::json($chart->getData());
} }
@@ -203,10 +195,8 @@ class GoogleChartController extends BaseController
$start = clone $repetition->startdate; $start = clone $repetition->startdate;
$end = $repetition->enddate; $end = $repetition->enddate;
/** @var \Grumpydictator\Gchart\GChart $chart */ $this->_chart->addColumn('Day', 'date');
$chart = App::make('gchart'); $this->_chart->addColumn('Left', 'number');
$chart->addColumn('Day', 'date');
$chart->addColumn('Left', 'number');
$amount = $repetition->amount; $amount = $repetition->amount;
@@ -217,12 +207,12 @@ class GoogleChartController extends BaseController
*/ */
$sum = floatval($budget->transactionjournals()->lessThan(0)->transactionTypes(['Withdrawal'])->onDate($start)->sum('amount')); $sum = floatval($budget->transactionjournals()->lessThan(0)->transactionTypes(['Withdrawal'])->onDate($start)->sum('amount'));
$amount += $sum; $amount += $sum;
$chart->addRow(clone $start, $amount); $this->_chart->addRow(clone $start, $amount);
$start->addDay(); $start->addDay();
} }
$chart->generate(); $this->_chart->generate();
return Response::json($chart->getData()); return Response::json($this->_chart->getData());
} }
@@ -243,16 +233,13 @@ class GoogleChartController extends BaseController
/** @var \FireflyIII\Database\Budget\Budget $repos */ /** @var \FireflyIII\Database\Budget\Budget $repos */
$repos = App::make('FireflyIII\Database\Budget\Budget'); $repos = App::make('FireflyIII\Database\Budget\Budget');
/** @var \Grumpydictator\Gchart\GChart $chart */ $this->_chart->addColumn('Month', 'date');
$chart = App::make('gchart'); $this->_chart->addColumn('Budgeted', 'number');
$chart->addColumn('Month', 'date'); $this->_chart->addColumn('Spent', 'number');
$chart->addColumn('Budgeted', 'number');
$chart->addColumn('Spent', 'number');
$end = clone $start; $end = clone $start;
$end->endOfYear(); $end->endOfYear();
while ($start <= $end) { while ($start <= $end) {
$spent = $repos->spentInMonth($component, $start); $spent = $repos->spentInMonth($component, $start);
$repetition = $repos->repetitionOnStartingOnDate($component, $start); $repetition = $repos->repetitionOnStartingOnDate($component, $start);
if ($repetition) { if ($repetition) {
@@ -261,15 +248,15 @@ class GoogleChartController extends BaseController
$budgeted = null; $budgeted = null;
} }
$chart->addRow(clone $start, $budgeted, $spent); $this->_chart->addRow(clone $start, $budgeted, $spent);
$start->addMonth(); $start->addMonth();
} }
$chart->generate(); $this->_chart->generate();
return Response::json($chart->getData()); return Response::json($this->_chart->getData());
} }
@@ -291,11 +278,9 @@ class GoogleChartController extends BaseController
/** @var \FireflyIII\Database\Category\Category $repos */ /** @var \FireflyIII\Database\Category\Category $repos */
$repos = App::make('FireflyIII\Database\Category\Category'); $repos = App::make('FireflyIII\Database\Category\Category');
/** @var \Grumpydictator\Gchart\GChart $chart */ $this->_chart->addColumn('Month', 'date');
$chart = App::make('gchart'); $this->_chart->addColumn('Budgeted', 'number');
$chart->addColumn('Month', 'date'); $this->_chart->addColumn('Spent', 'number');
$chart->addColumn('Budgeted', 'number');
$chart->addColumn('Spent', 'number');
$end = clone $start; $end = clone $start;
$end->endOfYear(); $end->endOfYear();
@@ -304,15 +289,15 @@ class GoogleChartController extends BaseController
$spent = $repos->spentInMonth($component, $start); $spent = $repos->spentInMonth($component, $start);
$budgeted = null; $budgeted = null;
$chart->addRow(clone $start, $budgeted, $spent); $this->_chart->addRow(clone $start, $budgeted, $spent);
$start->addMonth(); $start->addMonth();
} }
$chart->generate(); $this->_chart->generate();
return Response::json($chart->getData()); return Response::json($this->_chart->getData());
} }
@@ -324,20 +309,18 @@ class GoogleChartController extends BaseController
*/ */
public function piggyBankHistory(\Piggybank $piggybank) public function piggyBankHistory(\Piggybank $piggybank)
{ {
/** @var \Grumpydictator\Gchart\GChart $chart */ $this->_chart->addColumn('Date', 'date');
$chart = App::make('gchart'); $this->_chart->addColumn('Balance', 'number');
$chart->addColumn('Date', 'date');
$chart->addColumn('Balance', 'number');
$set = \DB::table('piggy_bank_events')->where('piggybank_id', $piggybank->id)->groupBy('date')->get(['date', DB::Raw('SUM(`amount`) AS `sum`')]); $set = \DB::table('piggy_bank_events')->where('piggybank_id', $piggybank->id)->groupBy('date')->get(['date', DB::Raw('SUM(`amount`) AS `sum`')]);
foreach ($set as $entry) { foreach ($set as $entry) {
$chart->addRow(new Carbon($entry->date), floatval($entry->sum)); $this->_chart->addRow(new Carbon($entry->date), floatval($entry->sum));
} }
$chart->generate(); $this->_chart->generate();
return Response::json($chart->getData()); return Response::json($this->_chart->getData());
} }
@@ -349,12 +332,10 @@ class GoogleChartController extends BaseController
public function recurringOverview(RecurringTransaction $recurring) public function recurringOverview(RecurringTransaction $recurring)
{ {
/** @var \Grumpydictator\Gchart\GChart $chart */ $this->_chart->addColumn('Date', 'date');
$chart = App::make('gchart'); $this->_chart->addColumn('Max amount', 'number');
$chart->addColumn('Date', 'date'); $this->_chart->addColumn('Min amount', 'number');
$chart->addColumn('Max amount', 'number'); $this->_chart->addColumn('Current entry', 'number');
$chart->addColumn('Min amount', 'number');
$chart->addColumn('Current entry', 'number');
// get first transaction or today for start: // get first transaction or today for start:
$first = $recurring->transactionjournals()->orderBy('date', 'ASC')->first(); $first = $recurring->transactionjournals()->orderBy('date', 'ASC')->first();
@@ -372,13 +353,13 @@ class GoogleChartController extends BaseController
$amount = 0; $amount = 0;
} }
unset($result); unset($result);
$chart->addRow(clone $start, $recurring->amount_max, $recurring->amount_min, $amount); $this->_chart->addRow(clone $start, $recurring->amount_max, $recurring->amount_min, $amount);
$start = DateKit::addPeriod($start, $recurring->repeat_freq, 0); $start = DateKit::addPeriod($start, $recurring->repeat_freq, 0);
} }
$chart->generate(); $this->_chart->generate();
return Response::json($chart->getData()); return Response::json($this->_chart->getData());
} }
@@ -388,53 +369,24 @@ class GoogleChartController extends BaseController
*/ */
public function recurringTransactionsOverview() public function recurringTransactionsOverview()
{ {
/*
* Set of paid transaction journals.
* Set of unpaid recurring transactions.
*/
$paid = ['items' => [], 'amount' => 0]; $paid = ['items' => [], 'amount' => 0];
$unpaid = ['items' => [], 'amount' => 0]; $unpaid = ['items' => [], 'amount' => 0];
$this->_chart->addColumn('Name', 'string');
/** @var \Grumpydictator\Gchart\GChart $chart */ $this->_chart->addColumn('Amount', 'number');
$chart = App::make('gchart');
$chart->addColumn('Name', 'string');
$chart->addColumn('Amount', 'number');
/** @var \FireflyIII\Database\RecurringTransaction\RecurringTransaction $rcr */ /** @var \FireflyIII\Database\RecurringTransaction\RecurringTransaction $rcr */
$rcr = App::make('FireflyIII\Database\RecurringTransaction\RecurringTransaction'); $rcr = App::make('FireflyIII\Database\RecurringTransaction\RecurringTransaction');
$recurring = $rcr->getActive(); $recurring = $rcr->getActive();
/** @var \RecurringTransaction $entry */ /** @var \RecurringTransaction $entry */
foreach ($recurring as $entry) { foreach ($recurring as $entry) {
/* $start = clone $entry->date;
* Start another loop starting at the $date. $end = Carbon::now();
*/
$start = clone $entry->date;
$end = Carbon::now();
/*
* The jump we make depends on the $repeat_freq
*/
$current = clone $start; $current = clone $start;
while ($current <= $end) { while ($current <= $end) {
/*
* Get end of period for $current:
*/
$currentEnd = DateKit::endOfPeriod($current, $entry->repeat_freq); $currentEnd = DateKit::endOfPeriod($current, $entry->repeat_freq);
if (\Session::get('end', Carbon::now()->end§OfMonth()) >= $current and $currentEnd >= \Session::get('start', Carbon::now()->startOfMonth())) {
/*
* In the current session range?
*/
if (\Session::get('end') >= $current and $currentEnd >= \Session::get('start', Carbon::now()->startOfMonth())) {
/*
* Lets see if we've already spent money on this recurring transaction (it hath recurred).
*/
/** @var TransactionJournal $set */ /** @var TransactionJournal $set */
$journal = $rcr->getJournalForRecurringInRange($entry, $current, $currentEnd); $journal = $rcr->getJournalForRecurringInRange($entry, $current, $currentEnd);
if (is_null($journal)) { if (is_null($journal)) {
$unpaid['items'][] = $entry->name; $unpaid['items'][] = $entry->name;
$unpaid['amount'] += (($entry->amount_max + $entry->amount_min) / 2); $unpaid['amount'] += (($entry->amount_max + $entry->amount_min) / 2);
@@ -444,23 +396,15 @@ class GoogleChartController extends BaseController
$paid['amount'] += $amount; $paid['amount'] += $amount;
} }
} }
/*
* Add some time for the next loop!
*/
$current = DateKit::addPeriod($current, $entry->repeat_freq, intval($entry->skip)); $current = DateKit::addPeriod($current, $entry->repeat_freq, intval($entry->skip));
} }
} }
/** @var \RecurringTransaction $entry */ /** @var \RecurringTransaction $entry */
$chart->addRow('Unpaid: ' . join(', ', $unpaid['items']), $unpaid['amount']); $this->_chart->addRow('Unpaid: ' . join(', ', $unpaid['items']), $unpaid['amount']);
$chart->addRow('Paid: ' . join(', ', $paid['items']), $paid['amount']); $this->_chart->addRow('Paid: ' . join(', ', $paid['items']), $paid['amount']);
$this->_chart->generate();
$chart->generate();
return Response::json($chart->getData());
return Response::json($this->_chart->getData());
} }
/** /**
@@ -475,11 +419,9 @@ class GoogleChartController extends BaseController
} catch (Exception $e) { } catch (Exception $e) {
App::abort(500); App::abort(500);
} }
/** @var \Grumpydictator\Gchart\GChart $chart */ $this->_chart->addColumn('Month', 'date');
$chart = App::make('gchart'); $this->_chart->addColumn('Income', 'number');
$chart->addColumn('Month', 'date'); $this->_chart->addColumn('Expenses', 'number');
$chart->addColumn('Income', 'number');
$chart->addColumn('Expenses', 'number');
/** @var \FireflyIII\Database\TransactionJournal\TransactionJournal $repository */ /** @var \FireflyIII\Database\TransactionJournal\TransactionJournal $repository */
$repository = App::make('FireflyIII\Database\TransactionJournal\TransactionJournal'); $repository = App::make('FireflyIII\Database\TransactionJournal\TransactionJournal');
@@ -492,14 +434,14 @@ class GoogleChartController extends BaseController
$income = $repository->getSumOfIncomesByMonth($start); $income = $repository->getSumOfIncomesByMonth($start);
$expense = $repository->getSumOfExpensesByMonth($start); $expense = $repository->getSumOfExpensesByMonth($start);
$chart->addRow(clone $start, $income, $expense); $this->_chart->addRow(clone $start, $income, $expense);
$start->addMonth(); $start->addMonth();
} }
$chart->generate(); $this->_chart->generate();
return Response::json($chart->getData()); return Response::json($this->_chart->getData());
} }
@@ -515,11 +457,9 @@ class GoogleChartController extends BaseController
} catch (Exception $e) { } catch (Exception $e) {
App::abort(500); App::abort(500);
} }
/** @var \Grumpydictator\Gchart\GChart $chart */ $this->_chart->addColumn('Summary', 'string');
$chart = App::make('gchart'); $this->_chart->addColumn('Income', 'number');
$chart->addColumn('Summary', 'string'); $this->_chart->addColumn('Expenses', 'number');
$chart->addColumn('Income', 'number');
$chart->addColumn('Expenses', 'number');
/** @var \FireflyIII\Database\TransactionJournal\TransactionJournal $repository */ /** @var \FireflyIII\Database\TransactionJournal\TransactionJournal $repository */
$repository = App::make('FireflyIII\Database\TransactionJournal\TransactionJournal'); $repository = App::make('FireflyIII\Database\TransactionJournal\TransactionJournal');
@@ -538,14 +478,14 @@ class GoogleChartController extends BaseController
$start->addMonth(); $start->addMonth();
} }
$chart->addRow('Sum', $income, $expense); $this->_chart->addRow('Sum', $income, $expense);
$count = $count > 0 ? $count : 1; $count = $count > 0 ? $count : 1;
$chart->addRow('Average', ($income / $count), ($expense / $count)); $this->_chart->addRow('Average', ($income / $count), ($expense / $count));
$chart->generate(); $this->_chart->generate();
return Response::json($chart->getData()); return Response::json($this->_chart->getData());
} }
} }

View File

@@ -32,7 +32,6 @@ class ProfileController extends BaseController
{ {
// old, new1, new2 // old, new1, new2
/** @noinspection PhpUndefinedFieldInspection */
if (!Hash::check(Input::get('old'), Auth::user()->password)) { if (!Hash::check(Input::get('old'), Auth::user()->password)) {
Session::flash('error', 'Invalid current password!'); Session::flash('error', 'Invalid current password!');

View File

@@ -48,7 +48,7 @@ class Budget implements CUD, CommonDatabaseCalls, BudgetInterface
*/ */
public function store(array $data) public function store(array $data)
{ {
$budget = new \Budget($data); $budget = new \Budget($data);
if (!$budget->isValid()) { if (!$budget->isValid()) {
\Log::error('Could not store budget: ' . $budget->getErrors()->toJson()); \Log::error('Could not store budget: ' . $budget->getErrors()->toJson());
@@ -85,9 +85,9 @@ class Budget implements CUD, CommonDatabaseCalls, BudgetInterface
{ {
$warnings = new MessageBag; $warnings = new MessageBag;
$successes = new MessageBag; $successes = new MessageBag;
$budget = new \Budget($model); $budget = new \Budget($model);
$budget->isValid(); $budget->isValid();
$errors = $budget->getErrors(); $errors = $budget->getErrors();
if (!$errors->has('name')) { if (!$errors->has('name')) {
$successes->add('name', 'OK'); $successes->add('name', 'OK');
@@ -180,6 +180,17 @@ class Budget implements CUD, CommonDatabaseCalls, BudgetInterface
return \Paginator::make($items, $count, $take); return \Paginator::make($items, $count, $take);
} }
/**
* @param \Budget $budget
* @param Carbon $date
*
* @return \LimitRepetition
*/
public function getRepetitionByDate(\Budget $budget, Carbon $date)
{
return $budget->limitrepetitions()->where('limit_repetitions.startdate', $date)->first(['limit_repetitions.*']);
}
/** /**
* @param \Budget $budget * @param \Budget $budget
* @param int $limit * @param int $limit

View File

@@ -213,7 +213,6 @@ class Piggybank
$currentTarget = clone $target; $currentTarget = clone $target;
$currentStart = null; $currentStart = null;
while ($currentTarget < $today) { while ($currentTarget < $today) {
/** @noinspection PhpInternalEntityUsedInspection */
$currentStart = \DateKit::subtractPeriod($currentTarget, $entry->rep_length, 0); $currentStart = \DateKit::subtractPeriod($currentTarget, $entry->rep_length, 0);
$currentTarget = \DateKit::addPeriod($currentTarget, $entry->rep_length, 0); $currentTarget = \DateKit::addPeriod($currentTarget, $entry->rep_length, 0);
// create if not exists: // create if not exists:
@@ -254,7 +253,6 @@ class Piggybank
if ($journal->piggybankevents()->count() > 0) { if ($journal->piggybankevents()->count() > 0) {
/** @noinspection PhpUnusedLocalVariableInspection */
$event = $journal->piggybankevents()->orderBy('date', 'DESC')->orderBy('id', 'DESC')->first(); $event = $journal->piggybankevents()->orderBy('date', 'DESC')->orderBy('id', 'DESC')->first();
$eventSum = floatval($journal->piggybankevents()->orderBy('date', 'DESC')->orderBy('id', 'DESC')->sum('amount')); $eventSum = floatval($journal->piggybankevents()->orderBy('date', 'DESC')->orderBy('id', 'DESC')->sum('amount'));

View File

@@ -28,7 +28,6 @@ class Form
$fields = ['title', 'name', 'description']; $fields = ['title', 'name', 'description'];
/** @var \Eloquent $entry */ /** @var \Eloquent $entry */
foreach ($set as $entry) { foreach ($set as $entry) {
/** @noinspection PhpUndefinedFieldInspection */
$id = intval($entry->id); $id = intval($entry->id);
$title = null; $title = null;

View File

@@ -23,10 +23,8 @@ class Account extends Eloquent
'active' => 'required|boolean' 'active' => 'required|boolean'
]; ];
// @codingStandardsIgnoreStart
protected $dates = ['deleted_at', 'created_at', 'updated_at']; protected $dates = ['deleted_at', 'created_at', 'updated_at'];
protected $fillable = ['name', 'user_id', 'account_type_id', 'active']; protected $fillable = ['name', 'user_id', 'account_type_id', 'active'];
// @codingStandardsIgnoreEnd
/** /**
* Account type. * Account type.

View File

@@ -19,10 +19,8 @@ class AccountMeta extends Eloquent
/** /**
* @var array * @var array
*/ */
// @codingStandardsIgnoreStart
protected $fillable = ['account_id', 'name', 'date']; protected $fillable = ['account_id', 'name', 'date'];
protected $table = 'account_meta'; protected $table = 'account_meta';
// @codingStandardsIgnoreEnd
/** /**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo * @return \Illuminate\Database\Eloquent\Relations\BelongsTo

View File

@@ -10,9 +10,7 @@ class Reminder extends Eloquent
{ {
use ValidatingTrait; use ValidatingTrait;
// @codingStandardsIgnoreStart
protected $table = 'reminders'; protected $table = 'reminders';
// @codingStandardsIgnoreEnd
/** /**
* @param $value * @param $value

View File

@@ -22,11 +22,9 @@ class User extends Eloquent implements UserInterface, RemindableInterface
'password' => 'required|between:60,60', 'password' => 'required|between:60,60',
'reset' => 'between:32,32', 'reset' => 'between:32,32',
]; ];
// @codingStandardsIgnoreStart
protected $fillable = ['email']; protected $fillable = ['email'];
protected $hidden = ['remember_token']; protected $hidden = ['remember_token'];
protected $table = 'users'; protected $table = 'users';
// @codingStandardsIgnoreEnd
/** /**
* @return \Illuminate\Database\Eloquent\Relations\HasMany * @return \Illuminate\Database\Eloquent\Relations\HasMany

View File

@@ -127,5 +127,4 @@ App::down(
| |
*/ */
/** @noinspection PhpIncludeInspection */
require app_path() . '/filters.php'; require app_path() . '/filters.php';

View File

@@ -13,9 +13,7 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
*/ */
public function createApplication() public function createApplication()
{ {
/** @noinspection PhpUnusedLocalVariableInspection */
$unitTesting = true; $unitTesting = true;
/** @noinspection PhpUnusedLocalVariableInspection */
$testEnvironment = 'testing'; $testEnvironment = 'testing';
return require __DIR__ . '/../../bootstrap/start.php'; return require __DIR__ . '/../../bootstrap/start.php';