| Total Complexity | 4 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class HtmlMiddleware implements MiddlewareInterface |
||
| 11 | { |
||
| 12 | const MODE_PREPEND = 0; |
||
| 13 | const MODE_APPEND = 1; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | private $string; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var int |
||
| 22 | */ |
||
| 23 | private $mode; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * HtmlMiddleware constructor. |
||
| 27 | * @param string $string |
||
| 28 | * @param int $mode |
||
| 29 | */ |
||
| 30 | public function __construct(string $string, int $mode = 0) |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param ServerRequestInterface $request |
||
| 38 | * @param RequestHandlerInterface $handler |
||
| 39 | * @return ResponseInterface |
||
| 40 | */ |
||
| 41 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
||
| 71 |