update patch 1

This commit is contained in:
fiqhpratama
2024-12-02 01:18:34 +07:00
parent 453d9bb470
commit 25026b0a85
3380 changed files with 103529 additions and 363623 deletions
+5 -5
View File
@@ -25,27 +25,27 @@ use Symfony\Component\VarDumper\Cloner\Stub;
class DumpServer
{
private string $host;
private ?LoggerInterface $logger;
/**
* @var resource|null
*/
private $socket;
public function __construct(string $host, ?LoggerInterface $logger = null)
{
public function __construct(
string $host,
private ?LoggerInterface $logger = null,
) {
if (!str_contains($host, '://')) {
$host = 'tcp://'.$host;
}
$this->host = $host;
$this->logger = $logger;
}
public function start(): void
{
if (!$this->socket = stream_socket_server($this->host, $errno, $errstr)) {
throw new \RuntimeException(sprintf('Server start failed on "%s": ', $this->host).$errstr.' '.$errno);
throw new \RuntimeException(\sprintf('Server start failed on "%s": ', $this->host).$errstr.' '.$errno);
}
}