Skip to content

Firefly III: a personal finances manager

Minor code cleanup

James Cole4c90f6657866
diff --git a/app/Handlers/Events/Model/BudgetLimitHandler.php b/app/Handlers/Events/Model/BudgetLimitHandler.php
index 5a45dc41e0..e03058c385 100644
--- a/app/Handlers/Events/Model/BudgetLimitHandler.php
+++ b/app/Handlers/Events/Model/BudgetLimitHandler.php
@@ -181,8 +181,8 @@ class BudgetLimitHandler
);
// overlap in days:
$limitPeriod = Period::make(
- $budgetLimit->start_date,
- $budgetLimit->end_date,
+ $budgetLimit->start_date,
+ $budgetLimit->end_date,
precision : Precision::DAY(),
boundaries: Boundaries::EXCLUDE_NONE()
);
@@ -224,8 +224,8 @@ class BudgetLimitHandler
return '0';
}
$limitPeriod = Period::make(
- $budgetLimit->start_date,
- $budgetLimit->end_date,
+ $budgetLimit->start_date,
+ $budgetLimit->end_date,
precision : Precision::DAY(),
boundaries: Boundaries::EXCLUDE_NONE()
);
diff --git a/app/Models/Account.php b/app/Models/Account.php
index 799e05ef4a..c44881ef38 100644
--- a/app/Models/Account.php
+++ b/app/Models/Account.php
@@ -127,7 +127,7 @@ class Account extends Model
/** @var array Fields that can be filled */
protected $fillable = ['user_id', 'user_group_id', 'account_type_id', 'name', 'active', 'virtual_balance', 'iban'];
/** @var array Hidden from view */
- protected $hidden = ['encrypted'];
+ protected $hidden = ['encrypted'];
private bool $joinedAccountTypes = false;
/**
@@ -291,7 +291,7 @@ class Account extends Model
protected function virtualBalance(): Attribute
{
return Attribute::make(
- get: fn($value) => (string)$value,
+ get: fn ($value) => (string)$value,
);
}
}
diff --git a/app/Models/AvailableBudget.php b/app/Models/AvailableBudget.php
index f80a962f9a..eac01d5043 100644
--- a/app/Models/AvailableBudget.php
+++ b/app/Models/AvailableBudget.php
@@ -132,7 +132,7 @@ class AvailableBudget extends Model
protected function amount(): Attribute
{
return Attribute::make(
- get: fn($value) => (string)$value,
+ get: fn ($value) => (string)$value,
);
}
}
diff --git a/app/Models/Bill.php b/app/Models/Bill.php
index 160d83ae3e..f9f2510fc2 100644
--- a/app/Models/Bill.php
+++ b/app/Models/Bill.php
@@ -242,7 +242,7 @@ class Bill extends Model
protected function amountMax(): Attribute
{
return Attribute::make(
- get: fn($value) => (string)$value,
+ get: fn ($value) => (string)$value,
);
}
@@ -254,7 +254,7 @@ class Bill extends Model
protected function amountMin(): Attribute
{
return Attribute::make(
- get: fn($value) => (string)$value,
+ get: fn ($value) => (string)$value,
);
}
}
diff --git a/database/migrations/2016_08_25_091522_changes_for_3101.php b/database/migrations/2016_08_25_091522_changes_for_3101.php
index be2b8cf0c7..5b32bada7f 100644
--- a/database/migrations/2016_08_25_091522_changes_for_3101.php
+++ b/database/migrations/2016_08_25_091522_changes_for_3101.php
@@ -33,11 +33,15 @@ class ChangesFor3101 extends Migration
/**
* Reverse the migrations.
*/
- public function down(): void {}
+ public function down(): void
+ {
+ }
/**
* Run the migrations.
*
*/
- public function up(): void {}
+ public function up(): void
+ {
+ }
}
diff --git a/database/migrations/2016_09_12_121359_fix_nullables.php b/database/migrations/2016_09_12_121359_fix_nullables.php
index bb389daa45..fbb3a63012 100644
--- a/database/migrations/2016_09_12_121359_fix_nullables.php
+++ b/database/migrations/2016_09_12_121359_fix_nullables.php
@@ -38,7 +38,9 @@ class FixNullables extends Migration
/**
* Reverse the migrations.
*/
- public function down(): void {}
+ public function down(): void
+ {
+ }
/**
* Run the migrations.
diff --git a/database/migrations/2018_04_29_174524_changes_for_v474.php b/database/migrations/2018_04_29_174524_changes_for_v474.php
index d5bae260d7..f7d5ce28dc 100644
--- a/database/migrations/2018_04_29_174524_changes_for_v474.php
+++ b/database/migrations/2018_04_29_174524_changes_for_v474.php
@@ -36,12 +36,16 @@ class ChangesForV474 extends Migration
*
* @return void
*/
- public function down(): void {}
+ public function down(): void
+ {
+ }
/**
* Run the migrations.
*
* @return void
*/
- public function up(): void {}
+ public function up(): void
+ {
+ }
}
diff --git a/database/migrations/2023_08_11_192521_upgrade_og_table.php b/database/migrations/2023_08_11_192521_upgrade_og_table.php
index adfd61346a..0ff4508b5c 100644
--- a/database/migrations/2023_08_11_192521_upgrade_og_table.php
+++ b/database/migrations/2023_08_11_192521_upgrade_og_table.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
use Doctrine\DBAL\Schema\Exception\ColumnDoesNotExist;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\QueryException;
@@ -9,7 +11,7 @@ use Illuminate\Support\Facades\Schema;
/**
*
*/
-return new class extends Migration {
+return new class () extends Migration {
/**
* Run the migrations.
*/