Skip to content

Commit

Permalink
Merge pull request #596 from tienvx/use-intersection-types-feature
Browse files Browse the repository at this point in the history
refactor: Use intersection types
  • Loading branch information
tienvx authored May 3, 2024
2 parents 330ea72 + 1b49d83 commit 544eb79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PhpPact/Consumer/Matcher/Matcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,9 @@ public function matchingField(string $fieldName): MatcherInterface
return $this->withFormatter(new MatchingField($fieldName));
}

private function withFormatter(MatcherInterface $matcher): MatcherInterface
private function withFormatter(MatcherInterface&FormatterAwareInterface $matcher): MatcherInterface
{
if ($matcher instanceof FormatterAwareInterface && $this->formatter) {
if ($this->formatter) {
$matcher->setFormatter($this->formatter);
}

Expand Down

0 comments on commit 544eb79

Please sign in to comment.