From 21d470892f1a474891806c6aceff96146bbcaeec Mon Sep 17 00:00:00 2001 From: Joel Butcher Date: Fri, 17 Apr 2026 15:31:33 +0100 Subject: [PATCH] fix: use Exporter::export(...) --- src/Result/Testing/IsErr.php | 3 ++- src/Result/Testing/IsOk.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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()); } }