Promote some constructors

This commit is contained in:
Dylan K. Taylor
2022-05-17 22:34:58 +01:00
parent 8e767da29e
commit d4b7f66e15
30 changed files with 144 additions and 218 deletions

View File

@ -27,13 +27,10 @@ use pocketmine\snooze\SleeperNotifier;
use raklib\server\ipc\InterThreadChannelWriter;
final class SnoozeAwarePthreadsChannelWriter implements InterThreadChannelWriter{
private \Threaded $buffer;
private SleeperNotifier $notifier;
public function __construct(\Threaded $buffer, SleeperNotifier $notifier){
$this->buffer = $buffer;
$this->notifier = $notifier;
}
public function __construct(
private \Threaded $buffer,
private SleeperNotifier $notifier
){}
public function write(string $str) : void{
$this->buffer[] = $str;