From 86e23bb9d1df8828d464181d963c5bb943a8a270 Mon Sep 17 00:00:00 2001 From: pine3ree Date: Wed, 18 Oct 2023 14:28:17 +0200 Subject: [PATCH] Reorder conditions Signed-off-by: pine3ree --- src/Sql/Clause/Join.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Sql/Clause/Join.php b/src/Sql/Clause/Join.php index 71564234..d62557a1 100644 --- a/src/Sql/Clause/Join.php +++ b/src/Sql/Clause/Join.php @@ -188,14 +188,14 @@ public function __get(string $name) return $this->specification; } if ('on' === $name) { + if ($this->specification instanceof On) { + return $this->specification; + } if ($this->specification === null) { $this->specification = new On(); $this->specification->setParent($this); return $this->specification; } - if ($this->specification instanceof On) { - return $this->specification; - } return null; }