src/main/php/routing/Routing.php
private function handleNonMethodMatchingRoutes(
            CalledUri $calledUri,
            MatchingRoutes $matchingRoutes
    ): UriResource {
        if ($calledUri->methodEquals('OPTIONS')) {
            return new ResourceOptions(
                    $this->injector,
                    $calledUri,
                    $this->collectInterceptors($calledUri),
                    $this->supportedMimeTypes(),
                    $matchingRoutes

            );
        }

        return new MethodNotAllowed(
                $this->injector,
                $calledUri,
                $this->collectInterceptors($calledUri),
                $this->supportedMimeTypes(),
                $matchingRoutes->allowedMethods()
        );
    }
private function handleNonMethodMatchingRoutes(
            CalledUri $calledUri,
            MatchingRoutes $matchingRoutes
    ): UriResource {
        if ($calledUri->methodEquals('OPTIONS')) {
            return new ResourceOptions(
                    $this->injector,
                    $calledUri,
                    $this->collectInterceptors($calledUri),
                    $this->supportedMimeTypes(),
                    $matchingRoutes

            );
        }

        return new MethodNotAllowed(
                $this->injector,
                $calledUri,
                $this->collectInterceptors($calledUri),
                $this->supportedMimeTypes(),
                $matchingRoutes->allowedMethods()
        );
    }
private function handleNonMethodMatchingRoutes ( CalledUri $ calledUri , MatchingRoutes $ matchingRoutes ) : UriResource { if ( $ calledUri -> methodEquals ( 'OPTIONS' ) ) { return new ResourceOptions ( $ this -> injector , $ calledUri , $ this -> collectInterceptors ( $ calledUri ) , $ this -> supportedMimeTypes ( ) , $ matchingRoutes ) ; } return new MethodNotAllowed ( $ this -> injector , $ calledUri , $ this -> collectInterceptors ( $ calledUri ) , $ this -> supportedMimeTypes ( ) , $ matchingRoutes -> allowedMethods ( ) ) ; }
creates a processable route when a route can be found regardless of request method

@param   \stubbles\webapp\routing\CalledUri       $calledUri
@param   \stubbles\webapp\routing\MatchingRoutes  $matchingRoutes
@return  \stubbles\webapp\routing\UriResource
creates a processable route when a route can be found regardless of request method