src/AuthenticationService.php
public function buildIdentity($identityData)
    {
        $class = $this->getConfig('identityClass');

        if (is_callable($class)) {
            $identity = $class($identityData);
        } else {
            $identity = new $class($identityData);
        }

        if (!($identity instanceof IdentityInterface)) {
            throw new RuntimeException(sprintf(
                'Object `%s` does not implement `%s`',
                get_class($identity),
                IdentityInterface::class
            ));
        }

        return $identity;
    }
public function buildIdentity($identityData)
    {
        $class = $this->getConfig('identityClass');

        if (is_callable($class)) {
            $identity = $class($identityData);
        } else {
            $identity = new $class($identityData);
        }

        if (!($identity instanceof IdentityInterface)) {
            throw new RuntimeException(sprintf(
                'Object `%s` does not implement `%s`',
                get_class($identity),
                IdentityInterface::class
            ));
        }

        return $identity;
    }
public function buildIdentity ( $ identityData ) { $ class = $ this -> getConfig ( 'identityClass' ) ; if ( is_callable ( $ class ) ) { $ identity = $ class ( $ identityData ) ; } else { $ identity = new $ class ( $ identityData ) ; } if ( ! ( $ identity instanceof IdentityInterface ) ) { throw new RuntimeException ( sprintf ( 'Object `%s` does not implement `%s`' , get_class ( $ identity ) , IdentityInterface :: class ) ) ; } return $ identity ; }
Builds the identity object

@param \ArrayAccess|array $identityData Identity data
@return \Authentication\IdentityInterface
Builds the identity object