src/ContainerTrait.php
protected function getIndex(ViewController $compare = null)
    {
        if (is_null($compare)) {
            return null;
        }

        $index = null;
        foreach ($this->elements as $i => $element) {
            if ($element === $compare) {
                $index = $i;
            }
        }

        return $index;
    }
protected function getIndex(ViewController $compare = null)
    {
        if (is_null($compare)) {
            return null;
        }

        $index = null;
        foreach ($this->elements as $i => $element) {
            if ($element === $compare) {
                $index = $i;
            }
        }

        return $index;
    }
@param ViewController $compare

@return int|null