for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the slince/spike package.
*
* (c) Slince <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Spike\Common\Tunnel;
abstract class Tunnel implements TunnelInterface
{
/**
* The tunnel server port.
* @var int
protected $serverPort;
public function __construct($serverPort)
$this->serverPort = $serverPort;
}
* {@inheritdoc}
public function getServerPort()
return $this->serverPort;
public function match($info)
return $this->getServerPort() == $info['serverPort'];
public function jsonSerialize()
return $this->toArray();
public function __toString()
return json_encode($this->toArray());