Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
namespace Basic\DomainSupport\ValueObjects;
abstract class StringValueObject
/** @var string */
private $value;
protected function __construct(string $value)
if (!isset($value) || trim($value) === "") {
throw new \InvalidArgumentException("need any value");
$this->value = $value;
public function getValue()
return $this->value;
public function equals(StringValueObject $arg)
$thisValue = $this->value;
$thisGetValue = $this->getValue();
$argValue = $arg->value;
$argGetValue = $arg->getValue();
return $this->value === $arg->value;