InvalidRequestPayloadException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 36
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getRequestObject() 0 4 1
A getErrors() 0 4 1
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