You are here

public function LegacyConstraintViolationBuilder::setCode in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Violation/LegacyConstraintViolationBuilder.php \Symfony\Component\Validator\Violation\LegacyConstraintViolationBuilder::setCode()

Sets the violation code.

Parameters

int $code The violation code:

Return value

ConstraintViolationBuilderInterface This builder

Overrides ConstraintViolationBuilderInterface::setCode

File

vendor/symfony/validator/Violation/LegacyConstraintViolationBuilder.php, line 136

Class

LegacyConstraintViolationBuilder
Backwards-compatible implementation of {@link ConstraintViolationBuilderInterface}.

Namespace

Symfony\Component\Validator\Violation

Code

public function setCode($code) {
  $this->code = $code;
  return $this;
}