Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Some small fixes.
James Colec15c45f76532
diff --git a/app/Generator/Chart/Category/GoogleCategoryChartGenerator.php b/app/Generator/Chart/Category/GoogleCategoryChartGenerator.phpindex 6100358927..b6187f64ed 100644--- a/app/Generator/Chart/Category/GoogleCategoryChartGenerator.php+++ b/app/Generator/Chart/Category/GoogleCategoryChartGenerator.php@@ -81,6 +81,7 @@ class GoogleCategoryChartGenerator implements CategoryChartGenerator}/**+ * @param Collection $categories* @param Collection $entries** @return arraydiff --git a/app/Providers/FireflyServiceProvider.php b/app/Providers/FireflyServiceProvider.phpindex 40d92b23aa..0779ef1a06 100644--- a/app/Providers/FireflyServiceProvider.php+++ b/app/Providers/FireflyServiceProvider.php@@ -104,7 +104,8 @@ class FireflyServiceProvider extends ServiceProvider//$this->app->bind('FireflyIII\Generator\Chart\Category\CategoryChartGenerator', 'FireflyIII\Generator\Chart\Category\GoogleCategoryChartGenerator');$this->app->bind('FireflyIII\Generator\Chart\Category\CategoryChartGenerator', 'FireflyIII\Generator\Chart\Category\ChartJsCategoryChartGenerator');- //$this->app->bind('FireflyIII\Generator\Chart\PiggyBank\PiggyBankChartGenerator', 'FireflyIII\Generator\Chart\PiggyBank\GooglePiggyBankChartGenerator');+ //$this->app->bind('FireflyIII\Generator\Chart\PiggyBank\PiggyBankChartGenerator',+ // 'FireflyIII\Generator\Chart\PiggyBank\GooglePiggyBankChartGenerator');$this->app->bind('FireflyIII\Generator\Chart\PiggyBank\PiggyBankChartGenerator', 'FireflyIII\Generator\Chart\PiggyBank\ChartJsPiggyBankChartGenerator');//$this->app->bind('FireflyIII\Generator\Chart\Report\ReportChartGenerator', 'FireflyIII\Generator\Chart\Report\GoogleReportChartGenerator');diff --git a/database/seeds/TestDataSeeder.php b/database/seeds/TestDataSeeder.phpindex 990c9a4554..8ce3c8280e 100644--- a/database/seeds/TestDataSeeder.php+++ b/database/seeds/TestDataSeeder.php@@ -528,9 +528,10 @@ class TestDataSeeder extends Seeder}/**- * @param $tag+ * @param $tagName** @return Tag|null+ * @internal param $tag*/protected function findTag($tagName){diff --git a/tests/helpers/ReportQueryTest.php b/tests/helpers/ReportQueryTest.phpindex 5c413debde..a7451c5319 100644--- a/tests/helpers/ReportQueryTest.php+++ b/tests/helpers/ReportQueryTest.php@@ -3,7 +3,6 @@use Carbon\Carbon;use FireflyIII\Helpers\Report\ReportQuery;use FireflyIII\Models\AccountMeta;-use FireflyIII\Models\Transaction;use League\FactoryMuffin\Facade as FactoryMuffin;/**@@ -81,22 +80,20 @@ class ReportQueryTest extends TestCase);$amount = 100;- if($i == 8) {+ if ($i == 8) {$amount = 0; // at least one "empty" journal.}// update both transactions$journal->transactions[0]->account_id = $account1->id;- $journal->transactions[0]->amount = $amount * -1;+ $journal->transactions[0]->amount = $amount * -1;$journal->transactions[0]->save();$journal->transactions[1]->account_id = $account2->id;- $journal->transactions[1]->amount = $amount;+ $journal->transactions[1]->amount = $amount;$journal->transactions[1]->save();--}$this->be($user);@@ -151,17 +148,17 @@ class ReportQueryTest extends TestCase);$amount = 100;- if($i == 8) {+ if ($i == 8) {$amount = 0; // at least one "empty" journal.}// update both transactions$journal->transactions[0]->account_id = $account1->id;- $journal->transactions[0]->amount = $amount * -1;+ $journal->transactions[0]->amount = $amount * -1;$journal->transactions[0]->save();$journal->transactions[1]->account_id = $account2->id;- $journal->transactions[1]->amount = $amount;+ $journal->transactions[1]->amount = $amount;$journal->transactions[1]->save();}@@ -271,17 +268,17 @@ class ReportQueryTest extends TestCase);$amount = 100;- if($i == 8) {+ if ($i == 8) {$amount = 0; // at least one "empty" journal.}// update both transactions$journal->transactions[0]->account_id = $account1->id;- $journal->transactions[0]->amount = $amount;+ $journal->transactions[0]->amount = $amount;$journal->transactions[0]->save();$journal->transactions[1]->account_id = $account2->id;- $journal->transactions[1]->amount = $amount * -1;+ $journal->transactions[1]->amount = $amount * -1;$journal->transactions[1]->save();}@@ -337,17 +334,17 @@ class ReportQueryTest extends TestCase);$amount = 100;- if($i == 8) {+ if ($i == 8) {$amount = 0; // at least one "empty" journal.}// update both transactions$journal->transactions[0]->account_id = $account1->id;- $journal->transactions[0]->amount = $amount * -1;+ $journal->transactions[0]->amount = $amount * -1;$journal->transactions[0]->save();$journal->transactions[1]->account_id = $account2->id;- $journal->transactions[1]->amount = $amount;+ $journal->transactions[1]->amount = $amount;$journal->transactions[1]->save();}diff --git a/tests/repositories/JournalRepositoryTest.php b/tests/repositories/JournalRepositoryTest.phpindex b30d9993a1..92dc3596f4 100644--- a/tests/repositories/JournalRepositoryTest.php+++ b/tests/repositories/JournalRepositoryTest.php@@ -80,20 +80,21 @@ class JournalRepositoryTest extends TestCase$withdrawal = FactoryMuffin::create('FireflyIII\Models\TransactionType'); // withdrawal// create five journals with incrementing dates:- $today = new Carbon('2015-01-01');- for($i=0;$i<5;$i++) {+ $today = new Carbon('2015-01-01');+ $journal = null;+ for ($i = 0; $i < 5; $i++) {// create journal:- $journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');+ $journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');$journal->transaction_type_id = $withdrawal;- $journal->date = $today;+ $journal->date = $today;$journal->save();// update transactions:- $journal->transactions[0]->amount = -100;+ $journal->transactions[0]->amount = -100;$journal->transactions[0]->account_id = $asset->id;$journal->transactions[0]->save();- $journal->transactions[1]->amount = 100;+ $journal->transactions[1]->amount = 100;$journal->transactions[1]->account_id = $expense->id;$journal->transactions[1]->save();@@ -102,7 +103,7 @@ class JournalRepositoryTest extends TestCase}- $before = $this->object->getAmountBefore($journal, $journal->transactions[1]);+ $before = $this->object->getAmountBefore($journal, $journal->transactions[1]);// five transactions, we check the last one, so amount should be 400.$this->assertEquals(400, $before);}