Passed
Push — master ( 9e8be3...b4e8bc )
by Derek Stephen
07:49
created

LayoutResponse   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 5
c 1
b 0
f 1
dl 0
loc 24
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getLayout() 0 3 1
1
<?php
2
3
namespace Bone\Http\Response;
4
5
class LayoutResponse extends HtmlResponse
6
{
7
    /** @var string $layout */
8
    private $layout;
9
10
    /**
11
     * LayoutResponse constructor.
12
     * @param $html
13
     * @param string $layout
14
     * @param int $status
15
     * @param array $headers
16
     */
17
    public function __construct($html, string $layout, int $status = 200, array $headers = [])
18
    {
19
        parent::__construct($html, $status, $headers);
20
        $this->layout = $layout;
21
    }
22
23
    /**
24
     * @return string
25
     */
26
    public function getLayout(): string
27
    {
28
        return $this->layout;
29
    }
30
}