protected function applyScope(ExtendedRepositoryInterface $repository, $scope = null)
    {
        $scope = (null === $scope) ? $this->activeScope : $scope;

        $repository->clearScopes();

        if ($this->hasActiveListParent()) {
            return $this;
        }

        if ($scope) {

            $info = $this->getModelInformation();

            $method = $info->list->scopes[ $scope ]->method ?: $scope;

            $repository->addScope($method);
        }

        return $this;
    }