mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Final set of php8.4 changes.
This commit is contained in:
@@ -40,6 +40,7 @@ final class AboutControllerTest extends TestCase
|
||||
use RefreshDatabase;
|
||||
private $user;
|
||||
|
||||
#[\Override]
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
@@ -44,6 +44,7 @@ final class BillControllerTest extends TestCase
|
||||
*/
|
||||
use RefreshDatabase;
|
||||
|
||||
#[\Override]
|
||||
protected function createAuthenticatedUser(): User
|
||||
{
|
||||
$userGroup = UserGroup::create(['title' => 'Test Group']);
|
||||
@@ -65,8 +66,8 @@ final class BillControllerTest extends TestCase
|
||||
'user_id' => $user->id,
|
||||
'name' => 'Bill '.$i,
|
||||
'user_group_id' => $user->user_group_id,
|
||||
'amount_min' => rand(1, 100), // random amount
|
||||
'amount_max' => rand(101, 200), // random amount
|
||||
'amount_min' => random_int(1, 100), // random amount
|
||||
'amount_max' => random_int(101, 200), // random amount
|
||||
'match' => 'MIGRATED_TO_RULES',
|
||||
'date' => '2024-01-01',
|
||||
'repeat_freq' => 'monthly',
|
||||
|
@@ -44,6 +44,7 @@ final class BudgetControllerTest extends TestCase
|
||||
*/
|
||||
use RefreshDatabase;
|
||||
|
||||
#[\Override]
|
||||
protected function createAuthenticatedUser(): User
|
||||
{
|
||||
$userGroup = UserGroup::create(['title' => 'Test Group']);
|
||||
|
@@ -44,6 +44,7 @@ final class CategoryControllerTest extends TestCase
|
||||
*/
|
||||
use RefreshDatabase;
|
||||
|
||||
#[\Override]
|
||||
protected function createAuthenticatedUser(): User
|
||||
{
|
||||
$userGroup = UserGroup::create(['title' => 'Test Group']);
|
||||
|
@@ -44,6 +44,7 @@ final class CurrencyControllerTest extends TestCase
|
||||
*/
|
||||
use RefreshDatabase;
|
||||
|
||||
#[\Override]
|
||||
protected function createAuthenticatedUser(): User
|
||||
{
|
||||
$userGroup = UserGroup::create(['title' => 'Test Group']);
|
||||
|
@@ -44,6 +44,7 @@ final class ObjectGroupControllerTest extends TestCase
|
||||
*/
|
||||
use RefreshDatabase;
|
||||
|
||||
#[\Override]
|
||||
protected function createAuthenticatedUser(): User
|
||||
{
|
||||
$userGroup = UserGroup::create(['title' => 'Test Group']);
|
||||
|
@@ -37,7 +37,7 @@ use Tests\integration\TestCase;
|
||||
*/
|
||||
final class BillDateCalculatorTest extends TestCase
|
||||
{
|
||||
private BillDateCalculator $calculator;
|
||||
private readonly BillDateCalculator $calculator;
|
||||
|
||||
public function __construct(string $name)
|
||||
{
|
||||
|
@@ -30,17 +30,11 @@ use Tests\unit\Support\Calendar\Periodicity\IntervalProvider;
|
||||
|
||||
readonly class CalculatorProvider
|
||||
{
|
||||
public IntervalProvider $intervalProvider;
|
||||
public string $label;
|
||||
public Periodicity $periodicity;
|
||||
public int $skip;
|
||||
|
||||
private function __construct(IntervalProvider $intervalProvider, Periodicity $periodicity, int $skip = 0)
|
||||
private function __construct(public IntervalProvider $intervalProvider, public Periodicity $periodicity, public int $skip = 0)
|
||||
{
|
||||
$this->skip = $skip;
|
||||
$this->intervalProvider = $intervalProvider;
|
||||
$this->periodicity = $periodicity;
|
||||
$this->label = "{$periodicity->name} {$intervalProvider->label}";
|
||||
$this->label = "{$this->periodicity->name} {$this->intervalProvider->label}";
|
||||
}
|
||||
|
||||
public static function providePeriodicityWithSkippedIntervals(): \Generator
|
||||
|
@@ -28,14 +28,10 @@ use Carbon\Carbon;
|
||||
|
||||
readonly class IntervalProvider
|
||||
{
|
||||
public Carbon $epoch;
|
||||
public Carbon $expected;
|
||||
public string $label;
|
||||
|
||||
public function __construct(Carbon $epoch, Carbon $expected)
|
||||
public function __construct(public Carbon $epoch, public Carbon $expected)
|
||||
{
|
||||
$this->epoch = $epoch;
|
||||
$this->expected = $expected;
|
||||
$this->label = "given {$epoch->toDateString()} expects {$expected->toDateString()}";
|
||||
$this->label = "given {$this->epoch->toDateString()} expects {$this->expected->toDateString()}";
|
||||
}
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ use Tests\integration\TestCase;
|
||||
*/
|
||||
final class NavigationAddPeriodTest extends TestCase
|
||||
{
|
||||
private Navigation $navigation;
|
||||
private readonly Navigation $navigation;
|
||||
|
||||
public function __construct(string $name)
|
||||
{
|
||||
|
@@ -39,7 +39,7 @@ use Tests\integration\TestCase;
|
||||
*/
|
||||
final class NavigationEndOfPeriodTest extends TestCase
|
||||
{
|
||||
private Navigation $navigation;
|
||||
private readonly Navigation $navigation;
|
||||
|
||||
public function __construct(string $name)
|
||||
{
|
||||
|
@@ -38,7 +38,7 @@ use Tests\integration\TestCase;
|
||||
*/
|
||||
final class NavigationPreferredCarbonFormatByPeriodTest extends TestCase
|
||||
{
|
||||
private Navigation $navigation;
|
||||
private readonly Navigation $navigation;
|
||||
|
||||
public function __construct(string $name)
|
||||
{
|
||||
|
@@ -39,7 +39,7 @@ use Tests\integration\TestCase;
|
||||
*/
|
||||
final class NavigationPreferredCarbonFormatTest extends TestCase
|
||||
{
|
||||
private Navigation $navigation;
|
||||
private readonly Navigation $navigation;
|
||||
|
||||
public function __construct(string $name)
|
||||
{
|
||||
|
@@ -39,7 +39,7 @@ use Tests\integration\TestCase;
|
||||
*/
|
||||
final class NavigationPreferredEndOfPeriodTest extends TestCase
|
||||
{
|
||||
private Navigation $navigation;
|
||||
private readonly Navigation $navigation;
|
||||
|
||||
public function __construct(string $name)
|
||||
{
|
||||
|
@@ -39,7 +39,7 @@ use Tests\integration\TestCase;
|
||||
*/
|
||||
final class NavigationPreferredRangeFormatTest extends TestCase
|
||||
{
|
||||
private Navigation $navigation;
|
||||
private readonly Navigation $navigation;
|
||||
|
||||
public function __construct(string $name)
|
||||
{
|
||||
|
@@ -39,7 +39,7 @@ use Tests\integration\TestCase;
|
||||
*/
|
||||
final class NavigationPreferredSqlFormatTest extends TestCase
|
||||
{
|
||||
private Navigation $navigation;
|
||||
private readonly Navigation $navigation;
|
||||
|
||||
public function __construct(string $name)
|
||||
{
|
||||
|
@@ -40,7 +40,7 @@ use Tests\integration\TestCase;
|
||||
*/
|
||||
final class NavigationStartOfPeriodTest extends TestCase
|
||||
{
|
||||
private Navigation $navigation;
|
||||
private readonly Navigation $navigation;
|
||||
|
||||
public function __construct(string $name)
|
||||
{
|
||||
|
Reference in New Issue
Block a user