public function processMappings(ValidatorState $state, Certificate $cert): ValidatorState
    {
        $tree = clone $this;
        if ($state->policyMapping() > 0) {
            $tree->_applyMappings($cert, $state);
        } else if ($state->policyMapping() == 0) {
            $tree->_deleteMappings($cert, $state);
        }
        // if whole tree is pruned
        if (!$tree->_root) {
            return $state->withoutValidPolicyTree();
        }
        return $state->withValidPolicyTree($tree);
    }
public function processMappings(ValidatorState $state, Certificate $cert): ValidatorState
    {
        $tree = clone $this;
        if ($state->policyMapping() > 0) {
            $tree->_applyMappings($cert, $state);
        } else if ($state->policyMapping() == 0) {
            $tree->_deleteMappings($cert, $state);
        }
        // if whole tree is pruned
        if (!$tree->_root) {
            return $state->withoutValidPolicyTree();
        }
        return $state->withValidPolicyTree($tree);
    }
public function processMappings ( ValidatorState $ state , Certificate $ cert ) : ValidatorState { $ tree = clone $ this ; if ( $ state -> policyMapping ( ) > 0 ) { $ tree -> _applyMappings ( $ cert , $ state ) ; } else if ( $ state -> policyMapping ( ) == 0 ) { $ tree -> _deleteMappings ( $ cert , $ state ) ; } // if whole tree is pruned if ( ! $ tree -> _root ) { return $ state -> withoutValidPolicyTree ( ) ; } return $ state -> withValidPolicyTree ( $ tree ) ; }
Process policy mappings from the certificate.

@param ValidatorState $state
@param Certificate $cert
@return ValidatorState
Process policy mappings from the certificate .