You are here

public function ConstraintViolationBuilderInterface::setCode in Plug 7

Sets the violation code.

Parameters

int $code The violation code:

Return value

ConstraintViolationBuilderInterface This builder

2 methods override ConstraintViolationBuilderInterface::setCode()
ConstraintViolationBuilder::setCode in lib/Symfony/validator/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php
Sets the violation code.
LegacyConstraintViolationBuilder::setCode in lib/Symfony/validator/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php
Sets the violation code.

File

lib/Symfony/validator/Symfony/Component/Validator/Violation/ConstraintViolationBuilderInterface.php, line 100

Class

ConstraintViolationBuilderInterface
Builds {@link \Symfony\Component\Validator\ConstraintViolationInterface} objects.

Namespace

Symfony\Component\Validator\Violation

Code

public function setCode($code);