final public function applyRule($parameterName, $value, $itemType = false)
    {
        $test = $this->testConditions($parameterName, $value, $itemType);
        if (!empty($test)) {
            $message = $this->exceptionMessageOnTestFailure($parameterName, $value, $itemType);
            $this->getMethod()
                ->addChild($this->validationRuleComment($value))
                ->addChild(sprintf('if (%s) {', $test))
                ->addChild($this->getMethod()->getIndentedString(sprintf('throw new \InvalidArgumentException(%s, __LINE__);', $message), 1))
                ->addChild('}');
            unset($message);
            Rules::ruleHasBeenAppliedToAttribute($this, $value, $this->getAttribute());
        }
        unset($test);
    }