original_string: public function setIndexByName($sheetName, $newIndex)
      {
          $oldIndex = $this->getIndex($this->getSheetByName($sheetName));
          $pSheet = array_splice(
              $this->workSheetCollection,
              $oldIndex,
              1
          );
          array_splice(
              $this->workSheetCollection,
              $newIndex,
              0,
              $pSheet
          );
          return $newIndex;
      }
code: public function setIndexByName($sheetName, $newIndex)
      {
          $oldIndex = $this->getIndex($this->getSheetByName($sheetName));
          $pSheet = array_splice(
              $this->workSheetCollection,
              $oldIndex,
              1
          );
          array_splice(
              $this->workSheetCollection,
              $newIndex,
              0,
              $pSheet
          );
          return $newIndex;
      }
code_tokens: public function setIndexByName ( $ sheetName , $ newIndex ) { $ oldIndex = $ this -> getIndex ( $ this -> getSheetByName ( $ sheetName ) ) ; $ pSheet = array_splice ( $ this -> workSheetCollection , $ oldIndex , 1 ) ; array_splice ( $ this -> workSheetCollection , $ newIndex , 0 , $ pSheet ) ; return $ newIndex ; }
docstring: Set index for sheet by sheet name.
  
  @param  string $sheetName Sheet name to modify index for
  @param  int $newIndex New index for the sheet
  @return New sheet index
  @throws PHPExcel_Exception
docstring_tokens: Set index for sheet by sheet name .