From 6d5cde8e1cbcc6654cffde2d282c7da657932c5c Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Sun, 28 Jul 2024 23:25:50 +0200 Subject: [PATCH] Fix accessing private parent class properties in QueryFuture Summary: PHPStan complains about `Access to private property $exception of parent class Future` and `Access to private property $result of parent class Future` in `QueryFuture`. Thus call the corresponding public functions provided by `Future` instead. Test Plan: Run static code analysis; read the code. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25755 --- src/infrastructure/storage/future/QueryFuture.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/infrastructure/storage/future/QueryFuture.php b/src/infrastructure/storage/future/QueryFuture.php index 9878581214..0f1fc3b9d4 100644 --- a/src/infrastructure/storage/future/QueryFuture.php +++ b/src/infrastructure/storage/future/QueryFuture.php @@ -51,7 +51,7 @@ final class QueryFuture extends Future { } public function isReady() { - if ($this->result !== null || $this->exception) { + if ($this->canResolve()) { return true; } @@ -105,7 +105,7 @@ final class QueryFuture extends Future { $this->processResults($this->conn->resolveAsyncQueries($conns, $asyncs)); - if ($this->result !== null || $this->exception) { + if ($this->canResolve()) { return true; } return false;