original_string: public function getIndex()
  	{
  		$index = false;
  		
  		// if this element has a parent
  		if ( ! empty($this->parent)) {
  			$index = $this->parent->getChildIndex($this);
  			// if we didn't find the child, something is wrong 
  			if ($index === false) {
  				throw new \BadMethodCallException(
  					__METHOD__."() expects this element to be a child of its parent"
  				);
  			}
  		} else {
  			throw new \BadMethodCallException(
  				__METHOD__."() expects this element to have a parent element"
  			);
  		}
  		
  		return $index;
  	}
code: public function getIndex()
  	{
  		$index = false;
  		
  		// if this element has a parent
  		if ( ! empty($this->parent)) {
  			$index = $this->parent->getChildIndex($this);
  			// if we didn't find the child, something is wrong 
  			if ($index === false) {
  				throw new \BadMethodCallException(
  					__METHOD__."() expects this element to be a child of its parent"
  				);
  			}
  		} else {
  			throw new \BadMethodCallException(
  				__METHOD__."() expects this element to have a parent element"
  			);
  		}
  		
  		return $index;
  	}
code_tokens: public function getIndex ( ) { $ index = false ; // if this element has a parent if ( ! empty ( $ this -> parent ) ) { $ index = $ this -> parent -> getChildIndex ( $ this ) ; // if we didn't find the child, something is wrong  if ( $ index === false ) { throw new \ BadMethodCallException ( __METHOD__ . "() expects this element to be a child of its parent" ) ; } } else { throw new \ BadMethodCallException ( __METHOD__ . "() expects this element to have a parent element" ) ; } return $ index ; }
docstring: Returns this element's index in its parent children
  
  Warning! This method may return a boolean false, but it may also return an
  integer value that evaluates to false. Use the strict comparison operator,
  "===" when testing the return value of this method.
  
  @return  int|false
  @throws  BadMethodCallException  if the element doesn't have a parent
  @throws  BadMethodCallException  if the element's parent doesn't have children
  @throws  BadMethodCallException  if the element is not a child of its parent
  @since  0.1.0
docstring_tokens: Returns this element s index in its parent children