-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace PhpPact\Consumer\Matcher\Formatters\Expression; | ||
|
||
use PhpPact\Consumer\Matcher\Exception\MatcherNotSupportedException; | ||
use PhpPact\Consumer\Matcher\Model\Expression; | ||
use PhpPact\Consumer\Matcher\Model\FormatterInterface; | ||
use PhpPact\Consumer\Matcher\Model\Matcher\ExpressionFormattableInterface; | ||
use PhpPact\Consumer\Matcher\Model\MatcherInterface; | ||
|
||
class ExpressionFormatter implements FormatterInterface | ||
{ | ||
public function format(MatcherInterface $matcher): Expression | ||
{ | ||
if (!$matcher instanceof ExpressionFormattableInterface) { | ||
throw new MatcherNotSupportedException('Matcher does not support expression format'); | ||
} | ||
|
||
return $matcher->formatExpression(); | ||
} | ||
} |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.