1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 06:42:42 +01:00

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
This commit is contained in:
Andre Klapper 2024-07-28 23:25:50 +02:00
parent 349f006904
commit 6d5cde8e1c

View file

@ -51,7 +51,7 @@ final class QueryFuture extends Future {
} }
public function isReady() { public function isReady() {
if ($this->result !== null || $this->exception) { if ($this->canResolve()) {
return true; return true;
} }
@ -105,7 +105,7 @@ final class QueryFuture extends Future {
$this->processResults($this->conn->resolveAsyncQueries($conns, $asyncs)); $this->processResults($this->conn->resolveAsyncQueries($conns, $asyncs));
if ($this->result !== null || $this->exception) { if ($this->canResolve()) {
return true; return true;
} }
return false; return false;