for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Tleckie\ValueObject;
/**
* Class ValueObject
*
* @package Tleckie\ValueObject
* @author Teodoro Leckie Westberg <[email protected]>
*/
class ValueObject implements ValueObjectInterface
{
/** @var mixed */
protected mixed $value;
* ValueObject constructor.
* @param mixed $value
public function __construct(mixed $value)
$this->value = $value;
}
* @inheritdoc
public function value(): mixed
return $this->value;
final public function equals(ValueObjectInterface $value): bool
return $this->value() === $value->value();
public function __toString(): string
return \sprintf('%s', $this->value);