Code Duplication    Length = 8-8 lines in 2 locations

src/Mvc/Router/Decorator/ExceptionDecorator.php 1 location

@@ 93-100 (lines=8) @@
90
     * @param int $status
91
     * @return \Psr\Http\Message\MessageInterface|Response
92
     */
93
    protected function getResponseWithBodyAndStatus(ResponseInterface $response, string $body, int $status = 200)
94
    {
95
        $stream = new Stream('php://memory', 'r+');
96
        $stream->write($body);
97
        $response = $response->withStatus($status)->withBody($stream);
98
99
        return $response;
100
    }
101
}

src/Mvc/Router/PlatesStrategy.php 1 location

@@ 101-108 (lines=8) @@
98
     * @param int $status
99
     * @return \Psr\Http\Message\MessageInterface|Response
100
     */
101
    private function getResponseWithBodyAndStatus(Response $response, string $body, int $status = 200)
102
    {
103
        $stream = new Stream('php://memory', 'r+');
104
        $stream->write($body);
105
        $response = $response->withStatus($status)->withBody($stream);
106
107
        return $response;
108
    }
109
110
    /**
111
     * Get a middleware that will decorate a NotFoundException