From 5fe94e5fa9fa42b20bfa6ebef2dfdf5306288470 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 (#27) This is now necessary since a return type hint was added. --- src/Tree/Finder.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Tree/Finder.php b/src/Tree/Finder.php index 8a2d5ca..5941a1f 100644 --- a/src/Tree/Finder.php +++ b/src/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]]; } }