for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Copyright (c) 2018 Constantin Galbenu <[email protected]>
*/
namespace Gica\Cqrs\Command;
use Gica\Types\Guid;
class CommandMetadata
{
/** @var Guid|null */
private $commandId = null;
private $correlationId = null;
public function getCommandId():?Guid
return $this->commandId;
}
* @param Guid $commandId
* @return static
public function withCommandId(Guid $commandId)
$other = clone $this;
$other->commandId = $commandId;
return $other;
public function withoutCommandId()
$other->commandId = null;
public function getCorrelationId():?Guid
return $this->correlationId;
* @param Guid $correlationId
public function withCorrelationId(Guid $correlationId)
$other->correlationId = $correlationId;
public function withoutCorrelationId()
$other->correlationId = null;