Merge pull request #4 from Karaka-Management/develop

fix phpstan bug regarding implicit isset checks
This commit is contained in:
Dennis Eichhorn 2023-09-30 18:49:08 +02:00 committed by GitHub
commit 53c57047eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}