diff --git a/composer.json b/composer.json index 3c7690a..5ff904e 100644 --- a/composer.json +++ b/composer.json @@ -28,16 +28,16 @@ "require": { "php": ">=7.1", "evenement/evenement": "^3.0 || ^2.0 || ^1.0", - "react/dns": "^1.11", + "react/dns": "^1.13", "react/event-loop": "^1.2", - "react/promise": "^3 || ^2.6 || ^1.2.1", - "react/stream": "^1.2" + "react/promise": "^3.2 || ^2.6 || ^1.2.1", + "react/stream": "^1.4" }, "require-dev": { "phpunit/phpunit": "^9.6 || ^7.5", - "react/async": "^4 || ^3", + "react/async": "^4.3 || ^3", "react/promise-stream": "^1.4", - "react/promise-timer": "^1.10" + "react/promise-timer": "^1.11" }, "autoload": { "psr-4": { diff --git a/src/Connector.php b/src/Connector.php index 40d8ebb..8a5e994 100644 --- a/src/Connector.php +++ b/src/Connector.php @@ -50,7 +50,7 @@ final class Connector implements ConnectorInterface * @param ?LoopInterface $loop * @throws \InvalidArgumentException for invalid arguments */ - public function __construct(array $context = array(), LoopInterface $loop = null) + public function __construct(array $context = [], ?LoopInterface $loop = null) { // apply default options if not explicitly given $context += [ diff --git a/src/FdServer.php b/src/FdServer.php index 43a95b7..b00681c 100644 --- a/src/FdServer.php +++ b/src/FdServer.php @@ -75,7 +75,7 @@ final class FdServer extends EventEmitter implements ServerInterface * @throws \InvalidArgumentException if the listening address is invalid * @throws \RuntimeException if listening on this address fails (already in use etc.) */ - public function __construct($fd, LoopInterface $loop = null) + public function __construct($fd, ?LoopInterface $loop = null) { if (\preg_match('#^php://fd/(\d+)$#', $fd, $m)) { $fd = (int) $m[1]; diff --git a/src/SecureConnector.php b/src/SecureConnector.php index e3ff1ce..b7dd5fd 100644 --- a/src/SecureConnector.php +++ b/src/SecureConnector.php @@ -13,7 +13,7 @@ final class SecureConnector implements ConnectorInterface private $streamEncryption; private $context; - public function __construct(ConnectorInterface $connector, LoopInterface $loop = null, array $context = []) + public function __construct(ConnectorInterface $connector, ?LoopInterface $loop = null, array $context = []) { $this->connector = $connector; $this->streamEncryption = new StreamEncryption($loop ?? Loop::get(), false); diff --git a/src/SecureServer.php b/src/SecureServer.php index 29c9866..7ef5d94 100644 --- a/src/SecureServer.php +++ b/src/SecureServer.php @@ -119,7 +119,7 @@ final class SecureServer extends EventEmitter implements ServerInterface * @see TcpServer * @link https://www.php.net/manual/en/context.ssl.php for TLS context options */ - public function __construct(ServerInterface $tcp, LoopInterface $loop = null, array $context = []) + public function __construct(ServerInterface $tcp, ?LoopInterface $loop = null, array $context = []) { // default to empty passphrase to suppress blocking passphrase prompt $context += [ diff --git a/src/SocketServer.php b/src/SocketServer.php index 10c4338..2106ff3 100644 --- a/src/SocketServer.php +++ b/src/SocketServer.php @@ -31,7 +31,7 @@ final class SocketServer extends EventEmitter implements ServerInterface * @throws \InvalidArgumentException if the listening address is invalid * @throws \RuntimeException if listening on this address fails (already in use etc.) */ - public function __construct($uri, array $context = [], LoopInterface $loop = null) + public function __construct($uri, array $context = [], ?LoopInterface $loop = null) { // apply default options if not explicitly given $context += [ diff --git a/src/TcpConnector.php b/src/TcpConnector.php index 1f17c0e..0949184 100644 --- a/src/TcpConnector.php +++ b/src/TcpConnector.php @@ -12,7 +12,7 @@ final class TcpConnector implements ConnectorInterface private $loop; private $context; - public function __construct(LoopInterface $loop = null, array $context = []) + public function __construct(?LoopInterface $loop = null, array $context = []) { $this->loop = $loop ?? Loop::get(); $this->context = $context; diff --git a/src/TcpServer.php b/src/TcpServer.php index 42f86d6..a49ca9d 100644 --- a/src/TcpServer.php +++ b/src/TcpServer.php @@ -126,7 +126,7 @@ final class TcpServer extends EventEmitter implements ServerInterface * @throws \InvalidArgumentException if the listening address is invalid * @throws \RuntimeException if listening on this address fails (already in use etc.) */ - public function __construct($uri, LoopInterface $loop = null, array $context = []) + public function __construct($uri, ?LoopInterface $loop = null, array $context = []) { $this->loop = $loop ?? Loop::get(); diff --git a/src/TimeoutConnector.php b/src/TimeoutConnector.php index 75414b6..5031a0b 100644 --- a/src/TimeoutConnector.php +++ b/src/TimeoutConnector.php @@ -12,7 +12,7 @@ final class TimeoutConnector implements ConnectorInterface private $timeout; private $loop; - public function __construct(ConnectorInterface $connector, $timeout, LoopInterface $loop = null) + public function __construct(ConnectorInterface $connector, $timeout, ?LoopInterface $loop = null) { $this->connector = $connector; $this->timeout = $timeout; diff --git a/src/UnixConnector.php b/src/UnixConnector.php index eb3f18e..ecc6262 100644 --- a/src/UnixConnector.php +++ b/src/UnixConnector.php @@ -17,7 +17,7 @@ final class UnixConnector implements ConnectorInterface { private $loop; - public function __construct(LoopInterface $loop = null) + public function __construct(?LoopInterface $loop = null) { $this->loop = $loop ?? Loop::get(); } diff --git a/src/UnixServer.php b/src/UnixServer.php index d16502d..8b4e416 100644 --- a/src/UnixServer.php +++ b/src/UnixServer.php @@ -48,7 +48,7 @@ final class UnixServer extends EventEmitter implements ServerInterface * @throws \InvalidArgumentException if the listening address is invalid * @throws \RuntimeException if listening on this address fails (already in use etc.) */ - public function __construct($path, LoopInterface $loop = null, array $context = []) + public function __construct($path, ?LoopInterface $loop = null, array $context = []) { $this->loop = $loop ?? Loop::get(); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy