diff --git a/src/Result/Testing/IsErr.php b/src/Result/Testing/IsErr.php index 14228ba..f89cbcf 100644 --- a/src/Result/Testing/IsErr.php +++ b/src/Result/Testing/IsErr.php @@ -5,6 +5,7 @@ namespace Superscript\Monads\Result\Testing; use PHPUnit\Framework\Constraint\Constraint; +use PHPUnit\Util\Exporter; use Superscript\Monads\Result\Result; final class IsErr extends Constraint @@ -21,6 +22,6 @@ public function matches(mixed $other): bool protected function failureDescription(mixed $other): string { - return sprintf('%s %s', $this->exporter()->export($other), $this->toString()); + return sprintf('%s %s', Exporter::export($other), $this->toString()); } } diff --git a/src/Result/Testing/IsOk.php b/src/Result/Testing/IsOk.php index 5be3f43..713bafd 100644 --- a/src/Result/Testing/IsOk.php +++ b/src/Result/Testing/IsOk.php @@ -5,6 +5,7 @@ namespace Superscript\Monads\Result\Testing; use PHPUnit\Framework\Constraint\Constraint; +use PHPUnit\Util\Exporter; use Superscript\Monads\Result\Result; final class IsOk extends Constraint @@ -21,6 +22,6 @@ public function matches(mixed $other): bool protected function failureDescription(mixed $other): string { - return sprintf('%s %s', $this->exporter()->export($other), $this->toString()); + return sprintf('%s %s', Exporter::export($other), $this->toString()); } }