From 111fe51d11c7a9b441d2d2d00c91924c59fe470c Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 30 Sep 2023 14:35:13 +0000 Subject: [PATCH] fix phpstan bug regarding implicit isset checks --- Controller/ApiController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 6f19313..c94aaf5 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -153,8 +153,12 @@ final class ApiController extends Controller // Handle to if (($bill->client?->id ?? 0) !== 0) { + // @todo: remove phpstan this is just a bug fix until phpstan fixes this bug + /** @phpstan-ignore-next-line */ $transaction->to = $bill->client->id; } elseif (($bill->supplier?->id ?? 0) !== 0) { + // @todo: remove phpstan this is just a bug fix until phpstan fixes this bug + /** @phpstan-ignore-next-line */ $transaction->to = $bill->supplier->id; } @@ -166,8 +170,12 @@ final class ApiController extends Controller } else { // Handle from if (($bill->client?->id ?? 0) !== 0) { + // @todo: remove phpstan this is just a bug fix until phpstan fixes this bug + /** @phpstan-ignore-next-line */ $transaction->from = $bill->client->id; } elseif (($bill->supplier?->id ?? 0) !== 0) { + // @todo: remove phpstan this is just a bug fix until phpstan fixes this bug + /** @phpstan-ignore-next-line */ $transaction->from = $bill->supplier->id; }