Total Complexity | 4 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class ApiResourceFacadeResponse |
||
12 | { |
||
13 | private $serializer; |
||
14 | |||
15 | private $resource; |
||
16 | |||
17 | private $acceptHeader; |
||
18 | |||
19 | /** |
||
20 | * @param ResourceSerializerInterface $serializer |
||
21 | * @param mixed $resource |
||
22 | * @param string|null $acceptHeader |
||
23 | */ |
||
24 | public function __construct( |
||
25 | ResourceSerializerInterface $serializer, |
||
26 | $resource, |
||
27 | ?string $acceptHeader |
||
28 | ) { |
||
29 | $this->serializer = $serializer; |
||
30 | $this->resource = $resource; |
||
31 | $this->acceptHeader = $acceptHeader; |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return mixed |
||
36 | */ |
||
37 | public function getResource() |
||
38 | { |
||
39 | return $this->resource; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return ResponseInterface |
||
44 | */ |
||
45 | public function getResponse(): ResponseInterface |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * Gets data the way we would send it normalized. |
||
52 | * |
||
53 | * @return mixed |
||
54 | */ |
||
55 | public function getNormalizedData() |
||
60 |