public function LegacyConstraintViolationBuilder::setCode in Plug 7
Sets the violation code.
Parameters
int $code The violation code:
Return value
ConstraintViolationBuilderInterface This builder
Overrides ConstraintViolationBuilderInterface::setCode
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Violation/ LegacyConstraintViolationBuilder.php, line 134
Class
- LegacyConstraintViolationBuilder
- Backwards-compatible implementation of {@link ConstraintViolationBuilderInterface}.
Namespace
Symfony\Component\Validator\ViolationCode
public function setCode($code) {
$this->code = $code;
return $this;
}