protected function validateNodeType(string $nodeType): string
    {
        if (!in_array($nodeType, static::$validNodeTypes)) {
            throw new \InvalidArgumentException(
                "invalid value node type '$nodeType'; expecting ".
                \sndsgd\Arr::implode(", ", static::$validNodeTypes, "or ")
            );
        }
        return $nodeType;
    }
protected function validateNodeType(string $nodeType): string
    {
        if (!in_array($nodeType, static::$validNodeTypes)) {
            throw new \InvalidArgumentException(
                "invalid value node type '$nodeType'; expecting ".
                \sndsgd\Arr::implode(", ", static::$validNodeTypes, "or ")
            );
        }
        return $nodeType;
    }
protected function validateNodeType ( string $ nodeType ) : string { if ( ! in_array ( $ nodeType , static :: $ validNodeTypes ) ) { throw new \ InvalidArgumentException ( "invalid value node type '$nodeType'; expecting " . \ sndsgd \ Arr :: implode ( ", " , static :: $ validNodeTypes , "or " ) ) ; } return $ nodeType ; }
Verify a node type is valid

@param string $nodeType The value to verify
@return string The verified node type
@throws \InvalidArgumentException If the node type is not valid
Verify a node type is valid