src/Matchers/Trees/TrieNode.php
public function getAllChildren(): array
    {
        $children = [];

        foreach ($this->literalChildrenByValue as $childNode) {
            $children[] = $childNode;
        }

        foreach ($this->variableChildren as $childNode) {
            $children[] = $childNode;
        }

        return $children;
    }
public function getAllChildren(): array
    {
        $children = [];

        foreach ($this->literalChildrenByValue as $childNode) {
            $children[] = $childNode;
        }

        foreach ($this->variableChildren as $childNode) {
            $children[] = $childNode;
        }

        return $children;
    }
Gets all the child nodes

@return TrieNode[] The child nodes