Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/PgAsync/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Client
/** @var Connection */
private $listenConnection;

public function __construct(array $parameters, LoopInterface $loop = null, ConnectorInterface $connector = null)
public function __construct(array $parameters, ?LoopInterface $loop = null, ?ConnectorInterface $connector = null)
{
$this->loop = $loop ?: \EventLoop\getLoop();
$this->connector = $connector;
Expand Down
8 changes: 4 additions & 4 deletions src/PgAsync/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class Connection extends EventEmitter
private $tlsConnectorFlags = [];
private $password;

public function __construct(array $parameters, LoopInterface $loop, ConnectorInterface $connector = null)
public function __construct(array $parameters, LoopInterface $loop, ?ConnectorInterface $connector = null)
{
if (!is_array($parameters) ||
!isset($parameters['user']) ||
Expand Down Expand Up @@ -572,7 +572,7 @@ private function handleRowDescription(RowDescription $message)
$this->addColumns($message->getColumns());
}

private function failAllCommandsWith(\Throwable $e = null)
private function failAllCommandsWith(?\Throwable $e = null)
{
$e = $e ?: new \Exception('unknown error');

Expand Down Expand Up @@ -642,7 +642,7 @@ public function processQueue()
public function query($query): Observable
{
return new AnonymousObservable(
function (ObserverInterface $observer, SchedulerInterface $scheduler = null) use ($query) {
function (ObserverInterface $observer, ?SchedulerInterface $scheduler = null) use ($query) {
if ($this->connStatus === $this::CONNECTION_NEEDED) {
$this->start();
}
Expand Down Expand Up @@ -692,7 +692,7 @@ public function executeStatement(string $queryString, array $parameters = []): O
*/

return new AnonymousObservable(
function (ObserverInterface $observer, SchedulerInterface $scheduler = null) use ($queryString, $parameters) {
function (ObserverInterface $observer, ?SchedulerInterface $scheduler = null) use ($queryString, $parameters) {
if ($this->connStatus === $this::CONNECTION_NEEDED) {
$this->start();
}
Expand Down
Loading