lib/Persistence/Doctrine/Handler/LayoutResolverHandler.php
private function getRulePriority(RuleCreateStruct $ruleCreateStruct): int
    {
        if (is_int($ruleCreateStruct->priority)) {
            return $ruleCreateStruct->priority;
        }

        $lowestRulePriority = $this->queryHandler->getLowestRulePriority();
        if ($lowestRulePriority !== null) {
            return $lowestRulePriority - 10;
        }

        return 0;
    }
private function getRulePriority(RuleCreateStruct $ruleCreateStruct): int
    {
        if (is_int($ruleCreateStruct->priority)) {
            return $ruleCreateStruct->priority;
        }

        $lowestRulePriority = $this->queryHandler->getLowestRulePriority();
        if ($lowestRulePriority !== null) {
            return $lowestRulePriority - 10;
        }

        return 0;
    }
private function getRulePriority ( RuleCreateStruct $ ruleCreateStruct ) : int { if ( is_int ( $ ruleCreateStruct -> priority ) ) { return $ ruleCreateStruct -> priority ; } $ lowestRulePriority = $ this -> queryHandler -> getLowestRulePriority ( ) ; if ( $ lowestRulePriority !== null ) { return $ lowestRulePriority - 10 ; } return 0 ; }
Returns the rule priority when creating a new rule.

If priority is specified in the struct, it is used automatically. Otherwise,
the returned priority is the lowest available priority subtracted by 10 (to allow
inserting rules in between).

If no rules exist, priority is 0.
Returns the rule priority when creating a new rule .