diff --git a/src/Psl/Result/ResultInterface.php b/src/Psl/Result/ResultInterface.php index 1e180e49..a37731cb 100644 --- a/src/Psl/Result/ResultInterface.php +++ b/src/Psl/Result/ResultInterface.php @@ -115,8 +115,6 @@ public function getThrowable(): Throwable; * @return bool - `true` if the operation succeeded; `false` otherwise * * @psalm-mutation-free - * - * @psalm-assert-if-true Success $this */ public function isSucceeded(): bool; @@ -128,8 +126,6 @@ public function isSucceeded(): bool; * @return bool - `true` if the operation failed; `false` otherwise * * @psalm-mutation-free - * - * @psalm-assert-if-true Failure $this */ public function isFailed(): bool; diff --git a/tests/static-analysis/Result/result_interface.php b/tests/static-analysis/Result/result_interface.php deleted file mode 100644 index e5f7d0d1..00000000 --- a/tests/static-analysis/Result/result_interface.php +++ /dev/null @@ -1,42 +0,0 @@ - $result - * - * @throws Exception - * - * @return Failure - */ -function return_failure(ResultInterface $result): Failure -{ - if ($result->isFailed()) { - return $result; - } - - throw new Exception(); -} - -/** - * @param ResultInterface $result - * - * @throws Exception - * - * @return Success - */ -function return_success(ResultInterface $result): Success -{ - if ($result->isSucceeded()) { - return $result; - } - - throw new Exception(); -}