| 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 | const DEFAULT_BUFFER_SIZE = 1024 * 8; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var int |
||
| 35 | */ |
||
| 36 | private $bufferSize; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * EchoBodyMiddleware constructor. |
||
| 40 | * |
||
| 41 | * @param int $bufferSize |
||
| 42 | */ |
||
| 43 | 4 | public function __construct(int $bufferSize = self::DEFAULT_BUFFER_SIZE) |
|
| 44 | { |
||
| 45 | 4 | $this->bufferSize = $bufferSize; |
|
| 46 | 4 | } |
|
| 47 | |||
| 48 | /** |
||
| 49 | * {@inheritdoc} |
||
| 50 | */ |
||
| 51 | 3 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
| 65 | } |
||
| 66 | } |
||
| 67 |