for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MediaMonks\RestApi\Exception;
abstract class AbstractValidationException extends AbstractException implements ExceptionInterface, FieldExceptionInterface
{
/**
* AbstractFieldsException constructor.
* @param string $message
* @param string $code
*/
public function __construct($message, $code)
$this->message = $message;
$this->code = $code;
}
* @return array
public function toArray()
$return = [
'code' => $this->getCode(),
'message' => $this->getMessage(),
];
foreach ($this->getFields() as $field) {
$return['fields'][] = $field->toArray();
return $return;