Completed
Push — master ( 3cfb1c...f571fc )
by Derek Stephen
02:30
created

LayoutResponse::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 4
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
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 1
    public function __construct($html, string $layout, int $status = 200, array $headers = [])
18
    {
19 1
        parent::__construct($html, $status, $headers);
20 1
        $this->layout = $layout;
21 1
    }
22
23
    /**
24
     * @return string
25
     */
26 1
    public function getLayout(): string
27
    {
28 1
        return $this->layout;
29
    }
30
}