Passed
Push — dev ( b45126...5faaf1 )
by 世昌
02:13
created

TemplateWrapper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 12
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getWrappedContent() 0 4 1
1
<?php
2
namespace suda\application\wrapper;
3
4
use suda\framework\Response;
5
use suda\framework\http\Stream;
6
use suda\framework\http\stream\StringStream;
7
use suda\framework\response\AbstractContentWrapper;
8
9
/**
10
 * 响应包装器
11
 */
12
class TemplateWrapper extends AbstractContentWrapper
13
{
14
    /**
15
     * 获取内容
16
     *
17
     * @param Response $response
18
     * @return Stream
19
     */
20
    public function getWrappedContent(Response $response):Stream
21
    {
22
        $content = $this->content;
23
        return new StringStream($content->getRenderedString());
24
    }
25
}
26