Skip to content

Commit

Permalink
chore: minor perf improvement in ReadListener (#4938)
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas authored Sep 13, 2022
1 parent 6212380 commit d3f5fb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/EventListener/ReadListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function onKernelRequest(RequestEvent $event): void
return;
}

if (!$operation || !($operation->canRead() ?? true) || !$attributes['receive'] || (!$operation->getUriVariables() && !$request->isMethodSafe()) || ($operation->getExtraProperties()['is_legacy_resource_metadata'] ?? false) || ($operation->getExtraProperties()['is_legacy_subresource'] ?? false)) {
if (!$attributes['receive'] || !$operation || !($operation->canRead() ?? true) || (($extraProperties = $operation->getExtraProperties())['is_legacy_resource_metadata'] ?? false) || ($extraProperties['is_legacy_subresource'] ?? false) || (!$operation->getUriVariables() && !$request->isMethodSafe())) {
return;
}

Expand Down

0 comments on commit d3f5fb8

Please sign in to comment.