public function detectRules(AppliesToResource $resource, $relationDepth=1)
    {
        $type = $this->typeProvider->xType($resource);
        return $this->ruleConverter->toRule($type, $relationDepth);
    }