Skip to content

Commit

Permalink
Use null-safe property access
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed Jan 14, 2025
1 parent 66ea6d9 commit ca80c8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public function getConnection(): ProtocolInterface
*/
public function isConnected(): bool
{
return $this->connection && $this->connection->connected();
return $this->connection?->connected();
}

/**
Expand Down

1 comment on commit ca80c8d

@salvor-hardin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change generates fatal error message on start.

#8

Thank you Steve.

Please sign in to comment.