InvalidRequestPayloadException::getErrors()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Fesor\RequestObject;
4
5
use Symfony\Component\Validator\ConstraintViolationListInterface;
6
7
class InvalidRequestPayloadException extends \Exception
8
{
9
    private $requestObject;
10
11
    private $errors;
12
13
    /**
14
     * InvalidRequestPayloadException constructor.
15
     *
16
     * @param RequestObject                    $requestObject
17
     * @param ConstraintViolationListInterface $errors
18
     */
19
    public function __construct(RequestObject $requestObject, ConstraintViolationListInterface $errors)
20
    {
21
        parent::__construct();
22
23
        $this->requestObject = $requestObject;
24
        $this->errors = $errors;
25
    }
26
27
    /**
28
     * @return RequestObject
29
     */
30
    public function getRequestObject()
31
    {
32
        return $this->requestObject;
33
    }
34
35
    /**
36
     * @return ConstraintViolationListInterface
37
     */
38
    public function getErrors()
39
    {
40
        return $this->errors;
41
    }
42
}
43