src/Nodes/SVGNodeContainer.php
private function resolveChildIndex($nodeOrIndex)
    {
        if (is_int($nodeOrIndex)) {
            return $nodeOrIndex;
        } elseif ($nodeOrIndex instanceof SVGNode) {
            return array_search($nodeOrIndex, $this->children, true);
        }

        return false;
    }
private function resolveChildIndex($nodeOrIndex)
    {
        if (is_int($nodeOrIndex)) {
            return $nodeOrIndex;
        } elseif ($nodeOrIndex instanceof SVGNode) {
            return array_search($nodeOrIndex, $this->children, true);
        }

        return false;
    }
private function resolveChildIndex ( $ nodeOrIndex ) { if ( is_int ( $ nodeOrIndex ) ) { return $ nodeOrIndex ; } elseif ( $ nodeOrIndex instanceof SVGNode ) { return array_search ( $ nodeOrIndex , $ this -> children , true ) ; } return false ; }
Resolves a child node to its index. If an index is given, it is returned
without modification.

@param SVGNode|int $nodeOrIndex The node (or respective index).

@return int|false The index, or false if argument invalid or not a child.
Resolves a child node to its index . If an index is given it is returned without modification .