You are here

public function ConstraintViolationList::__toString in Zircon Profile 8

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

Converts the violation into a string for debugging purposes.

Return value

string The violation as string.

File

vendor/symfony/validator/ConstraintViolationList.php, line 43

Class

ConstraintViolationList
Default implementation of {@ConstraintViolationListInterface}.

Namespace

Symfony\Component\Validator

Code

public function __toString() {
  $string = '';
  foreach ($this->violations as $violation) {
    $string .= $violation . "\n";
  }
  return $string;
}