Skip to content

Commit 5be8381

Browse files
committed
fix: Unsafe usage of new static()
1 parent 91c5275 commit 5be8381

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/ChildProcess.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ChildProcess implements ChildProcessContract
1919

2020
public readonly bool $persistent;
2121

22-
public function __construct(protected Client $client) {}
22+
final public function __construct(protected Client $client) {}
2323

2424
public function get(?string $alias = null): ?static
2525
{

src/Dialog.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Dialog
2626

2727
protected $windowReference;
2828

29-
public function __construct(protected Client $client) {}
29+
final public function __construct(protected Client $client) {}
3030

3131
public static function new()
3232
{

src/Notification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Notification
1212

1313
protected string $event = '';
1414

15-
public function __construct(protected Client $client) {}
15+
final public function __construct(protected Client $client) {}
1616

1717
public static function new()
1818
{

src/ProgressBar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ProgressBar
1616

1717
protected float $maxSecondsBetweenRedraws = 1;
1818

19-
public function __construct(protected int $maxSteps, protected Client $client) {}
19+
final public function __construct(protected int $maxSteps, protected Client $client) {}
2020

2121
public static function create(int $maxSteps): static
2222
{

0 commit comments

Comments
 (0)