Skip to content

Commit 90f651a

Browse files
authored
Merge pull request #709 from wayofdev/feat/infra-dx
refactor: apply rector rules
2 parents ca870ef + 8f6c630 commit 90f651a

25 files changed

+89
-173
lines changed

src/Bridge/Telescope/TelescopeLogger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class TelescopeLogger implements LoggerInterface
1212
{
13-
private LoggerInterface $parentLogger;
13+
private readonly LoggerInterface $parentLogger;
1414

1515
public function __construct($parentLogger)
1616
{

tests/app/Entities/Footprint.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
final class Footprint implements JsonSerializable, Stringable
1717
{
18-
private UserId $id;
18+
private readonly UserId $id;
1919

20-
private string $party;
20+
private readonly string $party;
2121

22-
private string $realm;
22+
private readonly string $realm;
2323

2424
public static function empty(string $authorizedParty = 'guest-party', string $realm = 'guest-realm'): self
2525
{

tests/app/Entities/Post.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ class Post
1818
public int $id;
1919

2020
#[Column(type: 'string')]
21-
private string $title;
21+
private readonly string $title;
2222

2323
#[Column(type: 'text')]
24-
private string $description;
24+
private readonly string $description;
2525

2626
#[Column(type: 'datetime', nullable: true)]
2727
private ?DateTimeImmutable $deletedAt = null;

tests/app/Entities/UserId.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
final class UserId implements Stringable
1111
{
12-
private string $id;
12+
private readonly string $id;
1313

1414
public static function create(string $userId): self
1515
{

tests/src/Bridge/Laravel/Console/Commands/Database/ListCommandTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
use Cycle\Database\Database;
88
use Cycle\Database\DatabaseInterface;
99
use Illuminate\Support\Facades\Artisan;
10+
use PHPUnit\Framework\Attributes\Test;
1011
use WayOfDev\Tests\TestCase;
1112

1213
class ListCommandTest extends TestCase
1314
{
14-
/**
15-
* @test
16-
*/
15+
#[Test]
1716
public function it_runs_handle(): void
1817
{
1918
/** @var Database $database */

tests/src/Bridge/Laravel/Console/Commands/Database/TableCommandTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
use Cycle\Database\Database;
88
use Cycle\Database\DatabaseInterface;
99
use Illuminate\Support\Facades\Artisan;
10+
use PHPUnit\Framework\Attributes\Test;
1011
use WayOfDev\Tests\TestCase;
1112

1213
class TableCommandTest extends TestCase
1314
{
14-
/**
15-
* @test
16-
*/
15+
#[Test]
1716
public function it_runs_handle(): void
1817
{
1918
/** @var Database $database */

tests/src/Bridge/Laravel/Console/Commands/Migrations/InitCommandTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66

77
use Cycle\Database\Database;
88
use Cycle\Database\DatabaseInterface;
9+
use PHPUnit\Framework\Attributes\Test;
910
use WayOfDev\Tests\TestCase;
1011

1112
class InitCommandTest extends TestCase
1213
{
13-
/**
14-
* @test
15-
*/
14+
#[Test]
1615
public function it_runs_handle(): void
1716
{
1817
/** @var Database $database */

tests/src/Bridge/Laravel/Console/Commands/Migrations/MigrateCommandTest.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66

77
use Cycle\Database\Database;
88
use Cycle\Database\DatabaseInterface;
9+
use PHPUnit\Framework\Attributes\Test;
910
use WayOfDev\Tests\TestCase;
1011

1112
class MigrateCommandTest extends TestCase
1213
{
13-
/**
14-
* @test
15-
*/
14+
#[Test]
1615
public function it_migrates_in_safe_environment(): void
1716
{
1817
/** @var Database $database */
@@ -27,9 +26,7 @@ public function it_migrates_in_safe_environment(): void
2726
$this::assertCount(1, $database->getTables());
2827
}
2928

30-
/**
31-
* @test
32-
*/
29+
#[Test]
3330
public function it_migrates_in_production_with_force_option(): void
3431
{
3532
// Set the application environment to production
@@ -50,9 +47,7 @@ public function it_migrates_in_production_with_force_option(): void
5047
$this::assertCount(4, $database->getTables());
5148
}
5249

53-
/**
54-
* @test
55-
*/
50+
#[Test]
5651
public function it_warns_about_unsafe_migrations(): void
5752
{
5853
// Set the application environment to production

tests/src/Bridge/Laravel/Console/Commands/Migrations/ReplayCommandTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66

77
use Cycle\Database\Database;
88
use Cycle\Database\DatabaseInterface;
9+
use PHPUnit\Framework\Attributes\Test;
910
use WayOfDev\Tests\TestCase;
1011

1112
class ReplayCommandTest extends TestCase
1213
{
13-
/**
14-
* @test
15-
*/
14+
#[Test]
1615
public function it_runs_handle(): void
1716
{
1817
/** @var Database $database */

tests/src/Bridge/Laravel/Console/Commands/Migrations/RollbackCommandTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66

77
use Cycle\Database\Database;
88
use Cycle\Database\DatabaseInterface;
9+
use PHPUnit\Framework\Attributes\Test;
910
use WayOfDev\Tests\TestCase;
1011

1112
class RollbackCommandTest extends TestCase
1213
{
13-
/**
14-
* @test
15-
*/
14+
#[Test]
1615
public function it_runs_handle(): void
1716
{
1817
/** @var Database $database */

0 commit comments

Comments
 (0)