protected function replaceRequiredForRequiredWith(ValidationRuleDataInterface $rule, array $requiredWithKeys)
    {
        $rules = array_diff($rule->rules(), ['required']);

        // If there are no required_with keys to replace it with, leave the rule out
        if (count($requiredWithKeys)) {

            $rules[] = 'required_with:' . implode(',', $requiredWithKeys);
        }

        $rule->setRules($rules);
    }