protected function replaceKeyPlaceholders()
    {
        if ( ! $this->model) {
            return $this;
        }

        $placeholder = static::MODEL_KEY_PLACEHOLDER;

        foreach ($this->rules as $key => &$ruleSet) {

            if (is_string($ruleSet)) {

                $ruleSet = str_replace($placeholder, $this->model->getKey(), $ruleSet);
                continue;
            }

            if (is_array($ruleSet)) {

                foreach ($ruleSet as &$rule) {
                    $rule = str_replace($placeholder, $this->model->getKey(), $rule);
                }

                unset($rule);
            }
        }

        unset($ruleSet);

        return $this;
    }