From c13bfec6722a04efcbe564ef858cda2fbdc97632 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Fri, 6 May 2022 14:18:18 +0200 Subject: [PATCH] Add a missing return statement This is now necessary since a return type hint was added. This backports #27 to the 3.x and intermediate branches. --- Tree/Finder.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tree/Finder.php b/Tree/Finder.php index 8a2d5ca..5941a1f 100644 --- a/Tree/Finder.php +++ b/Tree/Finder.php @@ -72,8 +72,10 @@ public function lookup($provided): ?Node } } - if (null !== $bestId) { - return $this->objects[$this->idToHash[$bestId]]; + if (null === $bestId) { + return null; } + + return $this->objects[$this->idToHash[$bestId]]; } }