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

@@ 122-129 (lines=8) @@
119
     * @param int $status
120
     * @return \Psr\Http\Message\MessageInterface|Response
121
     */
122
    private function getResponseWithBodyAndStatus(Response $response, string $body, int $status = 200)
123
    {
124
        $stream = new Stream('php://memory', 'r+');
125
        $stream->write($body);
126
        $response = $response->withStatus($status)->withBody($stream);
127
128
        return $response;
129
    }
130
131
    /**
132
     * Get a middleware that will decorate a NotFoundException