original_string: public static function assumeSocket($address, $port = 0): void
      {
          $socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
  
          assumeThat($socket, is(not(false)), self::$SOCK_ERR_MSG . socket_last_error($socket));
          assumeThat(
              @socket_connect($socket, $address, $port),
              is(not(false)),
              'Unable to connect: ' . $address . ':' . $port
          );
      }
code: public static function assumeSocket($address, $port = 0): void
      {
          $socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
  
          assumeThat($socket, is(not(false)), self::$SOCK_ERR_MSG . socket_last_error($socket));
          assumeThat(
              @socket_connect($socket, $address, $port),
              is(not(false)),
              'Unable to connect: ' . $address . ':' . $port
          );
      }
code_tokens: public static function assumeSocket ( $ address , $ port = 0 ) : void { $ socket = @ socket_create ( AF_INET , SOCK_STREAM , SOL_TCP ) ; assumeThat ( $ socket , is ( not ( false ) ) , self :: $ SOCK_ERR_MSG . socket_last_error ( $ socket ) ) ; assumeThat ( @ socket_connect ( $ socket , $ address , $ port ) , is ( not ( false ) ) , 'Unable to connect: ' . $ address . ':' . $ port ) ; }
docstring: Assumes that a specified socket connection could be established.
  
  @param string $address
  @param int    $port
  
  @return void
  
  @throws AssumptionViolatedException
docstring_tokens: Assumes that a specified socket connection could be established .