From 2e91d21a886c44f49e199bd8bd5e840015250ac1 Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sat, 28 Mar 2015 18:22:36 +0100
Subject: [PATCH 01/17] Add return to form routine to budgets.
---
app/Http/Controllers/BudgetController.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/Http/Controllers/BudgetController.php b/app/Http/Controllers/BudgetController.php
index e0147eb5ab..1cd2d46706 100644
--- a/app/Http/Controllers/BudgetController.php
+++ b/app/Http/Controllers/BudgetController.php
@@ -170,6 +170,10 @@ class BudgetController extends Controller
Session::flash('success', 'New budget "' . $budget->name . '" stored!');
+ if (intval(Input::get('create_another')) === 1) {
+ return Redirect::route('budgets.create')->withInput();
+ }
+
return Redirect::route('budgets.index');
}
From 907933f3dfebd3fdb776efcd91bb7ac2a4113523 Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sun, 29 Mar 2015 07:32:24 +0200
Subject: [PATCH 02/17] Removed debug logic and bad operators.
---
app/Http/Controllers/BillController.php | 2 --
server.php | 9 ++++-----
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/app/Http/Controllers/BillController.php b/app/Http/Controllers/BillController.php
index f53bd43785..457b20bdb1 100644
--- a/app/Http/Controllers/BillController.php
+++ b/app/Http/Controllers/BillController.php
@@ -157,8 +157,6 @@ class BillController extends Controller
public function store(BillFormRequest $request, BillRepositoryInterface $repository)
{
- var_dump($request->all());
-
$billData = [
'name' => $request->get('name'),
'match' => $request->get('match'),
diff --git a/server.php b/server.php
index 8f37587762..c6499cf326 100644
--- a/server.php
+++ b/server.php
@@ -7,15 +7,14 @@
*/
$uri = urldecode(
- parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
+ parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
);
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
// built-in PHP web server. This provides a convenient way to test a Laravel
// application without having installed a "real" web server software here.
-if ($uri !== '/' and file_exists(__DIR__.'/public'.$uri))
-{
- return false;
+if ($uri !== '/' && file_exists(__DIR__ . '/public' . $uri)) {
+ return false;
}
-require_once __DIR__.'/public/index.php';
+require_once __DIR__ . '/public/index.php';
From ba9877c9b49e0a91c63cf39435f49c6a52079e8c Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sun, 29 Mar 2015 07:43:20 +0200
Subject: [PATCH 03/17] Add typehints to object parameters
---
app/Helpers/Report/ReportQuery.php | 18 +++++++++---------
app/Http/Controllers/AccountController.php | 3 ++-
app/Http/Controllers/Auth/AuthController.php | 3 ++-
app/Http/Middleware/Authenticate.php | 3 ++-
app/Http/Middleware/PiggyBanks.php | 3 ++-
app/Http/Middleware/Range.php | 3 ++-
.../Middleware/RedirectIfAuthenticated.php | 3 ++-
app/Http/Middleware/Reminders.php | 3 ++-
app/Http/Middleware/ReplaceTestVars.php | 7 ++++---
app/Http/Requests/JournalFormRequest.php | 4 ++--
10 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/app/Helpers/Report/ReportQuery.php b/app/Helpers/Report/ReportQuery.php
index 3dd13231e2..488245e61a 100644
--- a/app/Helpers/Report/ReportQuery.php
+++ b/app/Helpers/Report/ReportQuery.php
@@ -272,15 +272,15 @@ class ReportQuery implements ReportQueryInterface
// only get deposits not to a shared account
// and transfers to a shared account.
$query->where(
- function ($query) {
+ function (Builder $query) {
$query->where(
- function ($q) {
+ function (Builder $q) {
$q->where('transaction_types.type', 'Deposit');
$q->where('acm_to.data', '!=', '"sharedAsset"');
}
);
$query->orWhere(
- function ($q) {
+ function (Builder $q) {
$q->where('transaction_types.type', 'Transfer');
$q->where('acm_from.data', '=', '"sharedAsset"');
}
@@ -427,15 +427,15 @@ class ReportQuery implements ReportQueryInterface
// get all withdrawals not from a shared accounts
// and all transfers to a shared account
$query->where(
- function ($query) {
+ function (Builder $query) {
$query->where(
- function ($q) {
+ function (Builder $q) {
$q->where('transaction_types.type', 'Withdrawal');
$q->where('acm_from.data', '!=', '"sharedAsset"');
}
);
$query->orWhere(
- function ($q) {
+ function (Builder $q) {
$q->where('transaction_types.type', 'Transfer');
$q->where('acm_to.data', '=', '"sharedAsset"');
}
@@ -495,15 +495,15 @@ class ReportQuery implements ReportQueryInterface
// show queries where transfer type is deposit, and its not to a shared account
// or where its a transfer and its from a shared account (both count as incomes)
$query->where(
- function ($query) {
+ function (Builder $query) {
$query->where(
- function ($q) {
+ function (Builder $q) {
$q->where('transaction_types.type', 'Deposit');
$q->where('acm_to.data', '!=', '"sharedAsset"');
}
);
$query->orWhere(
- function ($q) {
+ function (Builder $q) {
$q->where('transaction_types.type', 'Transfer');
$q->where('acm_from.data', '=', '"sharedAsset"');
}
diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php
index 26051e16d0..9cf2d0918e 100644
--- a/app/Http/Controllers/AccountController.php
+++ b/app/Http/Controllers/AccountController.php
@@ -7,6 +7,7 @@ use FireflyIII\Http\Requests;
use FireflyIII\Http\Requests\AccountFormRequest;
use FireflyIII\Models\Account;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
+use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Pagination\LengthAwarePaginator;
use Input;
use Redirect;
@@ -124,7 +125,7 @@ class AccountController extends Controller
// move to repository:
$set = Auth::user()->accounts()->with(
- ['accountmeta' => function ($query) {
+ ['accountmeta' => function (HasMany $query) {
$query->where('name', 'accountRole');
}]
)->accountTypeIn($types)->take($size)->offset($offset)->orderBy('accounts.name', 'ASC')->get(['accounts.*']);
diff --git a/app/Http/Controllers/Auth/AuthController.php b/app/Http/Controllers/Auth/AuthController.php
index 0f3a19dde7..a4fd311bfd 100644
--- a/app/Http/Controllers/Auth/AuthController.php
+++ b/app/Http/Controllers/Auth/AuthController.php
@@ -5,6 +5,7 @@ use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\Registrar;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
use Illuminate\Http\Request;
+use Illuminate\Mail\Message;
use Mail;
use Session;
@@ -73,7 +74,7 @@ class AuthController extends Controller
// send email.
Mail::send(
- 'emails.registered', [], function ($message) use ($email) {
+ 'emails.registered', [], function (Message $message) use ($email) {
$message->to($email, $email)->subject('Welcome to Firefly III!');
}
);
diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php
index f014b3c53a..23b18019a4 100644
--- a/app/Http/Middleware/Authenticate.php
+++ b/app/Http/Middleware/Authenticate.php
@@ -2,6 +2,7 @@
use Closure;
use Illuminate\Contracts\Auth\Guard;
+use Illuminate\Http\Request;
/**
* Class Authenticate
@@ -37,7 +38,7 @@ class Authenticate
*
* @return mixed
*/
- public function handle($request, Closure $next)
+ public function handle(Request $request, Closure $next)
{
if ($this->auth->guest()) {
if ($request->ajax()) {
diff --git a/app/Http/Middleware/PiggyBanks.php b/app/Http/Middleware/PiggyBanks.php
index 1584f94175..4e6aebc9a4 100644
--- a/app/Http/Middleware/PiggyBanks.php
+++ b/app/Http/Middleware/PiggyBanks.php
@@ -10,6 +10,7 @@ use FireflyIII\Models\PiggyBankRepetition;
use FireflyIII\Models\Reminder;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Database\Query\JoinClause;
+use Illuminate\Http\Request;
use Illuminate\Support\Collection;
use Navigation;
use Session;
@@ -48,7 +49,7 @@ class PiggyBanks
*
* @return mixed
*/
- public function handle($request, Closure $next)
+ public function handle(Request $request, Closure $next)
{
if ($this->auth->check() && !$request->isXmlHttpRequest()) {
// get piggy banks without a repetition:
diff --git a/app/Http/Middleware/Range.php b/app/Http/Middleware/Range.php
index b37db6b6b4..3b7cc69bc8 100644
--- a/app/Http/Middleware/Range.php
+++ b/app/Http/Middleware/Range.php
@@ -6,6 +6,7 @@ namespace FireflyIII\Http\Middleware;
use Carbon\Carbon;
use Closure;
use Illuminate\Contracts\Auth\Guard;
+use Illuminate\Http\Request;
use Navigation;
use Preferences;
use Session;
@@ -44,7 +45,7 @@ class Range
*
* @return mixed
*/
- public function handle($request, Closure $theNext)
+ public function handle(Request $request, Closure $theNext)
{
if ($this->auth->check()) {
diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php
index 5033c35130..237bbe02ce 100644
--- a/app/Http/Middleware/RedirectIfAuthenticated.php
+++ b/app/Http/Middleware/RedirectIfAuthenticated.php
@@ -3,6 +3,7 @@
use Closure;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Http\RedirectResponse;
+use Illuminate\Http\Request;
/**
* Class RedirectIfAuthenticated
@@ -38,7 +39,7 @@ class RedirectIfAuthenticated
*
* @return mixed
*/
- public function handle($request, Closure $next)
+ public function handle(Request $request, Closure $next)
{
if ($this->auth->check()) {
return new RedirectResponse(url('/'));
diff --git a/app/Http/Middleware/Reminders.php b/app/Http/Middleware/Reminders.php
index 3bc152328f..2c0c15b046 100644
--- a/app/Http/Middleware/Reminders.php
+++ b/app/Http/Middleware/Reminders.php
@@ -8,6 +8,7 @@ use Closure;
use FireflyIII\Models\PiggyBank;
use FireflyIII\Models\Reminder;
use Illuminate\Contracts\Auth\Guard;
+use Illuminate\Http\Request;
use View;
/**
@@ -43,7 +44,7 @@ class Reminders
*
* @return mixed
*/
- public function handle($request, Closure $next)
+ public function handle(Request $request, Closure $next)
{
if ($this->auth->check() && !$request->isXmlHttpRequest()) {
// do reminders stuff.
diff --git a/app/Http/Middleware/ReplaceTestVars.php b/app/Http/Middleware/ReplaceTestVars.php
index 3af1d24641..2f48ac76b9 100644
--- a/app/Http/Middleware/ReplaceTestVars.php
+++ b/app/Http/Middleware/ReplaceTestVars.php
@@ -5,14 +5,15 @@ namespace FireflyIII\Http\Middleware;
use Closure;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\Routing\Middleware;
+use Illuminate\Http\Request;
use Log;
/**
* Class ReplaceTestVars
*
- * @package App\Http\Middleware
+ * @package FireflyIII\Http\Middleware
*/
-class ReplaceTestVars implements Middleware
+class ReplaceTestVars
{
/**
* The application implementation.
@@ -40,7 +41,7 @@ class ReplaceTestVars implements Middleware
*
* @return mixed
*/
- public function handle($request, Closure $next)
+ public function handle(Request $request, Closure $next)
{
if ('testing' === $this->app->environment() && $request->has('_token')) {
$input = $request->all();
diff --git a/app/Http/Requests/JournalFormRequest.php b/app/Http/Requests/JournalFormRequest.php
index 038542c0bc..42b7c3122e 100644
--- a/app/Http/Requests/JournalFormRequest.php
+++ b/app/Http/Requests/JournalFormRequest.php
@@ -5,7 +5,7 @@ namespace FireflyIII\Http\Requests;
use Auth;
use FireflyIII\Models\Account;
use Input;
-
+use Exception;
/**
* Class JournalFormRequest
*
@@ -62,7 +62,7 @@ class JournalFormRequest extends Request
$rules['category'] = 'between:1,255';
break;
default:
- die('Cannot handle ' . $what);
+ throw new Exception('Cannot handle ' . $what);
break;
}
From d586b82372d6e8beee6e31b14a23993b9d8ef746 Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sun, 29 Mar 2015 07:45:14 +0200
Subject: [PATCH 04/17] New composer.son file.
---
composer.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/composer.json b/composer.json
index f214d73c10..d268b01254 100644
--- a/composer.json
+++ b/composer.json
@@ -22,8 +22,8 @@
"require": {
"laravel/framework": "5.0.*",
"davejamesmiller/laravel-breadcrumbs": "~3.0",
- "grumpydictator/gchart": "dev-master",
- "watson/validating": "dev-master",
+ "grumpydictator/gchart": "~1",
+ "watson/validating": "~1.0",
"doctrine/dbal": "~2.5",
"illuminate/html": "~5.0",
"league/commonmark": "0.7.*"
From 12d3800d67969b15d3ca19afa011a0d32b1ad759 Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sun, 29 Mar 2015 07:51:56 +0200
Subject: [PATCH 05/17] Removed unused use statements.
---
app/Handlers/Events/JournalDeletedHandler.php | 8 +++++---
.../Events/UpdateJournalConnection.php | 6 +++++-
.../Controllers/GoogleChartController.php | 1 -
app/Http/Controllers/HelpController.php | 1 -
app/Http/Controllers/JsonController.php | 20 +++++++++----------
app/Http/Controllers/PiggyBankController.php | 1 -
app/Http/Controllers/RelatedController.php | 1 -
app/Http/Controllers/ReminderController.php | 1 -
app/Http/Controllers/ReportController.php | 1 -
app/Http/Controllers/SearchController.php | 1 -
app/Http/Middleware/PiggyBanks.php | 1 -
app/Http/Requests/JournalFormRequest.php | 2 +-
app/Http/Requests/PiggyBankFormRequest.php | 1 -
app/Http/Requests/ProfileFormRequest.php | 1 -
app/Providers/EventServiceProvider.php | 2 --
.../Journal/JournalRepository.php | 3 +--
.../PiggyBank/PiggyBankRepository.php | 1 -
.../PiggyBankRepositoryInterface.php | 4 +---
bootstrap/app.php | 16 +++++++--------
database/seeds/TestDataSeeder.php | 2 --
20 files changed, 30 insertions(+), 44 deletions(-)
diff --git a/app/Handlers/Events/JournalDeletedHandler.php b/app/Handlers/Events/JournalDeletedHandler.php
index 16ad7b51e3..bcc3782511 100644
--- a/app/Handlers/Events/JournalDeletedHandler.php
+++ b/app/Handlers/Events/JournalDeletedHandler.php
@@ -1,16 +1,18 @@
first();
- $journals = Auth::user()->transactionjournals()->where('transaction_type_id', $dbType->id)
- ->orderBy('id','DESC')->take(50)
- ->get();
- foreach($journals as $j) {
- $descriptions[] = $j->description;
- }
+ $dbType = TransactionType::whereType($what)->first();
+ $journals = Auth::user()->transactionjournals()->where('transaction_type_id', $dbType->id)
+ ->orderBy('id', 'DESC')->take(50)
+ ->get();
+ foreach ($journals as $j) {
+ $descriptions[] = $j->description;
+ }
$descriptions = array_unique($descriptions);
sort($descriptions);
+
return Response::json($descriptions);
diff --git a/app/Http/Controllers/PiggyBankController.php b/app/Http/Controllers/PiggyBankController.php
index c80fa70c28..dd0a6979c0 100644
--- a/app/Http/Controllers/PiggyBankController.php
+++ b/app/Http/Controllers/PiggyBankController.php
@@ -7,7 +7,6 @@ use Config;
use ExpandedForm;
use FireflyIII\Http\Requests;
use FireflyIII\Http\Requests\PiggyBankFormRequest;
-use FireflyIII\Models\Account;
use FireflyIII\Models\PiggyBank;
use FireflyIII\Models\PiggyBankEvent;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
diff --git a/app/Http/Controllers/RelatedController.php b/app/Http/Controllers/RelatedController.php
index 6e5102bf52..5bdebaae3a 100644
--- a/app/Http/Controllers/RelatedController.php
+++ b/app/Http/Controllers/RelatedController.php
@@ -1,7 +1,6 @@
save();
}
if (floatval($transaction->amount) > 0) {
- $transaction->amount = $data['amount'];
+ $transaction->amount = $data['amount'];
$transaction->account_id = $to->id;
$transaction->save();
}
diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php
index fa4ace8d68..451b999909 100644
--- a/app/Repositories/PiggyBank/PiggyBankRepository.php
+++ b/app/Repositories/PiggyBank/PiggyBankRepository.php
@@ -6,7 +6,6 @@ use Auth;
use DB;
use FireflyIII\Models\PiggyBank;
use FireflyIII\Models\PiggyBankRepetition;
-use FireflyIII\Models\Reminder;
use Illuminate\Support\Collection;
use Navigation;
diff --git a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php
index a763e5bfba..f2577e2a4b 100644
--- a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php
+++ b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php
@@ -4,9 +4,7 @@ namespace FireflyIII\Repositories\PiggyBank;
use FireflyIII\Models\PiggyBank;
use FireflyIII\Models\PiggyBankRepetition;
-use FireflyIII\Models\Reminder;
use Illuminate\Support\Collection;
-use Carbon\Carbon;
/**
* Interface PiggyBankRepositoryInterface
@@ -39,6 +37,7 @@ interface PiggyBankRepositoryInterface
/**
* Set all piggy banks to order 0.
+ *
* @return void
*/
public function reset();
@@ -55,7 +54,6 @@ interface PiggyBankRepositoryInterface
public function setOrder($id, $order);
-
/**
* @param array $data
*
diff --git a/bootstrap/app.php b/bootstrap/app.php
index e3697dc4ad..e3ec5b5519 100644
--- a/bootstrap/app.php
+++ b/bootstrap/app.php
@@ -11,10 +11,8 @@
|
*/
-use FireflyIII\Validation\FireflyValidator;
-
$app = new Illuminate\Foundation\Application(
- realpath(__DIR__.'/../')
+ realpath(__DIR__ . '/../')
);
/*
@@ -29,18 +27,18 @@ $app = new Illuminate\Foundation\Application(
*/
$app->singleton(
- 'Illuminate\Contracts\Http\Kernel',
- 'FireflyIII\Http\Kernel'
+ 'Illuminate\Contracts\Http\Kernel',
+ 'FireflyIII\Http\Kernel'
);
$app->singleton(
- 'Illuminate\Contracts\Console\Kernel',
- 'FireflyIII\Console\Kernel'
+ 'Illuminate\Contracts\Console\Kernel',
+ 'FireflyIII\Console\Kernel'
);
$app->singleton(
- 'Illuminate\Contracts\Debug\ExceptionHandler',
- 'FireflyIII\Exceptions\Handler'
+ 'Illuminate\Contracts\Debug\ExceptionHandler',
+ 'FireflyIII\Exceptions\Handler'
);
/*
diff --git a/database/seeds/TestDataSeeder.php b/database/seeds/TestDataSeeder.php
index 6ab7fad298..7a990553c1 100644
--- a/database/seeds/TestDataSeeder.php
+++ b/database/seeds/TestDataSeeder.php
@@ -9,8 +9,6 @@ use FireflyIII\Models\BudgetLimit;
use FireflyIII\Models\Category;
use FireflyIII\Models\PiggyBank;
use FireflyIII\Models\PiggyBankEvent;
-use FireflyIII\Models\PiggyBankRepetition;
-use FireflyIII\Models\Reminder;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionCurrency;
use FireflyIII\Models\TransactionGroup;
From ecbafb8f4b89bf4359fbd3faa72eb77201ad7856 Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sun, 29 Mar 2015 07:59:18 +0200
Subject: [PATCH 06/17] Removed commented out code.
---
app/Helpers/Reminders/ReminderHelper.php | 1 -
app/Http/Controllers/ReportController.php | 2 --
app/Http/Middleware/PiggyBanks.php | 1 -
app/Providers/RouteServiceProvider.php | 16 ----------------
app/Repositories/Account/AccountRepository.php | 1 -
app/Repositories/Bill/BillRepository.php | 5 -----
.../PiggyBank/PiggyBankRepository.php | 1 -
database/seeds/TestDataSeeder.php | 6 ------
8 files changed, 33 deletions(-)
diff --git a/app/Helpers/Reminders/ReminderHelper.php b/app/Helpers/Reminders/ReminderHelper.php
index d667213615..8203d4e2bd 100644
--- a/app/Helpers/Reminders/ReminderHelper.php
+++ b/app/Helpers/Reminders/ReminderHelper.php
@@ -95,7 +95,6 @@ class ReminderHelper implements ReminderHelperInterface
if (!is_null($piggyBank->targetdate)) {
// count back until now.
- // echo 'Count back!
';
$start = $piggyBank->targetdate;
$end = $piggyBank->startdate;
diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php
index c448fd462e..1a6eef25ee 100644
--- a/app/Http/Controllers/ReportController.php
+++ b/app/Http/Controllers/ReportController.php
@@ -381,8 +381,6 @@ class ReportController extends Controller
$groupedIncomes = $query->journalsByRevenueAccount($date, $end, $showSharedReports);
$groupedExpenses = $query->journalsByExpenseAccount($date, $end, $showSharedReports);
- //$groupedExpenses = $helper-> expensesGroupedByAccount($date, $end, 15);
-
return view(
'reports.year', compact('date', 'groupedIncomes', 'groupedExpenses', 'year', 'balances', 'title', 'subTitle', 'subTitleIcon', 'mainTitleIcon')
);
diff --git a/app/Http/Middleware/PiggyBanks.php b/app/Http/Middleware/PiggyBanks.php
index df05b3d8fe..0f4b197cb5 100644
--- a/app/Http/Middleware/PiggyBanks.php
+++ b/app/Http/Middleware/PiggyBanks.php
@@ -127,7 +127,6 @@ class PiggyBanks
$repetition->targetdate = is_null($piggyBank->targetdate) ? null : $piggyBank->targetdate;
$repetition->currentamount = 0;
// it might exist, catch:
- //$repetition->save();
// then, loop from original target up to now.
}
diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php
index cd51b4b800..682c7ac5c8 100644
--- a/app/Providers/RouteServiceProvider.php
+++ b/app/Providers/RouteServiceProvider.php
@@ -32,22 +32,6 @@ class RouteServiceProvider extends ServiceProvider
{
parent::boot($router);
- $router->before(
- function (Request $request) {
-
- // put IP in session if not already there.
-
- $reminders = [];
-
- if ($request->user()) {
- //Filter::setSessionDateRange();
- //Reminders::updateReminders();
- //Steam::removeEmptyBudgetLimits();
- //$reminders = Reminders::getReminders();
- }
- // View::share('reminders', $reminders);
- }
- );
}
/**
diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php
index 859d06b09a..c7cd65571d 100644
--- a/app/Repositories/Account/AccountRepository.php
+++ b/app/Repositories/Account/AccountRepository.php
@@ -118,7 +118,6 @@ class AccountRepository implements AccountRepositoryInterface
return $paginator;
- //return Paginator::make($items, $count, 50);
}
diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php
index 5c12f99b0b..9f928cabb4 100644
--- a/app/Repositories/Bill/BillRepository.php
+++ b/app/Repositories/Bill/BillRepository.php
@@ -51,16 +51,11 @@ class BillRepository implements BillRepositoryInterface
foreach ($billStarts as $dateEntry) {
if ($dateEntry['end'] > $start && $dateEntry['start'] < $end) {
// count transactions for bill in this range (not relevant yet!):
- // $count = $bill->transactionjournals()->before($dateEntry['end'])->after($dateEntry['start'])->count();
- // if ($count == 0) {
$validRanges[] = $dateEntry;
- // }
}
}
return $validRanges;
- // echo $bill->name;
- // var_dump($validRanges);
}
/**
diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php
index 451b999909..b198e75612 100644
--- a/app/Repositories/PiggyBank/PiggyBankRepository.php
+++ b/app/Repositories/PiggyBank/PiggyBankRepository.php
@@ -97,7 +97,6 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
->leftJoin('accounts', 'accounts.id', '=', 'piggy_banks.id')
->where('accounts.user_id', Auth::user()->id)
->update(['order' => 0, 'piggy_banks.updated_at' => DB::Raw('NOW()')]);
- //Auth::user()->piggyBanks()->update(['order' => 0]);
}
/**
diff --git a/database/seeds/TestDataSeeder.php b/database/seeds/TestDataSeeder.php
index 7a990553c1..4d82f29137 100644
--- a/database/seeds/TestDataSeeder.php
+++ b/database/seeds/TestDataSeeder.php
@@ -138,9 +138,6 @@ class TestDataSeeder extends Seeder
$meta_a = AccountMeta::create(['account_id' => $acc_a->id, 'name' => 'accountRole', 'data' => 'defaultAsset']);
$meta_b = AccountMeta::create(['account_id' => $acc_b->id, 'name' => 'accountRole', 'data' => 'savingAsset']);
$meta_c = AccountMeta::create(['account_id' => $acc_c->id, 'name' => 'accountRole', 'data' => 'defaultAsset']);
-// var_dump($meta_a->toArray());
-// var_dump($meta_b->toArray());
-// var_dump($meta_c->toArray());
$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]);
@@ -220,9 +217,6 @@ class TestDataSeeder extends Seeder
);
// and because we have no filters, some repetitions:
- // LimitRepetition::create(['budget_limit_id' => $groceriesLimit->id, 'startdate' => $this->som, 'enddate' => $this->eom, 'amount' => 201]);
- // LimitRepetition::create(['budget_limit_id' => $billsLimit->id, 'startdate' => $this->som, 'enddate' => $this->eom, 'amount' => 202]);
- // LimitRepetition::create(['budget_limit_id' => $deleteMeLimit->id, 'startdate' => $this->som, 'enddate' => $this->eom, 'amount' => 203]);
}
/**
From ba97f962888520a72bf46faa33152b256cbc9909 Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sun, 29 Mar 2015 08:03:53 +0200
Subject: [PATCH 07/17] Removed unused use statements.
---
app/Helpers/Report/ReportQuery.php | 2 +-
app/Http/Controllers/JsonController.php | 1 -
app/Http/Controllers/ReminderController.php | 4 ++--
app/Http/Middleware/PiggyBanks.php | 1 -
database/seeds/TestDataSeeder.php | 15 ++++++---------
5 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/app/Helpers/Report/ReportQuery.php b/app/Helpers/Report/ReportQuery.php
index 488245e61a..9f85c7231f 100644
--- a/app/Helpers/Report/ReportQuery.php
+++ b/app/Helpers/Report/ReportQuery.php
@@ -143,7 +143,7 @@ class ReportQuery implements ReportQueryInterface
)
->orderBy('accounts.name', 'ASC')
->where(
- function (Builder $query) use ($showSharedReports) {
+ function (Builder $query) {
$query->where('account_meta.data', '!=', '"sharedAsset"');
$query->orWhereNull('account_meta.data');
diff --git a/app/Http/Controllers/JsonController.php b/app/Http/Controllers/JsonController.php
index 298b389018..48981f8143 100644
--- a/app/Http/Controllers/JsonController.php
+++ b/app/Http/Controllers/JsonController.php
@@ -90,7 +90,6 @@ class JsonController extends Controller
$count = $bill->transactionjournals()->before($range['end'])->after($range['start'])->count();
if ($count != 0) {
$journal = $bill->transactionjournals()->with('transactions')->before($range['end'])->after($range['start'])->first();
- $paid['items'][] = $journal->description;
$currentAmount = 0;
foreach ($journal->transactions as $t) {
if (floatval($t->amount) > 0) {
diff --git a/app/Http/Controllers/ReminderController.php b/app/Http/Controllers/ReminderController.php
index 72bd61b0b4..4f4ec5fe94 100644
--- a/app/Http/Controllers/ReminderController.php
+++ b/app/Http/Controllers/ReminderController.php
@@ -82,7 +82,7 @@ class ReminderController extends Controller
// inactive reminders
$inactive = $reminders->filter(
- function (Reminder $reminder) use ($today) {
+ function (Reminder $reminder) {
if ($reminder->active === false) {
return $reminder;
}
@@ -91,7 +91,7 @@ class ReminderController extends Controller
// dismissed reminders
$dismissed = $reminders->filter(
- function (Reminder $reminder) use ($today) {
+ function (Reminder $reminder) {
if ($reminder->notnow === true) {
return $reminder;
}
diff --git a/app/Http/Middleware/PiggyBanks.php b/app/Http/Middleware/PiggyBanks.php
index 0f4b197cb5..7f273507f3 100644
--- a/app/Http/Middleware/PiggyBanks.php
+++ b/app/Http/Middleware/PiggyBanks.php
@@ -91,7 +91,6 @@ class PiggyBanks
$start = clone $piggyBank->startdate;
$end = clone $piggyBank->targetdate;
$max = clone $piggyBank->targetdate;
- $index = 0;
// first loop: start date to target date.
// then, continue looping until end is > today
diff --git a/database/seeds/TestDataSeeder.php b/database/seeds/TestDataSeeder.php
index 4d82f29137..4aaaa78e0a 100644
--- a/database/seeds/TestDataSeeder.php
+++ b/database/seeds/TestDataSeeder.php
@@ -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]);
// create account meta:
- $meta_a = AccountMeta::create(['account_id' => $acc_a->id, 'name' => 'accountRole', 'data' => 'defaultAsset']);
- $meta_b = 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_a->id, 'name' => 'accountRole', 'data' => 'defaultAsset']);
+ AccountMeta::create(['account_id' => $acc_b->id, 'name' => 'accountRole', 'data' => 'savingAsset']);
+ 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_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']);
$deleteMe = Budget::create(['user_id' => $user->id, 'name' => 'Delete me']);
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]
);
- $billsLimit = BudgetLimit::create(
+ BudgetLimit::create(
['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]
);
@@ -247,7 +247,6 @@ class TestDataSeeder extends Seeder
$endDate->addMonths(4);
$nextYear->addYear()->subDay();
- $next = $nextYear->format('Y-m-d');
$end = $endDate->format('Y-m-d');
// piggy bank
@@ -343,8 +342,6 @@ class TestDataSeeder extends Seeder
*/
public function createReminders()
{
- $user = User::whereEmail('thegrumpydictator@gmail.com')->first();
- // for weekly piggy bank (clothes)
}
From afb47eb742358751a3830c98588ca506d0aae4b5 Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sun, 29 Mar 2015 08:14:32 +0200
Subject: [PATCH 08/17] Add newlines.
---
app/Helpers/Reminders/ReminderHelper.php | 2 +-
app/Helpers/Reminders/ReminderHelperInterface.php | 2 +-
app/Helpers/Report/ReportHelper.php | 2 +-
app/Helpers/Report/ReportHelperInterface.php | 2 +-
app/Helpers/Report/ReportQuery.php | 2 +-
app/Helpers/Report/ReportQueryInterface.php | 2 +-
app/Http/Middleware/PiggyBanks.php | 2 +-
app/Http/Middleware/Range.php | 2 +-
app/Http/Middleware/Reminders.php | 2 +-
app/Http/Middleware/ReplaceTestVars.php | 2 +-
app/Http/Requests/BillFormRequest.php | 2 +-
app/Http/Requests/BudgetFormRequest.php | 2 +-
app/Http/Requests/CategoryFormRequest.php | 2 +-
app/Http/Requests/CurrencyFormRequest.php | 2 +-
app/Http/Requests/JournalFormRequest.php | 2 +-
app/Http/Requests/PiggyBankFormRequest.php | 2 +-
app/Http/Requests/ProfileFormRequest.php | 2 +-
app/Providers/FireflyServiceProvider.php | 2 +-
app/Providers/TestingServiceProvider.php | 2 +-
app/Repositories/Account/AccountRepository.php | 2 +-
app/Repositories/Account/AccountRepositoryInterface.php | 2 +-
app/Repositories/Bill/BillRepositoryInterface.php | 2 +-
app/Repositories/Budget/BudgetRepository.php | 2 +-
app/Repositories/Budget/BudgetRepositoryInterface.php | 2 +-
app/Repositories/Category/CategoryRepository.php | 2 +-
app/Repositories/Category/CategoryRepositoryInterface.php | 2 +-
app/Repositories/Journal/JournalRepository.php | 2 +-
app/Repositories/Journal/JournalRepositoryInterface.php | 2 +-
app/Repositories/PiggyBank/PiggyBankRepository.php | 2 +-
app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php | 2 +-
app/Support/Amount.php | 2 +-
app/Support/ExpandedForm.php | 2 +-
app/Support/Facades/Amount.php | 2 +-
app/Support/Facades/ExpandedForm.php | 2 +-
app/Support/Facades/Navigation.php | 2 +-
app/Support/Facades/Preferences.php | 2 +-
app/Support/Facades/Steam.php | 2 +-
app/Support/Navigation.php | 2 +-
app/Support/Preferences.php | 2 +-
app/Support/Search/SearchInterface.php | 2 +-
app/Support/Steam.php | 2 +-
database/seeds/TestDataSeeder.php | 2 +-
42 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/app/Helpers/Reminders/ReminderHelper.php b/app/Helpers/Reminders/ReminderHelper.php
index 8203d4e2bd..530d3b3c78 100644
--- a/app/Helpers/Reminders/ReminderHelper.php
+++ b/app/Helpers/Reminders/ReminderHelper.php
@@ -142,4 +142,4 @@ class ReminderHelper implements ReminderHelperInterface
return 'Add ' . Amount::format($reminder->metadata->perReminder) . ' to fill this piggy bank on ' . $piggyBank->targetdate->format('jS F Y');
}
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/Reminders/ReminderHelperInterface.php b/app/Helpers/Reminders/ReminderHelperInterface.php
index cc381e1b04..833afe1a24 100644
--- a/app/Helpers/Reminders/ReminderHelperInterface.php
+++ b/app/Helpers/Reminders/ReminderHelperInterface.php
@@ -48,4 +48,4 @@ interface ReminderHelperInterface {
* @return Reminder
*/
public function createReminder(PiggyBank $piggyBank, Carbon $start, Carbon $end);
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php
index bb0ea1d3b8..cec2b058e3 100644
--- a/app/Helpers/Report/ReportHelper.php
+++ b/app/Helpers/Report/ReportHelper.php
@@ -168,4 +168,4 @@ class ReportHelper implements ReportHelperInterface
return $report;
}
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/Report/ReportHelperInterface.php b/app/Helpers/Report/ReportHelperInterface.php
index dedc6b38cb..2bbbefec75 100644
--- a/app/Helpers/Report/ReportHelperInterface.php
+++ b/app/Helpers/Report/ReportHelperInterface.php
@@ -55,4 +55,4 @@ interface ReportHelperInterface
* @return array
*/
public function yearBalanceReport(Carbon $date, $showSharedReports = false);
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/Report/ReportQuery.php b/app/Helpers/Report/ReportQuery.php
index 9f85c7231f..55d0b5ec73 100644
--- a/app/Helpers/Report/ReportQuery.php
+++ b/app/Helpers/Report/ReportQuery.php
@@ -604,4 +604,4 @@ class ReportQuery implements ReportQueryInterface
);
}
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/Report/ReportQueryInterface.php b/app/Helpers/Report/ReportQueryInterface.php
index e67581a047..c92a46ad06 100644
--- a/app/Helpers/Report/ReportQueryInterface.php
+++ b/app/Helpers/Report/ReportQueryInterface.php
@@ -163,4 +163,4 @@ interface ReportQueryInterface
* @return Collection
*/
public function sharedExpensesByCategory(Carbon $start, Carbon $end);
-}
\ No newline at end of file
+}
diff --git a/app/Http/Middleware/PiggyBanks.php b/app/Http/Middleware/PiggyBanks.php
index 7f273507f3..92ac858ba4 100644
--- a/app/Http/Middleware/PiggyBanks.php
+++ b/app/Http/Middleware/PiggyBanks.php
@@ -136,4 +136,4 @@ class PiggyBanks
return $next($request);
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Middleware/Range.php b/app/Http/Middleware/Range.php
index 3b7cc69bc8..7a5f212bc5 100644
--- a/app/Http/Middleware/Range.php
+++ b/app/Http/Middleware/Range.php
@@ -85,4 +85,4 @@ class Range
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Middleware/Reminders.php b/app/Http/Middleware/Reminders.php
index 2c0c15b046..55c555aec0 100644
--- a/app/Http/Middleware/Reminders.php
+++ b/app/Http/Middleware/Reminders.php
@@ -88,4 +88,4 @@ class Reminders
return $next($request);
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Middleware/ReplaceTestVars.php b/app/Http/Middleware/ReplaceTestVars.php
index 2f48ac76b9..9ad0e7a1ba 100644
--- a/app/Http/Middleware/ReplaceTestVars.php
+++ b/app/Http/Middleware/ReplaceTestVars.php
@@ -54,4 +54,4 @@ class ReplaceTestVars
return $next($request);
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Requests/BillFormRequest.php b/app/Http/Requests/BillFormRequest.php
index 2c1cfdc45a..b3057bc885 100644
--- a/app/Http/Requests/BillFormRequest.php
+++ b/app/Http/Requests/BillFormRequest.php
@@ -46,4 +46,4 @@ class BillFormRequest extends Request
return $rules;
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Requests/BudgetFormRequest.php b/app/Http/Requests/BudgetFormRequest.php
index 591926a969..19c3924417 100644
--- a/app/Http/Requests/BudgetFormRequest.php
+++ b/app/Http/Requests/BudgetFormRequest.php
@@ -37,4 +37,4 @@ class BudgetFormRequest extends Request
'name' => $nameRule,
];
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Requests/CategoryFormRequest.php b/app/Http/Requests/CategoryFormRequest.php
index 30376b4cd8..7b9e577dc0 100644
--- a/app/Http/Requests/CategoryFormRequest.php
+++ b/app/Http/Requests/CategoryFormRequest.php
@@ -37,4 +37,4 @@ class CategoryFormRequest extends Request
'name' => $nameRule,
];
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Requests/CurrencyFormRequest.php b/app/Http/Requests/CurrencyFormRequest.php
index 48fe2146d3..d45716d6d4 100644
--- a/app/Http/Requests/CurrencyFormRequest.php
+++ b/app/Http/Requests/CurrencyFormRequest.php
@@ -42,4 +42,4 @@ class CurrencyFormRequest extends Request
return $rules;
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Requests/JournalFormRequest.php b/app/Http/Requests/JournalFormRequest.php
index 368564896e..82b8f8549e 100644
--- a/app/Http/Requests/JournalFormRequest.php
+++ b/app/Http/Requests/JournalFormRequest.php
@@ -70,4 +70,4 @@ class JournalFormRequest extends Request
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Requests/PiggyBankFormRequest.php b/app/Http/Requests/PiggyBankFormRequest.php
index 50267f2b47..795246c1b8 100644
--- a/app/Http/Requests/PiggyBankFormRequest.php
+++ b/app/Http/Requests/PiggyBankFormRequest.php
@@ -65,4 +65,4 @@ class PiggyBankFormRequest extends Request
return $rules;
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Requests/ProfileFormRequest.php b/app/Http/Requests/ProfileFormRequest.php
index 43cc40da09..0fc12e3377 100644
--- a/app/Http/Requests/ProfileFormRequest.php
+++ b/app/Http/Requests/ProfileFormRequest.php
@@ -31,4 +31,4 @@ class ProfileFormRequest extends Request
'new_password_confirmation' => 'required',
];
}
-}
\ No newline at end of file
+}
diff --git a/app/Providers/FireflyServiceProvider.php b/app/Providers/FireflyServiceProvider.php
index 432da63ab8..923012a4dc 100644
--- a/app/Providers/FireflyServiceProvider.php
+++ b/app/Providers/FireflyServiceProvider.php
@@ -71,4 +71,4 @@ class FireflyServiceProvider extends ServiceProvider
}
-}
\ No newline at end of file
+}
diff --git a/app/Providers/TestingServiceProvider.php b/app/Providers/TestingServiceProvider.php
index ff26c311ca..707c0ddd3f 100644
--- a/app/Providers/TestingServiceProvider.php
+++ b/app/Providers/TestingServiceProvider.php
@@ -25,4 +25,4 @@ class TestingServiceProvider extends ServiceProvider
}
}
-}
\ No newline at end of file
+}
diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php
index c7cd65571d..8a4ec3279e 100644
--- a/app/Repositories/Account/AccountRepository.php
+++ b/app/Repositories/Account/AccountRepository.php
@@ -452,4 +452,4 @@ class AccountRepository implements AccountRepositoryInterface
return $journal;
}
-}
\ No newline at end of file
+}
diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php
index 41de454e63..e948ba01c8 100644
--- a/app/Repositories/Account/AccountRepositoryInterface.php
+++ b/app/Repositories/Account/AccountRepositoryInterface.php
@@ -85,4 +85,4 @@ interface AccountRepositoryInterface
* @return Collection
*/
public function getSavingsAccounts();
-}
\ No newline at end of file
+}
diff --git a/app/Repositories/Bill/BillRepositoryInterface.php b/app/Repositories/Bill/BillRepositoryInterface.php
index 66ce00cf4a..44402cea23 100644
--- a/app/Repositories/Bill/BillRepositoryInterface.php
+++ b/app/Repositories/Bill/BillRepositoryInterface.php
@@ -56,4 +56,4 @@ interface BillRepositoryInterface {
*/
public function scan(Bill $bill, TransactionJournal $journal);
-}
\ No newline at end of file
+}
diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php
index f409b4c063..2c547d1618 100644
--- a/app/Repositories/Budget/BudgetRepository.php
+++ b/app/Repositories/Budget/BudgetRepository.php
@@ -142,4 +142,4 @@ class BudgetRepository implements BudgetRepositoryInterface
}
-}
\ No newline at end of file
+}
diff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.php
index eabda354f3..dce5f21ae4 100644
--- a/app/Repositories/Budget/BudgetRepositoryInterface.php
+++ b/app/Repositories/Budget/BudgetRepositoryInterface.php
@@ -63,4 +63,4 @@ interface BudgetRepositoryInterface
*/
public function getJournals(Budget $budget, LimitRepetition $repetition = null, $take = 50);
-}
\ No newline at end of file
+}
diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php
index cc168bb0b9..437fb2da69 100644
--- a/app/Repositories/Category/CategoryRepository.php
+++ b/app/Repositories/Category/CategoryRepository.php
@@ -58,4 +58,4 @@ class CategoryRepository implements CategoryRepositoryInterface
return $category;
}
-}
\ No newline at end of file
+}
diff --git a/app/Repositories/Category/CategoryRepositoryInterface.php b/app/Repositories/Category/CategoryRepositoryInterface.php
index 5b099eb6c7..7e4871a378 100644
--- a/app/Repositories/Category/CategoryRepositoryInterface.php
+++ b/app/Repositories/Category/CategoryRepositoryInterface.php
@@ -33,4 +33,4 @@ interface CategoryRepositoryInterface
*/
public function update(Category $category, array $data);
-}
\ No newline at end of file
+}
diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php
index 5c3ae40886..a3bde0c535 100644
--- a/app/Repositories/Journal/JournalRepository.php
+++ b/app/Repositories/Journal/JournalRepository.php
@@ -286,4 +286,4 @@ class JournalRepository implements JournalRepositoryInterface
return $journal;
}
-}
\ No newline at end of file
+}
diff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.php
index f083fb9a3e..cf10d0e557 100644
--- a/app/Repositories/Journal/JournalRepositoryInterface.php
+++ b/app/Repositories/Journal/JournalRepositoryInterface.php
@@ -44,4 +44,4 @@ interface JournalRepositoryInterface
* @return mixed
*/
public function update(TransactionJournal $journal, array $data);
-}
\ No newline at end of file
+}
diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php
index b198e75612..3fedcf5871 100644
--- a/app/Repositories/PiggyBank/PiggyBankRepository.php
+++ b/app/Repositories/PiggyBank/PiggyBankRepository.php
@@ -162,4 +162,4 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
return $piggyBank;
}
-}
\ No newline at end of file
+}
diff --git a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php
index f2577e2a4b..13afce327d 100644
--- a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php
+++ b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php
@@ -68,4 +68,4 @@ interface PiggyBankRepositoryInterface
* @return PiggyBank
*/
public function update(PiggyBank $piggyBank, array $data);
-}
\ No newline at end of file
+}
diff --git a/app/Support/Amount.php b/app/Support/Amount.php
index fc6868cf97..115392eb1f 100644
--- a/app/Support/Amount.php
+++ b/app/Support/Amount.php
@@ -166,4 +166,4 @@ class Amount
return $currency;
}
-}
\ No newline at end of file
+}
diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.php
index 2d82dacbf5..99c28470ed 100644
--- a/app/Support/ExpandedForm.php
+++ b/app/Support/ExpandedForm.php
@@ -314,4 +314,4 @@ class ExpandedForm
return $html;
}
-}
\ No newline at end of file
+}
diff --git a/app/Support/Facades/Amount.php b/app/Support/Facades/Amount.php
index 90562d745e..3a8d059ea4 100644
--- a/app/Support/Facades/Amount.php
+++ b/app/Support/Facades/Amount.php
@@ -21,4 +21,4 @@ class Amount extends Facade
return 'amount';
}
-}
\ No newline at end of file
+}
diff --git a/app/Support/Facades/ExpandedForm.php b/app/Support/Facades/ExpandedForm.php
index ee365cc6b0..4757d8e779 100644
--- a/app/Support/Facades/ExpandedForm.php
+++ b/app/Support/Facades/ExpandedForm.php
@@ -21,4 +21,4 @@ class ExpandedForm extends Facade
return 'expandedform';
}
-}
\ No newline at end of file
+}
diff --git a/app/Support/Facades/Navigation.php b/app/Support/Facades/Navigation.php
index 2f0db5c215..86adb38a13 100644
--- a/app/Support/Facades/Navigation.php
+++ b/app/Support/Facades/Navigation.php
@@ -21,4 +21,4 @@ class Navigation extends Facade
return 'navigation';
}
-}
\ No newline at end of file
+}
diff --git a/app/Support/Facades/Preferences.php b/app/Support/Facades/Preferences.php
index a6b1818cef..d7c093c38e 100644
--- a/app/Support/Facades/Preferences.php
+++ b/app/Support/Facades/Preferences.php
@@ -21,4 +21,4 @@ class Preferences extends Facade
return 'preferences';
}
-}
\ No newline at end of file
+}
diff --git a/app/Support/Facades/Steam.php b/app/Support/Facades/Steam.php
index 5bcfe12e30..496975c3be 100644
--- a/app/Support/Facades/Steam.php
+++ b/app/Support/Facades/Steam.php
@@ -21,4 +21,4 @@ class Steam extends Facade
return 'steam';
}
-}
\ No newline at end of file
+}
diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php
index 7c734e3b9d..2ef5c9a4bd 100644
--- a/app/Support/Navigation.php
+++ b/app/Support/Navigation.php
@@ -457,4 +457,4 @@ class Navigation
}
-}
\ No newline at end of file
+}
diff --git a/app/Support/Preferences.php b/app/Support/Preferences.php
index 185fea9512..b12a8fef6a 100644
--- a/app/Support/Preferences.php
+++ b/app/Support/Preferences.php
@@ -55,4 +55,4 @@ class Preferences
return $pref;
}
-}
\ No newline at end of file
+}
diff --git a/app/Support/Search/SearchInterface.php b/app/Support/Search/SearchInterface.php
index 50d7c6ad08..4b58393065 100644
--- a/app/Support/Search/SearchInterface.php
+++ b/app/Support/Search/SearchInterface.php
@@ -45,4 +45,4 @@ interface SearchInterface {
* @return Collection
*/
public function searchTransactions(array $words);
-}
\ No newline at end of file
+}
diff --git a/app/Support/Steam.php b/app/Support/Steam.php
index ce3fbfb1a4..756c11b73d 100644
--- a/app/Support/Steam.php
+++ b/app/Support/Steam.php
@@ -198,4 +198,4 @@ class Steam
return $array;
}
-}
\ No newline at end of file
+}
diff --git a/database/seeds/TestDataSeeder.php b/database/seeds/TestDataSeeder.php
index 4aaaa78e0a..62ee9465bb 100644
--- a/database/seeds/TestDataSeeder.php
+++ b/database/seeds/TestDataSeeder.php
@@ -593,4 +593,4 @@ class TestDataSeeder extends Seeder
}
-}
\ No newline at end of file
+}
From bfe8b14e49cf1f46f8bb9ea97484df5db7f45cd1 Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sun, 29 Mar 2015 08:18:15 +0200
Subject: [PATCH 09/17] Cleaned up.
---
.gitignore | 1 -
app/Models/PiggyBank.php | 1 -
app/Models/PiggyBankRepetition.php | 51 ++++++++++++++++--------------
3 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/.gitignore b/.gitignore
index 42fa21bb5a..62baeeb595 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,7 +3,6 @@
composer.phar
Thumbs.db
.idea/
-.DS_Store
tests/_output/*
_ide_helper.php
/build/logs/clover.xml
diff --git a/app/Models/PiggyBank.php b/app/Models/PiggyBank.php
index 1ca7795fe1..ad1b4fd672 100644
--- a/app/Models/PiggyBank.php
+++ b/app/Models/PiggyBank.php
@@ -45,7 +45,6 @@ class PiggyBank extends Model
return $rep;
} else {
Log::error('Tried to work with a piggy bank with a repeats=1 value! (id is '.$this->id.')');
- //App::abort(500);
}
diff --git a/app/Models/PiggyBankRepetition.php b/app/Models/PiggyBankRepetition.php
index 4474c26e90..6c5c939b16 100644
--- a/app/Models/PiggyBankRepetition.php
+++ b/app/Models/PiggyBankRepetition.php
@@ -1,8 +1,9 @@
belongsTo('FireflyIII\Models\PiggyBank');
}
- /**
- * @param EloquentBuilder $query
- * @param Carbon $date
- *
- * @return mixed
- */
- public function scopeRelevantOnDate(EloquentBuilder $query, Carbon $date)
- {
- return $query->where(
- function($q) use ($date) {
- $q->where('startdate', '<=', $date->format('Y-m-d 00:00:00'));
- $q->orWhereNull('startdate');
- })
-
- ->where(function($q) use ($date) {
-
- $q->where('targetdate', '>=', $date->format('Y-m-d 00:00:00'));
- $q->orWhereNull('targetdate');
- });
- }
-
/**
* @param EloquentBuilder $query
* @param Carbon $start
@@ -57,7 +37,30 @@ class PiggyBankRepetition extends Model
*/
public function scopeOnDates(EloquentBuilder $query, Carbon $start, Carbon $target)
{
- return $query->where('startdate',$start->format('Y-m-d'))->where('targetdate',$target->format('Y-m-d'));
+ return $query->where('startdate', $start->format('Y-m-d'))->where('targetdate', $target->format('Y-m-d'));
+ }
+
+ /**
+ * @param EloquentBuilder $query
+ * @param Carbon $date
+ *
+ * @return mixed
+ */
+ public function scopeRelevantOnDate(EloquentBuilder $query, Carbon $date)
+ {
+ return $query->where(
+ function (EloquentBuilder $q) use ($date) {
+ $q->where('startdate', '<=', $date->format('Y-m-d 00:00:00'));
+ $q->orWhereNull('startdate');
+ }
+ )
+ ->where(
+ function (EloquentBuilder $q) use ($date) {
+
+ $q->where('targetdate', '>=', $date->format('Y-m-d 00:00:00'));
+ $q->orWhereNull('targetdate');
+ }
+ );
}
}
From fb3a26510bb19912da813c34a71475774db23397 Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sun, 29 Mar 2015 08:20:20 +0200
Subject: [PATCH 10/17] Removed some unused use statements.
---
app/Http/Controllers/PreferencesController.php | 1 -
app/Http/Middleware/ReplaceTestVars.php | 1 -
app/Providers/RouteServiceProvider.php | 1 -
3 files changed, 3 deletions(-)
diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php
index b21e81c0bc..298b14d8f5 100644
--- a/app/Http/Controllers/PreferencesController.php
+++ b/app/Http/Controllers/PreferencesController.php
@@ -1,7 +1,6 @@
Date: Sun, 29 Mar 2015 08:20:30 +0200
Subject: [PATCH 11/17] Updated composer.son
---
composer.lock | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/composer.lock b/composer.lock
index f3ef64268f..1a108b872b 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "34e0c28c0f8f4c04b545b2cbb0f2f24b",
+ "hash": "b77b9f717b25e1e193bdc6edb18ad492",
"packages": [
{
"name": "classpreloader/classpreloader",
@@ -682,7 +682,7 @@
},
{
"name": "grumpydictator/gchart",
- "version": "dev-master",
+ "version": "1.0.8",
"source": {
"type": "git",
"url": "https://github.com/JC5/gchart.git",
@@ -950,16 +950,16 @@
},
{
"name": "laravel/framework",
- "version": "v5.0.22",
+ "version": "v5.0.23",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
- "reference": "388289de68ba912746bd1adb20a8b1cd0f846ea1"
+ "reference": "59219f7afb60be05d74ce01fcb5d2440f7a1b13d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/framework/zipball/388289de68ba912746bd1adb20a8b1cd0f846ea1",
- "reference": "388289de68ba912746bd1adb20a8b1cd0f846ea1",
+ "url": "https://api.github.com/repos/laravel/framework/zipball/59219f7afb60be05d74ce01fcb5d2440f7a1b13d",
+ "reference": "59219f7afb60be05d74ce01fcb5d2440f7a1b13d",
"shasum": ""
},
"require": {
@@ -1072,7 +1072,7 @@
"framework",
"laravel"
],
- "time": "2015-03-27 14:49:51"
+ "time": "2015-03-28 16:56:59"
},
{
"name": "league/commonmark",
@@ -2351,7 +2351,7 @@
},
{
"name": "watson/validating",
- "version": "dev-master",
+ "version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/dwightwatson/validating.git",
@@ -3962,8 +3962,6 @@
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
- "grumpydictator/gchart": 20,
- "watson/validating": 20,
"barryvdh/laravel-debugbar": 0
},
"prefer-stable": false,
From a97c267378a1de67622ac45333cc31a79cb78d67 Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sun, 29 Mar 2015 08:20:37 +0200
Subject: [PATCH 12/17] Added new lines
---
resources/views/emails/registered.blade.php | 2 +-
resources/views/form/amount.blade.php | 2 +-
resources/views/form/balance.blade.php | 2 +-
resources/views/form/checkbox.blade.php | 2 +-
resources/views/form/date.blade.php | 2 +-
resources/views/form/feedback.blade.php | 2 +-
resources/views/form/integer.blade.php | 2 +-
resources/views/form/options.blade.php | 2 +-
resources/views/form/select.blade.php | 2 +-
resources/views/form/tags.blade.php | 2 +-
resources/views/form/text.blade.php | 2 +-
resources/views/list/accounts.blade.php | 2 +-
resources/views/list/reminders.blade.php | 2 +-
resources/views/partials/boxes.blade.php | 2 +-
resources/views/partials/date_nav.blade.php | 2 +-
resources/views/related/alreadyRelated.blade.php | 2 +-
resources/views/related/searchResult.blade.php | 2 +-
resources/views/reminders/show.blade.php | 2 +-
resources/views/reports/index.blade.php | 2 +-
resources/views/transactions/index.blade.php | 2 +-
20 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/resources/views/emails/registered.blade.php b/resources/views/emails/registered.blade.php
index 5a58f60f2d..4550f79f9d 100644
--- a/resources/views/emails/registered.blade.php
+++ b/resources/views/emails/registered.blade.php
@@ -2,4 +2,4 @@ Hey there!
Welkome to Firefly III. Your registration has made it, and this email is here to confirm it.
-Thanks for using Firefly!
\ No newline at end of file
+Thanks for using Firefly!
diff --git a/resources/views/form/amount.blade.php b/resources/views/form/amount.blade.php
index c5c10d6050..6f0beb7316 100644
--- a/resources/views/form/amount.blade.php
+++ b/resources/views/form/amount.blade.php
@@ -19,4 +19,4 @@
@include('form.feedback')
{!! Form::input('hidden','amount_currency_id',$defaultCurrency->id) !!}
-
\ No newline at end of file
+
diff --git a/resources/views/form/balance.blade.php b/resources/views/form/balance.blade.php
index 50a834ecb9..34294152a8 100644
--- a/resources/views/form/balance.blade.php
+++ b/resources/views/form/balance.blade.php
@@ -19,4 +19,4 @@
{!! Form::input('hidden','balance_currency_id',$defaultCurrency->id) !!}
-
\ No newline at end of file
+
diff --git a/resources/views/form/checkbox.blade.php b/resources/views/form/checkbox.blade.php
index 038bac2dc5..cfe415d73d 100644
--- a/resources/views/form/checkbox.blade.php
+++ b/resources/views/form/checkbox.blade.php
@@ -8,4 +8,4 @@
@include('form.feedback')
-
\ No newline at end of file
+
diff --git a/resources/views/form/date.blade.php b/resources/views/form/date.blade.php
index 71ab250e1a..58c3c1e5e3 100644
--- a/resources/views/form/date.blade.php
+++ b/resources/views/form/date.blade.php
@@ -4,4 +4,4 @@
{!! Form::input('date', $name, $value, $options) !!}
@include('form.feedback')
-
\ No newline at end of file
+
diff --git a/resources/views/form/feedback.blade.php b/resources/views/form/feedback.blade.php
index d3f62af36d..5b26fa2fb7 100644
--- a/resources/views/form/feedback.blade.php
+++ b/resources/views/form/feedback.blade.php
@@ -1,4 +1,4 @@
@if($errors->has($name))
{{{$errors->first($name)}}}
-@endif
\ No newline at end of file
+@endif
diff --git a/resources/views/form/integer.blade.php b/resources/views/form/integer.blade.php
index cfd93a09c2..9b84d9626f 100644
--- a/resources/views/form/integer.blade.php
+++ b/resources/views/form/integer.blade.php
@@ -6,4 +6,4 @@
@include('form.feedback')
-
\ No newline at end of file
+
diff --git a/resources/views/form/options.blade.php b/resources/views/form/options.blade.php
index 1cbcae442e..eb17637f38 100644
--- a/resources/views/form/options.blade.php
+++ b/resources/views/form/options.blade.php
@@ -70,4 +70,4 @@
-@endif
\ No newline at end of file
+@endif
diff --git a/resources/views/form/select.blade.php b/resources/views/form/select.blade.php
index 6b5e8a2012..127ef8849f 100644
--- a/resources/views/form/select.blade.php
+++ b/resources/views/form/select.blade.php
@@ -5,4 +5,4 @@
@include('form.feedback')
-
\ No newline at end of file
+
diff --git a/resources/views/form/tags.blade.php b/resources/views/form/tags.blade.php
index d9d0c31bd2..ba7b06c800 100644
--- a/resources/views/form/tags.blade.php
+++ b/resources/views/form/tags.blade.php
@@ -4,4 +4,4 @@
{!! Form::input('text', $name, $value, $options) !!}
@include('form.feedback')
-
\ No newline at end of file
+
diff --git a/resources/views/form/text.blade.php b/resources/views/form/text.blade.php
index d9d0c31bd2..ba7b06c800 100644
--- a/resources/views/form/text.blade.php
+++ b/resources/views/form/text.blade.php
@@ -4,4 +4,4 @@
{!! Form::input('text', $name, $value, $options) !!}
@include('form.feedback')
-
\ No newline at end of file
+
diff --git a/resources/views/list/accounts.blade.php b/resources/views/list/accounts.blade.php
index c4348e456a..11f60e0eea 100644
--- a/resources/views/list/accounts.blade.php
+++ b/resources/views/list/accounts.blade.php
@@ -56,4 +56,4 @@
@if(is_object($accounts) && method_exists($accounts, 'render'))
{!! $accounts->render() !!}
-@endif
\ No newline at end of file
+@endif
diff --git a/resources/views/list/reminders.blade.php b/resources/views/list/reminders.blade.php
index 23b3c5ea56..f8e1510aae 100644
--- a/resources/views/list/reminders.blade.php
+++ b/resources/views/list/reminders.blade.php
@@ -42,4 +42,4 @@
@endif
-
\ No newline at end of file
+
diff --git a/resources/views/partials/boxes.blade.php b/resources/views/partials/boxes.blade.php
index 2197bf8a8d..4c6b947770 100644
--- a/resources/views/partials/boxes.blade.php
+++ b/resources/views/partials/boxes.blade.php
@@ -89,4 +89,4 @@
-
\ No newline at end of file
+
diff --git a/resources/views/partials/date_nav.blade.php b/resources/views/partials/date_nav.blade.php
index feeab074ea..28c2838b25 100644
--- a/resources/views/partials/date_nav.blade.php
+++ b/resources/views/partials/date_nav.blade.php
@@ -28,4 +28,4 @@
---}}
\ No newline at end of file
+--}}
diff --git a/resources/views/related/alreadyRelated.blade.php b/resources/views/related/alreadyRelated.blade.php
index 6fdc642501..0940d7a770 100644
--- a/resources/views/related/alreadyRelated.blade.php
+++ b/resources/views/related/alreadyRelated.blade.php
@@ -60,4 +60,4 @@
@else
No related transactions
-@endif
\ No newline at end of file
+@endif
diff --git a/resources/views/related/searchResult.blade.php b/resources/views/related/searchResult.blade.php
index a3f9b54964..4d267a9e38 100644
--- a/resources/views/related/searchResult.blade.php
+++ b/resources/views/related/searchResult.blade.php
@@ -36,4 +36,4 @@
@else
No results
-@endif
\ No newline at end of file
+@endif
diff --git a/resources/views/reminders/show.blade.php b/resources/views/reminders/show.blade.php
index ec1811100d..8ab199dc59 100644
--- a/resources/views/reminders/show.blade.php
+++ b/resources/views/reminders/show.blade.php
@@ -35,4 +35,4 @@
-@stop
\ No newline at end of file
+@stop
diff --git a/resources/views/reports/index.blade.php b/resources/views/reports/index.blade.php
index b90f7289c6..4ef2851baa 100644
--- a/resources/views/reports/index.blade.php
+++ b/resources/views/reports/index.blade.php
@@ -70,4 +70,4 @@
@stop
@section('scripts')
-@stop
\ No newline at end of file
+@stop
diff --git a/resources/views/transactions/index.blade.php b/resources/views/transactions/index.blade.php
index 39b018c9dd..98bdb293c6 100644
--- a/resources/views/transactions/index.blade.php
+++ b/resources/views/transactions/index.blade.php
@@ -21,4 +21,4 @@
-@stop
\ No newline at end of file
+@stop
From f254674f88240e1d4e50efdaeca6f2e11606df4e Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sun, 29 Mar 2015 08:21:33 +0200
Subject: [PATCH 13/17] Add newlines.
---
.coveralls.yml | 2 +-
.gitignore | 2 +-
phpspec.yml | 2 +-
phpunit.xml | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.coveralls.yml b/.coveralls.yml
index 0c2d3ece9c..06571ec196 100644
--- a/.coveralls.yml
+++ b/.coveralls.yml
@@ -1,3 +1,3 @@
src_dir: .
coverage_clover: storage/coverage/clover.xml
-json_path: storage/coverage/coveralls-upload.json
\ No newline at end of file
+json_path: storage/coverage/coveralls-upload.json
diff --git a/.gitignore b/.gitignore
index 62baeeb595..ba4e29123f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,4 +26,4 @@ db.sqlite-journal
tests/_output/*
.env
clover.xml
-node_modules/
\ No newline at end of file
+node_modules/
diff --git a/phpspec.yml b/phpspec.yml
index a028599425..1f6a86a520 100644
--- a/phpspec.yml
+++ b/phpspec.yml
@@ -2,4 +2,4 @@ suites:
main:
namespace: FireflyIII
psr4_prefix: FireflyIII
- src_path: app
\ No newline at end of file
+ src_path: app
diff --git a/phpunit.xml b/phpunit.xml
index f21afb4ffc..0410acac89 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -31,4 +31,4 @@
-
\ No newline at end of file
+
From 4c8bc49a7e12f159dc902f8046ba9dc039547a73 Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sun, 29 Mar 2015 08:22:48 +0200
Subject: [PATCH 14/17] Add newlines.
---
storage/.gitignore | 2 +-
storage/app/.gitignore | 2 +-
storage/debugbar/.gitignore | 2 +-
storage/framework/cache/.gitignore | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/storage/.gitignore b/storage/.gitignore
index 78eac7b62a..4ca7e82b3a 100644
--- a/storage/.gitignore
+++ b/storage/.gitignore
@@ -1 +1 @@
-laravel.log
\ No newline at end of file
+laravel.log
diff --git a/storage/app/.gitignore b/storage/app/.gitignore
index c96a04f008..d6b7ef32c8 100644
--- a/storage/app/.gitignore
+++ b/storage/app/.gitignore
@@ -1,2 +1,2 @@
*
-!.gitignore
\ No newline at end of file
+!.gitignore
diff --git a/storage/debugbar/.gitignore b/storage/debugbar/.gitignore
index c96a04f008..d6b7ef32c8 100644
--- a/storage/debugbar/.gitignore
+++ b/storage/debugbar/.gitignore
@@ -1,2 +1,2 @@
*
-!.gitignore
\ No newline at end of file
+!.gitignore
diff --git a/storage/framework/cache/.gitignore b/storage/framework/cache/.gitignore
index c96a04f008..d6b7ef32c8 100644
--- a/storage/framework/cache/.gitignore
+++ b/storage/framework/cache/.gitignore
@@ -1,2 +1,2 @@
*
-!.gitignore
\ No newline at end of file
+!.gitignore
From a7501c396fe1917d5673fee57fd5237d7c79bc2b Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sun, 29 Mar 2015 08:24:56 +0200
Subject: [PATCH 15/17] Renamed some methods.
---
app/Http/Controllers/HelpController.php | 8 +++---
app/Http/Controllers/ProfileController.php | 4 +--
.../Account/AccountRepository.php | 26 +++++++++----------
3 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/app/Http/Controllers/HelpController.php b/app/Http/Controllers/HelpController.php
index c2057ccb7f..5c03c30456 100644
--- a/app/Http/Controllers/HelpController.php
+++ b/app/Http/Controllers/HelpController.php
@@ -32,7 +32,7 @@ class HelpController extends Controller
return Response::json($content);
}
- if ($this->_inCache($route)) {
+ if ($this->inCache($route)) {
$content = [
'text' => Cache::get('help.' . $route . '.text'),
'title' => Cache::get('help.' . $route . '.title'),
@@ -40,7 +40,7 @@ class HelpController extends Controller
return Response::json($content);
}
- $content = $this->_getFromGithub($route);
+ $content = $this->getFromGithub($route);
Cache::put('help.' . $route . '.text', $content['text'], 10080); // a week.
@@ -55,7 +55,7 @@ class HelpController extends Controller
*
* @return bool
*/
- protected function _inCache($route)
+ protected function inCache($route)
{
return Cache::has('help.' . $route . '.title') && Cache::has('help.' . $route . '.text');
}
@@ -65,7 +65,7 @@ class HelpController extends Controller
*
* @return array
*/
- protected function _getFromGithub($route)
+ protected function getFromGithub($route)
{
$uri = 'https://raw.githubusercontent.com/JC5/firefly-iii-help/master/' . e($route) . '.md';
$content = [
diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php
index e9e6daadef..a74e6a0960 100644
--- a/app/Http/Controllers/ProfileController.php
+++ b/app/Http/Controllers/ProfileController.php
@@ -45,7 +45,7 @@ class ProfileController extends Controller
return Redirect::route('change-password');
}
- $result = $this->_validatePassword($request->get('current_password'), $request->get('new_password'), $request->get('new_password_confirmation'));
+ $result = $this->validatePassword($request->get('current_password'), $request->get('new_password'), $request->get('new_password_confirmation'));
if (!($result === true)) {
Session::flash('error', $result);
@@ -70,7 +70,7 @@ class ProfileController extends Controller
*
* @return string|bool
*/
- protected function _validatePassword($old, $new1, $new2)
+ protected function validatePassword($old, $new1, $new2)
{
if (strlen($new1) == 0 || strlen($new2) == 0) {
return 'Do fill in a password!';
diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php
index 8a4ec3279e..6ea2ec97a8 100644
--- a/app/Repositories/Account/AccountRepository.php
+++ b/app/Repositories/Account/AccountRepository.php
@@ -201,8 +201,8 @@ class AccountRepository implements AccountRepositoryInterface
*/
public function store(array $data)
{
- $newAccount = $this->_store($data);
- $this->_storeMetadata($newAccount, $data);
+ $newAccount = $this->storeAccount($data);
+ $this->storeMetadata($newAccount, $data);
// continue with the opposing account:
@@ -214,8 +214,8 @@ class AccountRepository implements AccountRepositoryInterface
'name' => $data['name'] . ' initial balance',
'active' => false,
];
- $opposing = $this->_store($opposingData);
- $this->_storeInitialBalance($newAccount, $opposing, $data);
+ $opposing = $this->storeAccount($opposingData);
+ $this->storeInitialBalance($newAccount, $opposing, $data);
}
@@ -235,7 +235,7 @@ class AccountRepository implements AccountRepositoryInterface
$account->save();
// update meta data:
- $this->_updateMetadata($account, $data);
+ $this->updateMetadata($account, $data);
$openingBalance = $this->openingBalanceTransaction($account);
@@ -244,7 +244,7 @@ class AccountRepository implements AccountRepositoryInterface
// if opening balance, do an update:
if ($openingBalance) {
// update existing opening balance.
- $this->_updateInitialBalance($account, $openingBalance, $data);
+ $this->updateInitialBalance($account, $openingBalance, $data);
} else {
// create new opening balance.
$type = $data['openingBalance'] < 0 ? 'expense' : 'revenue';
@@ -254,8 +254,8 @@ class AccountRepository implements AccountRepositoryInterface
'name' => $data['name'] . ' initial balance',
'active' => false,
];
- $opposing = $this->_store($opposingData);
- $this->_storeInitialBalance($account, $opposing, $data);
+ $opposing = $this->storeAccount($opposingData);
+ $this->storeInitialBalance($account, $opposing, $data);
}
} else {
@@ -274,7 +274,7 @@ class AccountRepository implements AccountRepositoryInterface
*
* @return Account
*/
- protected function _store(array $data)
+ protected function storeAccount(array $data)
{
$type = Config::get('firefly.accountTypeByIdentifier.' . $data['accountType']);
$accountType = AccountType::whereType($type)->first();
@@ -306,7 +306,7 @@ class AccountRepository implements AccountRepositoryInterface
* @param Account $account
* @param array $data
*/
- protected function _storeMetadata(Account $account, array $data)
+ protected function storeMetadata(Account $account, array $data)
{
$metaData = new AccountMeta(
[
@@ -328,7 +328,7 @@ class AccountRepository implements AccountRepositoryInterface
*
* @return TransactionJournal
*/
- protected function _storeInitialBalance(Account $account, Account $opposing, array $data)
+ protected function storeInitialBalance(Account $account, Account $opposing, array $data)
{
$type = $data['openingBalance'] < 0 ? 'Withdrawal' : 'Deposit';
$transactionType = TransactionType::whereType($type)->first();
@@ -397,7 +397,7 @@ class AccountRepository implements AccountRepositoryInterface
* @param Account $account
* @param array $data
*/
- protected function _updateMetadata(Account $account, array $data)
+ protected function updateMetadata(Account $account, array $data)
{
$metaEntries = $account->accountMeta()->get();
$updated = false;
@@ -434,7 +434,7 @@ class AccountRepository implements AccountRepositoryInterface
*
* @return TransactionJournal
*/
- protected function _updateInitialBalance(Account $account, TransactionJournal $journal, array $data)
+ protected function updateInitialBalance(Account $account, TransactionJournal $journal, array $data)
{
$journal->date = $data['openingBalanceDate'];
From 463201df2c048565977eca5872000ef6689a5827 Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sun, 29 Mar 2015 08:43:03 +0200
Subject: [PATCH 16/17] New gitignore.
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index ba4e29123f..71dfa14632 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,4 @@ tests/_output/*
.env
clover.xml
node_modules/
+addNewLines.php
From 6e3f6abc6771b0a5e216e117f3de8bcb95c7835d Mon Sep 17 00:00:00 2001
From: James Cole
Date: Sun, 29 Mar 2015 08:43:46 +0200
Subject: [PATCH 17/17] New read me.
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 488176f9dd..033f8f3f0c 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-Firefly III (v3.3.4)
+Firefly III (v3.3.5)
===========
[](https://travis-ci.org/JC5/firefly-iii)