This commit is contained in:
2023-10-24 17:22:32 +08:00
parent 9c2a349242
commit 9c3c1cfd82
11 changed files with 45 additions and 55 deletions
+6 -1
View File
@@ -138,7 +138,12 @@ class HashMap implements \ArrayAccess, \IteratorAggregate
}
public static function Tree(HashMap $root, string $leaf)
/**
* @param HashMap $root
* @param string $leaf
* @return HashMap
*/
public static function Tree(HashMap $root, string $leaf): HashMap
{
if ($root->has($leaf)) {
$hashMap = $root->get($leaf);