Skip to content

Commit

Permalink
improve search performance (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
fivetide authored Mar 28, 2023
1 parent 8382ce0 commit be8fb09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Actions/SearchRequestAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ private function searchForMatchingExpectation(ServerRequestInterface $request):

private function getNextMatchingExpectation(?Expectation $lastFound, ServerRequestInterface $request, Expectation $expectation): ?Expectation
{
if ($this->comparator->equals($request, $expectation)) {
if (null === $lastFound || $expectation->getPriority() > $lastFound->getPriority()) {
if (null === $lastFound || $expectation->getPriority() > $lastFound->getPriority()) {
if ($this->comparator->equals($request, $expectation)) {
$lastFound = $expectation;
}
}
Expand Down

0 comments on commit be8fb09

Please sign in to comment.