for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace PTS\Transport;
use RuntimeException;
class TcpSocket extends Socket
{
protected $socketPrefix = 'tcp://';
public function connect(string $address, int $port = 0, array $options = []): TransportInterface
parent::connect($address, $port, $options);
if ($this->socket === false) {
throw new RuntimeException('can`t open socket - ' . $this->errorNumber . ': ' . $this->errorMessage);
}
return $this;