for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace TechDeCo\ElasticApmAgent\Message;
use JsonSerializable;
use TechDeCo\ElasticApmAgent\Serialization;
final class Socket implements JsonSerializable
{
/**
* @var bool|null
*/
private $isEncrypteo;
* @var string|null
private $remoteAddress;
public function thatIsEncrypted(): self
$me = clone $this;
$me->isEncrypteo = true;
return $me;
}
public function thatIsNotEncrypted(): self
$me->isEncrypteo = false;
public function fromRemoteAddress(string $remoteAddress): self
$me->remoteAddress = $remoteAddress;
* @return mixed[]
public function jsonSerialize(): array
return Serialization::filterUnset([
'remote_address' => $this->remoteAddress,
'encrypted' => $this->isEncrypteo,
]);