public function convert($scopeId, $scope)
    {
        if (is_numeric($scopeId)) {
            return $scopeId;
        }

        $entities = $this->getEntityStore($scope);
        if (isset($entities[$scopeId])) {
            return $entities[$scopeId]->getId();
        }

        throw new ScopeConvertException(sprintf('Unable to process code "%s" for scope "%s"', $scopeId, $scope));
    }