for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Napp\Core\Api\Exceptions\Exceptions;
use JsonSerializable;
/**
* Class ValidationException.
*/
class ValidationException extends Exception implements JsonSerializable
{
* The suggested HTTP response code.
*
* @var int
public $responseCode = 400;
* The suggested status code.
* @var string
public $statusCode = 215;
* The suggested status message.
public $statusMessage = 'Validation failed';
* @var array
public $validation;
* Define the output format.
public function jsonSerialize()
return [
'error' => [
'code' => $this->statusCode,
'message' => $this->statusMessage,
'validation' => $this->validation,
],
];
}