public function assert($input) { $violations = $this->returnViolationsForConstraint($input, $this->constraint); if (count($violations) == 0) { return true; } throw $this->reportError((string) $violations); }