private function buildKey($userObject)
    {
        $key = $this->classMetadata->getPropertyValue($userObject, ClassMetadata::API_KEY_PROPERTY);

        if (empty($key)) {
            $this->classMetadata->modifyProperty(
                $userObject,
                $this->keyFactory->getKey(),
                ClassMetadata::API_KEY_PROPERTY
            );
        }
    }
private function buildKey($userObject)
    {
        $key = $this->classMetadata->getPropertyValue($userObject, ClassMetadata::API_KEY_PROPERTY);

        if (empty($key)) {
            $this->classMetadata->modifyProperty(
                $userObject,
                $this->keyFactory->getKey(),
                ClassMetadata::API_KEY_PROPERTY
            );
        }
    }
private function buildKey ( $ userObject ) { $ key = $ this -> classMetadata -> getPropertyValue ( $ userObject , ClassMetadata :: API_KEY_PROPERTY ) ; if ( empty ( $ key ) ) { $ this -> classMetadata -> modifyProperty ( $ userObject , $ this -> keyFactory -> getKey ( ) , ClassMetadata :: API_KEY_PROPERTY ) ; } }
Simple helper which builds the API key and stores it in the user.

@param object $userObject
Simple helper which builds the API key and stores it in the user .