Fix code quality with rector [skip ci]

This commit is contained in:
James Cole
2025-11-09 09:08:03 +01:00
parent d2610be790
commit 68183a0a0e
209 changed files with 1021 additions and 1248 deletions

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace Tests\integration\Api\System;
use FireflyIII\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Testing\Fluent\AssertableJson;
use Tests\integration\TestCase;
@@ -39,14 +40,14 @@ use Override;
final class AboutControllerTest extends TestCase
{
use RefreshDatabase;
private $user;
private ?User $user = null;
#[Override]
protected function setUp(): void
{
parent::setUp();
if (!isset($this->user)) {
if (!$this->user instanceof User) {
$this->user = $this->createAuthenticatedUser();
}
$this->actingAs($this->user);
@@ -74,7 +75,7 @@ final class AboutControllerTest extends TestCase
$response->assertOk();
$response->assertJson(
fn (AssertableJson $json) => $json
fn (AssertableJson $json): AssertableJson => $json
->where('data.attributes.email', $this->user->email)
->where('data.attributes.role', $this->user->role)
);