Skip to content

Commit ec74cbe

Browse files
committed
create the handler inside the wrapper to not expose implementation detail
1 parent 4176f6a commit ec74cbe

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/CurrentProcess.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Innmind\Server\Status\Server\Memory\Bytes;
99
use Innmind\TimeContinuum\Period;
1010
use Innmind\TimeWarp\Halt;
11-
use Innmind\Signals\Handler;
1211
use Innmind\Immutable\{
1312
Attempt,
1413
SideEffect,
@@ -48,7 +47,7 @@ public function id(): Attempt
4847

4948
public function signals(): Signals
5049
{
51-
return $this->signals ??= Signals::of(new Handler);
50+
return $this->signals ??= Signals::of();
5251
}
5352

5453
/**

src/CurrentProcess/Signals.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ private function __construct(Handler $handler)
2121
/**
2222
* @internal
2323
*/
24-
public static function of(Handler $handler): self
24+
public static function of(): self
2525
{
26-
return new self($handler);
26+
return new self(new Handler);
2727
}
2828

2929
/**

0 commit comments

Comments
 (0)