File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change 7
7
use Symfony \Component \Validator \ConstraintViolation ;
8
8
use Symfony \Component \Validator \ConstraintViolationListInterface ;
9
9
10
- class RequestObject implements ErrorResponseProvider
10
+ class RequestObject
11
11
{
12
12
private $ payload ;
13
13
@@ -59,20 +59,4 @@ public function all()
59
59
{
60
60
return $ this ->payload ;
61
61
}
62
-
63
- /**
64
- * @param ConstraintViolationListInterface $errors
65
- *
66
- * @return JsonResponse|\Symfony\Component\HttpFoundation\Response
67
- */
68
- public function getErrorResponse (ConstraintViolationListInterface $ errors )
69
- {
70
- return new JsonResponse ([
71
- 'errors ' => array_map (function (ConstraintViolation $ violation ) {
72
- return [
73
- $ violation ->getPropertyPath () => $ violation ->getMessage (),
74
- ];
75
- }, iterator_to_array ($ errors ))
76
- ], 422 );
77
- }
78
62
}
You can’t perform that action at this time.
0 commit comments