Passed
Push — master ( d6fdae...fe741a )
by Michael
02:29
created

AbstractJsonApiView   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 36
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getStatus() 0 4 1
A getHeaders() 0 4 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Mikemirten\Bundle\JsonApiBundle\Response;
5
6
/**
7
 * Abstract Json API view supposed to get handled and converted into a response
8
 *
9
 * @package Mikemirten\Bundle\JsonApiBundle\Response
10
 */
11
abstract class AbstractJsonApiView
12
{
13
    /**
14
     * Status code
15
     *
16
     * @var int
17
     */
18
    protected $status = 200;
19
20
    /**
21
     * Response headers
22
     *
23
     * @var array
24
     */
25
    protected $headers = [];
26
27
    /**
28
     * Get status code
29
     *
30
     * @return int
31
     */
32
    public function getStatus(): int
33
    {
34
        return $this->status;
35
    }
36
37
    /**
38
     * Get response headers
39
     *
40
     * @return array
41
     */
42
    public function getHeaders(): array
43
    {
44
        return $this->headers;
45
    }
46
}