for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
namespace Wolnosciowiec\WebProxy\Entity;
/**
* Represents a proxy details
* --------------------------
*
* @package Wolnosciowiec\WebProxy\Entity
*/
class ProxyServerAddress
{
* @var string $address
private $address;
* @var int $port
private $port = 80;
* @var string http|https
private $schema;
* @param string $address
* @return ProxyServerAddress
public function setAddress(string $address): ProxyServerAddress
$this->address = $address;
return $this;
}
* @param int $port
public function setPort(int $port): ProxyServerAddress
$this->port = $port;
* @param string $schema
public function setSchema(string $schema): ProxyServerAddress
$this->schema = $schema;
* @return bool
public function isSecure(): bool
return $this->getSchema() === 'https';
* @return string
public function getAddress(): string
return $this->address;
* @return int
public function getPort(): int
return $this->port;
public function getSchema(): string
return $this->schema;
public function getFormatted()
return $this->getSchema() . '://' . $this->getAddress() . ':' . $this->getPort();