Skip to content

Firefly III: a personal finances manager

More spelling checks and small clean ups.

James Cole3386c8b455e9
diff --git a/app/lib/FireflyIII/Database/Account/Account.php b/app/lib/FireflyIII/Database/Account/Account.php
index 1318bc040d..e4facd4374 100644
--- a/app/lib/FireflyIII/Database/Account/Account.php
+++ b/app/lib/FireflyIII/Database/Account/Account.php
@@ -514,14 +514,14 @@ class Account implements CUD, CommonDatabaseCalls, AccountInterface
*/
public function firstExpenseAccountOrCreate($name)
{
- /** @var \FireflyIII\Database\AccountType\AccountType $accountTypeRepos */
- $accountTypeRepos = \App::make('FireflyIII\Database\AccountType\AccountType');
+ /** @var \FireflyIII\Database\AccountType\AccountType $accountTypeRepository */
+ $accountTypeRepository = \App::make('FireflyIII\Database\AccountType\AccountType');
- $accountType = $accountTypeRepos->findByWhat('expense');
+ $accountType = $accountTypeRepository->findByWhat('expense');
// if name is "", find cash account:
if (strlen($name) == 0) {
- $cashAccountType = $accountTypeRepos->findByWhat('cash');
+ $cashAccountType = $accountTypeRepository->findByWhat('cash');
// find or create cash account:
return \Account::firstOrCreate(
@@ -543,10 +543,10 @@ class Account implements CUD, CommonDatabaseCalls, AccountInterface
*/
public function firstRevenueAccountOrCreate($name)
{
- /** @var \FireflyIII\Database\AccountType\AccountType $accountTypeRepos */
- $accountTypeRepos = \App::make('FireflyIII\Database\AccountType\AccountType');
+ /** @var \FireflyIII\Database\AccountType\AccountType $accountTypeRepository */
+ $accountTypeRepository = \App::make('FireflyIII\Database\AccountType\AccountType');
- $accountType = $accountTypeRepos->findByWhat('revenue');
+ $accountType = $accountTypeRepository->findByWhat('revenue');
$data = ['user_id' => $this->getUser()->id, 'account_type_id' => $accountType->id, 'name' => $name, 'active' => 1];
diff --git a/app/lib/FireflyIII/Database/Budget/Budget.php b/app/lib/FireflyIII/Database/Budget/Budget.php
index 5dfe0d862d..86f9a9c96c 100644
--- a/app/lib/FireflyIII/Database/Budget/Budget.php
+++ b/app/lib/FireflyIII/Database/Budget/Budget.php
@@ -237,7 +237,7 @@ class Budget implements CUD, CommonDatabaseCalls, BudgetInterface
}
/**
- * This method includes the time because otherwise, SQLite doesn't understand it.
+ * This method includes the time because otherwise, SQLite does not understand it.
*
* @param \Budget $budget
* @param Carbon $date
diff --git a/app/lib/FireflyIII/Database/TransactionCurrency/TransactionCurrency.php b/app/lib/FireflyIII/Database/TransactionCurrency/TransactionCurrency.php
index 887f792656..0c1360aa97 100644
--- a/app/lib/FireflyIII/Database/TransactionCurrency/TransactionCurrency.php
+++ b/app/lib/FireflyIII/Database/TransactionCurrency/TransactionCurrency.php
@@ -94,6 +94,7 @@ class TransactionCurrency implements TransactionCurrencyInterface, CommonDatabas
* Returns an object with id $id.
*
* @param int $objectId
+ * @throws NotImplementedException
*
* @return \Eloquent
*/
@@ -107,6 +108,7 @@ class TransactionCurrency implements TransactionCurrencyInterface, CommonDatabas
* Finds an account type using one of the "$what"'s: expense, asset, revenue, opening, etc.
*
* @param $what
+ * @throws NotImplementedException
*
* @return \AccountType|null
*/
@@ -128,6 +130,7 @@ class TransactionCurrency implements TransactionCurrencyInterface, CommonDatabas
/**
* @param array $objectIds
+ * @throws NotImplementedException
*
* @return Collection
*/
diff --git a/app/lib/FireflyIII/Database/TransactionJournal/TransactionJournal.php b/app/lib/FireflyIII/Database/TransactionJournal/TransactionJournal.php
index 0daa0aa27b..ab476a09b6 100644
--- a/app/lib/FireflyIII/Database/TransactionJournal/TransactionJournal.php
+++ b/app/lib/FireflyIII/Database/TransactionJournal/TransactionJournal.php
@@ -590,8 +590,8 @@ class TransactionJournal implements TransactionJournalInterface, CUD, CommonData
// get already related transactions:
$exclude = [$journal->id];
foreach ($journal->transactiongroups()->get() as $group) {
- foreach ($group->transactionjournals() as $jrnl) {
- $exclude[] = $jrnl->id;
+ foreach ($group->transactionjournals() as $current) {
+ $exclude[] = $current->id;
}
}
$exclude = array_unique($exclude);
diff --git a/app/lib/FireflyIII/Event/Piggybank.php b/app/lib/FireflyIII/Event/Piggybank.php
index dedfa0f2e8..52ca7e727b 100644
--- a/app/lib/FireflyIII/Event/Piggybank.php
+++ b/app/lib/FireflyIII/Event/Piggybank.php
@@ -203,7 +203,7 @@ class PiggyBank
$repetition->currentamount = 0;
$repetition->save();
}
- // then continue and do something in the current relevant timeframe.
+ // then continue and do something in the current relevant time frame.
$currentTarget = clone $target;
$currentStart = null;
diff --git a/app/lib/FireflyIII/Report/Report.php b/app/lib/FireflyIII/Report/Report.php
index f6fe78c975..708a84a47e 100644
--- a/app/lib/FireflyIII/Report/Report.php
+++ b/app/lib/FireflyIII/Report/Report.php
@@ -34,6 +34,7 @@ class Report implements ReportInterface
/**
* @param AccountRepository $accounts
+ * @param JournalRepository $journals
*/
public function __construct(AccountRepository $accounts, JournalRepository $journals)
{
diff --git a/app/lib/FireflyIII/Report/ReportHelper.php b/app/lib/FireflyIII/Report/ReportHelper.php
index 354cf4c174..feea4ad0fb 100644
--- a/app/lib/FireflyIII/Report/ReportHelper.php
+++ b/app/lib/FireflyIII/Report/ReportHelper.php
@@ -45,7 +45,7 @@ class ReportHelper implements ReportHelperInterface
/**
* Turns a collection into an array. Needs the field 'id' for the key,
- * and saves only 'name' and 'amount' as a subarray.
+ * and saves only 'name' and 'amount' as a sub array.
*
* @param Collection $collection
*
diff --git a/app/lib/FireflyIII/Report/ReportHelperInterface.php b/app/lib/FireflyIII/Report/ReportHelperInterface.php
index 111d1ac348..80dcd648e6 100644
--- a/app/lib/FireflyIII/Report/ReportHelperInterface.php
+++ b/app/lib/FireflyIII/Report/ReportHelperInterface.php
@@ -25,7 +25,7 @@ interface ReportHelperInterface
/**
* Turns a collection into an array. Needs the field 'id' for the key,
- * and saves 'name', 'amount','spent' (if present) as a subarray.
+ * and saves 'name', 'amount','spent' (if present) as a sub array.
*
* @param Collection $collection
*
diff --git a/app/lib/FireflyIII/Shared/Toolkit/Navigation.php b/app/lib/FireflyIII/Shared/Toolkit/Navigation.php
index 003735942f..b9c7db5bde 100644
--- a/app/lib/FireflyIII/Shared/Toolkit/Navigation.php
+++ b/app/lib/FireflyIII/Shared/Toolkit/Navigation.php
@@ -55,7 +55,7 @@ class Navigation
$start = \Session::get('start', Carbon::now()->startOfMonth());
/*
- * Substract some period to $start.
+ * Subtract some period to $start.
*/
$prev = $filter->previous($range, clone $start);
diff --git a/app/models/Piggybank.php b/app/models/Piggybank.php
index 1af7da7e37..e2831b0189 100644
--- a/app/models/Piggybank.php
+++ b/app/models/Piggybank.php
@@ -1,6 +1,7 @@
<?php
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model as Eloquent;
+use Illuminate\Database\Eloquent\SoftDeletingTrait;
use Watson\Validating\ValidatingTrait;
/**
@@ -8,7 +9,7 @@ use Watson\Validating\ValidatingTrait;
*/
class PiggyBank extends Eloquent
{
- use ValidatingTrait;
+ use ValidatingTrait, SoftDeletingTrait;
public $fillable
= ['account_id', 'name', 'targetamount', 'startdate', 'targetdate', 'repeats', 'rep_length', 'rep_every', 'rep_times', 'reminder', 'reminder_skip',
'remind_me', 'order'];