File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ private function generate(
142142 return $ this ->urlGenerator ->generate (
143143 $ name ,
144144 array_merge ($ attributes , $ queryParams ),
145- null !== $ request ? SymfonyUrlGeneratorInterface::ABSOLUTE_URL : SymfonyUrlGeneratorInterface::ABSOLUTE_PATH
145+ $ request instanceof ServerRequestInterface ? SymfonyUrlGeneratorInterface::ABSOLUTE_URL : SymfonyUrlGeneratorInterface::ABSOLUTE_PATH
146146 );
147147 } catch (SymfonyInvalidParameterException |SymfonyMissingMandatoryParametersException $ exception ) {
148148 throw RouteGenerationException::create (
@@ -205,7 +205,7 @@ private function getRouteCollection(array $routes): RouteCollection
205205
206206 private function getRequestContext (?ServerRequestInterface $ request = null ): RequestContext
207207 {
208- if (null === $ request ) {
208+ if (! $ request instanceof ServerRequestInterface ) {
209209 return new RequestContext ($ this ->basePath );
210210 }
211211
You can’t perform that action at this time.
0 commit comments