Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
26 | final class EchoBodyMiddleware implements MiddlewareInterface |
||
27 | { |
||
28 | /** |
||
29 | * @const string |
||
30 | */ |
||
31 | 2 | const DEFAULT_BUFFER_SIZE = 1024 * 8; |
|
32 | |||
33 | 2 | /** |
|
34 | 2 | * @var int |
|
35 | */ |
||
36 | 2 | private $bufferSize; |
|
37 | |||
38 | /** |
||
39 | * EchoBodyMiddleware constructor. |
||
40 | * |
||
41 | * @param int $bufferSize |
||
42 | */ |
||
43 | public function __construct(int $bufferSize = self::DEFAULT_BUFFER_SIZE) |
||
44 | { |
||
45 | $this->bufferSize = $bufferSize; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
||
65 | } |
||
66 | } |
||
67 |