Passed
Push — master ( b45126...8af3f1 )
by 世昌
03:18
created

NullContentWrapper::getContent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
namespace suda\framework\response\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 NullContentWrapper extends AbstractContentWrapper
13
{
14
    public function __construct()
15
    {
16
        parent::__construct(null, 'null');
17
    }
18
    
19
    /**
20
     * 获取内容
21
     *
22
     * @param Response $response
23
     * @return Stream
24
     */
25
    public function getWrappedContent(Response $response): Stream
26
    {
27
        return new StringStream('');
28
    }
29
}
30