Skip to content

Commit 51a69be

Browse files
committed
chore: use constructor promotion
1 parent 49de21c commit 51a69be

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: composer lint
2727

2828
- name: 🏁 Static analysis
29-
run: composer static-analysis
29+
run: composer static-analysis --output-format=github --shepherd
3030

3131
- name: ✅ Run the tests
3232
run: composer test

src/Codelyber.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@ final class Codelyber
88
{
99
private const string GREETING = 'CodelyTV';
1010

11-
private string $name;
12-
13-
public function __construct(string $name)
11+
public function __construct(private readonly string $name)
1412
{
15-
$this->name = $name;
1613
}
1714

1815
public function name(): string

0 commit comments

Comments
 (0)