Skip to content

Firefly III: a personal finances manager

Various code cleanup things.

James Coleef6ef57e67d8
diff --git a/app/Export/Exporter/BasicExporter.php b/app/Export/Exporter/BasicExporter.php
index 4366415d81..04f2002724 100644
--- a/app/Export/Exporter/BasicExporter.php
+++ b/app/Export/Exporter/BasicExporter.php
@@ -23,7 +23,7 @@ class BasicExporter
{
/** @var ExportJob */
protected $job;
- private $entries;
+ private $entries;
/**
* BasicExporter constructor.
diff --git a/app/Helpers/Collection/Budget.php b/app/Helpers/Collection/Budget.php
index f7fad282f2..92d864eb06 100644
--- a/app/Helpers/Collection/Budget.php
+++ b/app/Helpers/Collection/Budget.php
@@ -45,7 +45,7 @@ class Budget
*/
public function addBudgeted(string $add)
{
- $add = strval(round($add, 2));
+ $add = strval(round($add, 2));
$this->budgeted = bcadd($this->budgeted, $add);
}
@@ -54,7 +54,7 @@ class Budget
*/
public function addLeft(string $add)
{
- $add = strval(round($add, 2));
+ $add = strval(round($add, 2));
$this->left = bcadd($this->left, $add);
}
@@ -63,7 +63,7 @@ class Budget
*/
public function addOverspent(string $add)
{
- $add = strval(round($add, 2));
+ $add = strval(round($add, 2));
$this->overspent = bcadd($this->overspent, $add);
}
@@ -72,7 +72,7 @@ class Budget
*/
public function addSpent(string $add)
{
- $add = strval(round($add, 2));
+ $add = strval(round($add, 2));
$this->spent = bcadd($this->spent, $add);
}
diff --git a/app/Helpers/Collection/Category.php b/app/Helpers/Collection/Category.php
index df337c5773..b8196fe05a 100644
--- a/app/Helpers/Collection/Category.php
+++ b/app/Helpers/Collection/Category.php
@@ -46,7 +46,7 @@ class Category
*/
public function addTotal(string $add)
{
- $add = strval(round($add, 2));
+ $add = strval(round($add, 2));
$this->total = bcadd($this->total, $add);
}
diff --git a/app/Helpers/Collection/Income.php b/app/Helpers/Collection/Income.php
index b2ff2bd52f..17017e5129 100644
--- a/app/Helpers/Collection/Income.php
+++ b/app/Helpers/Collection/Income.php
@@ -57,7 +57,7 @@ class Income
*/
public function addToTotal(string $add)
{
- $add = strval(round($add, 2));
+ $add = strval(round($add, 2));
$this->total = bcadd($this->total, $add);
}
diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php
index ef2f8bd2f9..4ebb97f2a4 100644
--- a/app/Http/Controllers/AccountController.php
+++ b/app/Http/Controllers/AccountController.php
@@ -151,7 +151,7 @@ class AccountController extends Controller
*/
public function index(ARI $repository, string $what)
{
- $what = $what ?? 'asset';
+ $what = $what ?? 'asset';
$subTitle = trans('firefly.' . $what . '_accounts');
$subTitleIcon = Config::get('firefly.subIconsByIdentifier.' . $what);
diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php
index e345ebc3c2..c380af181f 100644
--- a/app/Http/Controllers/AttachmentController.php
+++ b/app/Http/Controllers/AttachmentController.php
@@ -6,7 +6,6 @@ namespace FireflyIII\Http\Controllers;
use Crypt;
use File;
use FireflyIII\Exceptions\FireflyException;
-use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
use FireflyIII\Http\Requests\AttachmentFormRequest;
use FireflyIII\Models\Attachment;
use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface;
@@ -72,7 +71,7 @@ class AttachmentController extends Controller
}
/**
- * @param Attachment $attachment
+ * @param Attachment $attachment
*
* @throws FireflyException
*
diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php
index 04a1c7060e..482af8f2fb 100644
--- a/app/Http/Controllers/PreferencesController.php
+++ b/app/Http/Controllers/PreferencesController.php
@@ -38,7 +38,7 @@ class PreferencesController extends Controller
$domain = $this->getDomain();
$secret = $google2fa->generateSecretKey(16, Auth::user()->id);
Session::flash('two-factor-secret', $secret);
- $image = $google2fa->getQRCodeInline('Firefly III at ' . $domain, null, $secret, 150);
+ $image = $google2fa->getQRCodeInline('Firefly III at ' . $domain, null, $secret, 150);
return view('preferences.code', compact('image'));
diff --git a/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php b/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php
index 618283794b..a918d515b4 100644
--- a/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php
+++ b/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php
@@ -15,6 +15,7 @@ use Closure;
use Illuminate\Support\Facades\Auth;
use Preferences;
use Session;
+
/**
* Class RedirectIfTwoFactorAuthenticated
*
diff --git a/app/Http/Requests/TokenFormRequest.php b/app/Http/Requests/TokenFormRequest.php
index b5a2b4f8d4..6bfacf9737 100644
--- a/app/Http/Requests/TokenFormRequest.php
+++ b/app/Http/Requests/TokenFormRequest.php
@@ -29,7 +29,7 @@ class TokenFormRequest extends Request
{
$rules = [
- 'code' => 'required|2faCode',
+ 'code' => 'required|2faCode',
];
return $rules;
diff --git a/app/Rules/Triggers/AmountExactly.php b/app/Rules/Triggers/AmountExactly.php
index afc20aaec7..825847298d 100644
--- a/app/Rules/Triggers/AmountExactly.php
+++ b/app/Rules/Triggers/AmountExactly.php
@@ -12,7 +12,6 @@ namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\TransactionJournal;
-use Log;
/**
* Class AmountExactly
@@ -60,6 +59,7 @@ final class AmountExactly extends AbstractTrigger implements TriggerInterface
if ($result === 0) {
return true;
}
+
return false;
}
diff --git a/app/Rules/Triggers/AmountLess.php b/app/Rules/Triggers/AmountLess.php
index f84d66f4cb..a77b3d2141 100644
--- a/app/Rules/Triggers/AmountLess.php
+++ b/app/Rules/Triggers/AmountLess.php
@@ -12,7 +12,6 @@ namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\TransactionJournal;
-use Log;
/**
* Class AmountLess
diff --git a/app/Rules/Triggers/AmountMore.php b/app/Rules/Triggers/AmountMore.php
index 490a1a81d1..1a0f3eb386 100644
--- a/app/Rules/Triggers/AmountMore.php
+++ b/app/Rules/Triggers/AmountMore.php
@@ -12,7 +12,6 @@ namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\TransactionJournal;
-use Log;
/**
* Class AmountMore
diff --git a/app/Rules/Triggers/DescriptionContains.php b/app/Rules/Triggers/DescriptionContains.php
index b599fef77e..99dfe769f3 100644
--- a/app/Rules/Triggers/DescriptionContains.php
+++ b/app/Rules/Triggers/DescriptionContains.php
@@ -12,7 +12,6 @@ namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\TransactionJournal;
-use Log;
/**
* Class DescriptionContains
diff --git a/app/Rules/Triggers/DescriptionEnds.php b/app/Rules/Triggers/DescriptionEnds.php
index c6770a2298..7e01574f21 100644
--- a/app/Rules/Triggers/DescriptionEnds.php
+++ b/app/Rules/Triggers/DescriptionEnds.php
@@ -11,7 +11,6 @@ declare(strict_types = 1);
namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\TransactionJournal;
-use Log;
/**
* Class DescriptionEnds
@@ -70,6 +69,7 @@ final class DescriptionEnds extends AbstractTrigger implements TriggerInterface
if ($part == $search) {
return true;
}
+
return false;
}
}
diff --git a/app/Rules/Triggers/DescriptionIs.php b/app/Rules/Triggers/DescriptionIs.php
index f1383991a2..67f6d0d90f 100644
--- a/app/Rules/Triggers/DescriptionIs.php
+++ b/app/Rules/Triggers/DescriptionIs.php
@@ -11,7 +11,6 @@ declare(strict_types = 1);
namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\TransactionJournal;
-use Log;
/**
* Class DescriptionIs
@@ -59,6 +58,7 @@ final class DescriptionIs extends AbstractTrigger implements TriggerInterface
if ($description == $search) {
return true;
}
+
return false;
}
}
diff --git a/app/Rules/Triggers/DescriptionStarts.php b/app/Rules/Triggers/DescriptionStarts.php
index 72ae15b01b..5d42363cd7 100644
--- a/app/Rules/Triggers/DescriptionStarts.php
+++ b/app/Rules/Triggers/DescriptionStarts.php
@@ -11,7 +11,6 @@ declare(strict_types = 1);
namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\TransactionJournal;
-use Log;
/**
* Class DescriptionStarts
@@ -61,6 +60,7 @@ final class DescriptionStarts extends AbstractTrigger implements TriggerInterfac
if ($part == $search) {
return true;
}
+
return false;
}
}
diff --git a/app/Rules/Triggers/FromAccountEnds.php b/app/Rules/Triggers/FromAccountEnds.php
index fcffd65c50..91f7da1d3f 100644
--- a/app/Rules/Triggers/FromAccountEnds.php
+++ b/app/Rules/Triggers/FromAccountEnds.php
@@ -11,7 +11,6 @@ declare(strict_types = 1);
namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\TransactionJournal;
-use Log;
/**
* Class FromAccountEnds
@@ -71,6 +70,7 @@ final class FromAccountEnds extends AbstractTrigger implements TriggerInterface
if ($part == $search) {
return true;
}
+
return false;
}
diff --git a/app/Rules/Triggers/FromAccountIs.php b/app/Rules/Triggers/FromAccountIs.php
index 0aa91379a6..526f00adf8 100644
--- a/app/Rules/Triggers/FromAccountIs.php
+++ b/app/Rules/Triggers/FromAccountIs.php
@@ -11,7 +11,6 @@ declare(strict_types = 1);
namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\TransactionJournal;
-use Log;
/**
* Class FromAccountIs
@@ -59,6 +58,7 @@ final class FromAccountIs extends AbstractTrigger implements TriggerInterface
if ($name == $search) {
return true;
}
+
return false;
}
diff --git a/app/Rules/Triggers/FromAccountStarts.php b/app/Rules/Triggers/FromAccountStarts.php
index f86a9d8976..f4ce6e7280 100644
--- a/app/Rules/Triggers/FromAccountStarts.php
+++ b/app/Rules/Triggers/FromAccountStarts.php
@@ -11,7 +11,6 @@ declare(strict_types = 1);
namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\TransactionJournal;
-use Log;
/**
* Class FromAccountStarts
@@ -61,6 +60,7 @@ final class FromAccountStarts extends AbstractTrigger implements TriggerInterfac
if ($part == $search) {
return true;
}
+
return false;
}
}
diff --git a/app/Rules/Triggers/ToAccountContains.php b/app/Rules/Triggers/ToAccountContains.php
index 58af4a3378..cdee61969d 100644
--- a/app/Rules/Triggers/ToAccountContains.php
+++ b/app/Rules/Triggers/ToAccountContains.php
@@ -11,7 +11,6 @@ declare(strict_types = 1);
namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\TransactionJournal;
-use Log;
/**
* Class ToAccountContains
@@ -60,6 +59,7 @@ final class ToAccountContains extends AbstractTrigger implements TriggerInterfac
if (!($strpos === false)) {
return true;
}
+
return false;
}
}
diff --git a/app/Rules/Triggers/ToAccountEnds.php b/app/Rules/Triggers/ToAccountEnds.php
index 77d41ecf20..a021c735af 100644
--- a/app/Rules/Triggers/ToAccountEnds.php
+++ b/app/Rules/Triggers/ToAccountEnds.php
@@ -11,7 +11,6 @@ declare(strict_types = 1);
namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\TransactionJournal;
-use Log;
/**
* Class ToAccountEnds
@@ -71,6 +70,7 @@ final class ToAccountEnds extends AbstractTrigger implements TriggerInterface
if ($part == $search) {
return true;
}
+
return false;
}
}
diff --git a/app/Rules/Triggers/ToAccountIs.php b/app/Rules/Triggers/ToAccountIs.php
index 124db72c7c..4dc6d884ec 100644
--- a/app/Rules/Triggers/ToAccountIs.php
+++ b/app/Rules/Triggers/ToAccountIs.php
@@ -11,7 +11,6 @@ declare(strict_types = 1);
namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\TransactionJournal;
-use Log;
/**
* Class ToAccountIs
@@ -59,6 +58,7 @@ final class ToAccountIs extends AbstractTrigger implements TriggerInterface
if ($toAccountName == $search) {
return true;
}
+
return false;
}
diff --git a/app/Rules/Triggers/ToAccountStarts.php b/app/Rules/Triggers/ToAccountStarts.php
index 1c43ce86a3..45b1fc444c 100644
--- a/app/Rules/Triggers/ToAccountStarts.php
+++ b/app/Rules/Triggers/ToAccountStarts.php
@@ -11,7 +11,6 @@ declare(strict_types = 1);
namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\TransactionJournal;
-use Log;
/**
* Class ToAccountStarts
@@ -61,6 +60,7 @@ final class ToAccountStarts extends AbstractTrigger implements TriggerInterface
if ($part == $search) {
return true;
}
+
return false;
}
diff --git a/app/Rules/Triggers/TransactionType.php b/app/Rules/Triggers/TransactionType.php
index 867bc90063..ea14512c46 100644
--- a/app/Rules/Triggers/TransactionType.php
+++ b/app/Rules/Triggers/TransactionType.php
@@ -11,7 +11,6 @@ declare(strict_types = 1);
namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\TransactionJournal;
-use Log;
/**
* Class TransactionType
@@ -59,6 +58,7 @@ final class TransactionType extends AbstractTrigger implements TriggerInterface
if ($type == $search) {
return true;
}
+
return false;
}
}