Code Duplication    Length = 4-4 lines in 2 locations

src/Router.php 2 locations

@@ 126-129 (lines=4) @@
123
        string $requestedPath,
124
        string $folder = ''
125
    ) {
126
        if (!in_array($method, self::$validRequestMethods, true)) {
127
            $message = sprintf('%s is not valid Http request method.', $method);
128
            throw new UnexpectedValueException($message);
129
        }
130
        $this->method   = $method;
131
        $this->requestedPath     = $this->extractFolder($requestedPath, $folder);
132
        $this->defaultReturnType = self::$translations[$defaultReturnType] ?? self::$validReturnTypes[0];
@@ 202-205 (lines=4) @@
199
     */
200
    private function checkRequestMethodIsValid(string $requestMethod)
201
    {
202
        if (!in_array(strtoupper($requestMethod), self::$validRequestMethods, true)) {
203
            $message = sprintf('%s is not valid Http request method.', $requestMethod);
204
            throw new UnexpectedValueException($message);
205
        }
206
    }
207
208
    /**