src/Collection.php
public function findIndex(callable $condition)
    {
        $index = -1;

        for ($i = 0, $collectionLength = count($this->items); $i < $collectionLength; $i++) {
            if ($condition($this->at($i))) {
                $index = $i;
                break;
            }
        }

        return $index;
    }
public function findIndex(callable $condition)
    {
        $index = -1;

        for ($i = 0, $collectionLength = count($this->items); $i < $collectionLength; $i++) {
            if ($condition($this->at($i))) {
                $index = $i;
                break;
            }
        }

        return $index;
    }
public function findIndex ( callable $ condition ) { $ index = - 1 ; for ( $ i = 0 , $ collectionLength = count ( $ this -> items ) ; $ i < $ collectionLength ; $ i ++ ) { if ( $ condition ( $ this -> at ( $ i ) ) ) { $ index = $ i ; break ; } } return $ index ; }
{@inheritdoc}
{