for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ElevenLabs\Api\Validator;
/**
* ValueObject that contains constraint violation properties
*/
class ConstraintViolation
{
/** @var string */
private $property;
private $message;
private $constraint;
private $location;
* @param string $property
* @param string $message
* @param string $constraint
* @param string $location
public function __construct($property, $message, $constraint, $location)
$this->property = $property;
$this->message = $message;
$this->constraint = $constraint;
$this->location = $location;
}
* @return string
public function getProperty()
return $this->property;
public function getMessage()
return $this->message;
public function getConstraint()
return $this->constraint;
public function getLocation()
return $this->location;
public function toArray()
return [
'property' => $this->getProperty(),
'message' => $this->getMessage(),
'constraint' => $this->getConstraint(),
'location' => $this->getLocation()
];