src/Model/Attribute/Accessor/Identity.php
public function setIdentity(?string $identity)
    {
        if (null !== $identity) {
            if (!preg_match('/^[a-z]+$/i', $identity)) {
                throw new DomainException('Identity is not valid.');
            }
        }

        $this->identity = $identity;

        return $this;
    }
public function setIdentity(?string $identity)
    {
        if (null !== $identity) {
            if (!preg_match('/^[a-z]+$/i', $identity)) {
                throw new DomainException('Identity is not valid.');
            }
        }

        $this->identity = $identity;

        return $this;
    }
public function setIdentity ( ? string $ identity ) { if ( null !== $ identity ) { if ( ! preg_match ( '/^[a-z]+$/i' , $ identity ) ) { throw new DomainException ( 'Identity is not valid.' ) ; } } $ this -> identity = $ identity ; return $ this ; }
Set identity

@param string $identity
@return object
@throws \DomainException
Set identity