src/Micrometa/Ports/Item/ItemList.php
protected function getItemByTypeAndIndex($type, $index)
    {
        $typeItems = $this->getItems($type);

        // If the item index is out of bounds
        if (count($typeItems) <= $index) {
            throw new OutOfBoundsException(
                sprintf(OutOfBoundsException::INVALID_ITEM_INDEX_STR, $index),
                OutOfBoundsException::INVALID_ITEM_INDEX
            );
        }

        return $typeItems[$index];
    }
protected function getItemByTypeAndIndex($type, $index)
    {
        $typeItems = $this->getItems($type);

        // If the item index is out of bounds
        if (count($typeItems) <= $index) {
            throw new OutOfBoundsException(
                sprintf(OutOfBoundsException::INVALID_ITEM_INDEX_STR, $index),
                OutOfBoundsException::INVALID_ITEM_INDEX
            );
        }

        return $typeItems[$index];
    }
protected function getItemByTypeAndIndex ( $ type , $ index ) { $ typeItems = $ this -> getItems ( $ type ) ; // If the item index is out of bounds if ( count ( $ typeItems ) <= $ index ) { throw new OutOfBoundsException ( sprintf ( OutOfBoundsException :: INVALID_ITEM_INDEX_STR , $ index ) , OutOfBoundsException :: INVALID_ITEM_INDEX ) ; } return $ typeItems [ $ index ] ; }
Return an item by type and index

@param string $type Item type
@param int $index   Item index

@return ItemInterface Item
@throws OutOfBoundsException If the item index is out of bounds
Return an item by type and index