Removed unused use statements.

This commit is contained in:
James Cole
2015-03-29 08:03:53 +02:00
parent ecbafb8f4b
commit ba97f96288
5 changed files with 9 additions and 14 deletions

View File

@@ -143,7 +143,7 @@ class ReportQuery implements ReportQueryInterface
) )
->orderBy('accounts.name', 'ASC') ->orderBy('accounts.name', 'ASC')
->where( ->where(
function (Builder $query) use ($showSharedReports) { function (Builder $query) {
$query->where('account_meta.data', '!=', '"sharedAsset"'); $query->where('account_meta.data', '!=', '"sharedAsset"');
$query->orWhereNull('account_meta.data'); $query->orWhereNull('account_meta.data');

View File

@@ -90,7 +90,6 @@ class JsonController extends Controller
$count = $bill->transactionjournals()->before($range['end'])->after($range['start'])->count(); $count = $bill->transactionjournals()->before($range['end'])->after($range['start'])->count();
if ($count != 0) { if ($count != 0) {
$journal = $bill->transactionjournals()->with('transactions')->before($range['end'])->after($range['start'])->first(); $journal = $bill->transactionjournals()->with('transactions')->before($range['end'])->after($range['start'])->first();
$paid['items'][] = $journal->description;
$currentAmount = 0; $currentAmount = 0;
foreach ($journal->transactions as $t) { foreach ($journal->transactions as $t) {
if (floatval($t->amount) > 0) { if (floatval($t->amount) > 0) {

View File

@@ -82,7 +82,7 @@ class ReminderController extends Controller
// inactive reminders // inactive reminders
$inactive = $reminders->filter( $inactive = $reminders->filter(
function (Reminder $reminder) use ($today) { function (Reminder $reminder) {
if ($reminder->active === false) { if ($reminder->active === false) {
return $reminder; return $reminder;
} }
@@ -91,7 +91,7 @@ class ReminderController extends Controller
// dismissed reminders // dismissed reminders
$dismissed = $reminders->filter( $dismissed = $reminders->filter(
function (Reminder $reminder) use ($today) { function (Reminder $reminder) {
if ($reminder->notnow === true) { if ($reminder->notnow === true) {
return $reminder; return $reminder;
} }

View File

@@ -91,7 +91,6 @@ class PiggyBanks
$start = clone $piggyBank->startdate; $start = clone $piggyBank->startdate;
$end = clone $piggyBank->targetdate; $end = clone $piggyBank->targetdate;
$max = clone $piggyBank->targetdate; $max = clone $piggyBank->targetdate;
$index = 0;
// first loop: start date to target date. // first loop: start date to target date.
// then, continue looping until end is > today // then, continue looping until end is > today

View File

@@ -135,9 +135,9 @@ class TestDataSeeder extends Seeder
$acc_c = Account::create(['user_id' => $user->id, 'account_type_id' => $assetType->id, 'name' => 'Delete me', 'active' => 1]); $acc_c = Account::create(['user_id' => $user->id, 'account_type_id' => $assetType->id, 'name' => 'Delete me', 'active' => 1]);
// create account meta: // create account meta:
$meta_a = AccountMeta::create(['account_id' => $acc_a->id, 'name' => 'accountRole', 'data' => 'defaultAsset']); AccountMeta::create(['account_id' => $acc_a->id, 'name' => 'accountRole', 'data' => 'defaultAsset']);
$meta_b = AccountMeta::create(['account_id' => $acc_b->id, 'name' => 'accountRole', 'data' => 'savingAsset']); AccountMeta::create(['account_id' => $acc_b->id, 'name' => 'accountRole', 'data' => 'savingAsset']);
$meta_c = AccountMeta::create(['account_id' => $acc_c->id, 'name' => 'accountRole', 'data' => 'defaultAsset']); AccountMeta::create(['account_id' => $acc_c->id, 'name' => 'accountRole', 'data' => 'defaultAsset']);
$acc_d = Account::create(['user_id' => $user->id, 'account_type_id' => $ibType->id, 'name' => 'Checking account initial balance', 'active' => 0]); $acc_d = Account::create(['user_id' => $user->id, 'account_type_id' => $ibType->id, 'name' => 'Checking account initial balance', 'active' => 0]);
$acc_e = Account::create(['user_id' => $user->id, 'account_type_id' => $ibType->id, 'name' => 'Savings account initial balance', 'active' => 0]); $acc_e = Account::create(['user_id' => $user->id, 'account_type_id' => $ibType->id, 'name' => 'Savings account initial balance', 'active' => 0]);
@@ -206,13 +206,13 @@ class TestDataSeeder extends Seeder
$bills = Budget::create(['user_id' => $user->id, 'name' => 'Bills']); $bills = Budget::create(['user_id' => $user->id, 'name' => 'Bills']);
$deleteMe = Budget::create(['user_id' => $user->id, 'name' => 'Delete me']); $deleteMe = Budget::create(['user_id' => $user->id, 'name' => 'Delete me']);
Budget::create(['user_id' => $user->id, 'name' => 'Budget without repetition']); Budget::create(['user_id' => $user->id, 'name' => 'Budget without repetition']);
$groceriesLimit = BudgetLimit::create( BudgetLimit::create(
['startdate' => $this->som, 'amount' => 201, 'repeats' => 0, 'repeat_freq' => 'monthly', 'budget_id' => $groceries->id] ['startdate' => $this->som, 'amount' => 201, 'repeats' => 0, 'repeat_freq' => 'monthly', 'budget_id' => $groceries->id]
); );
$billsLimit = BudgetLimit::create( BudgetLimit::create(
['startdate' => $this->som, 'amount' => 202, 'repeats' => 0, 'repeat_freq' => 'monthly', 'budget_id' => $bills->id] ['startdate' => $this->som, 'amount' => 202, 'repeats' => 0, 'repeat_freq' => 'monthly', 'budget_id' => $bills->id]
); );
$deleteMeLimit = BudgetLimit::create( BudgetLimit::create(
['startdate' => $this->som, 'amount' => 203, 'repeats' => 0, 'repeat_freq' => 'monthly', 'budget_id' => $deleteMe->id] ['startdate' => $this->som, 'amount' => 203, 'repeats' => 0, 'repeat_freq' => 'monthly', 'budget_id' => $deleteMe->id]
); );
@@ -247,7 +247,6 @@ class TestDataSeeder extends Seeder
$endDate->addMonths(4); $endDate->addMonths(4);
$nextYear->addYear()->subDay(); $nextYear->addYear()->subDay();
$next = $nextYear->format('Y-m-d');
$end = $endDate->format('Y-m-d'); $end = $endDate->format('Y-m-d');
// piggy bank // piggy bank
@@ -343,8 +342,6 @@ class TestDataSeeder extends Seeder
*/ */
public function createReminders() public function createReminders()
{ {
$user = User::whereEmail('thegrumpydictator@gmail.com')->first();
// for weekly piggy bank (clothes)
} }