original_string: private function updateSingleCellReference($pCellReference = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0)
      {
          if (strpos($pCellReference, ':') === false && strpos($pCellReference, ',') === false) {
              // Get coordinates of $pBefore
              list($beforeColumn, $beforeRow) = PHPExcel_Cell::coordinateFromString($pBefore);
  
              // Get coordinates of $pCellReference
              list($newColumn, $newRow) = PHPExcel_Cell::coordinateFromString($pCellReference);
  
              // Verify which parts should be updated
              $updateColumn = (($newColumn{0} != '$') && ($beforeColumn{0} != '$') && (PHPExcel_Cell::columnIndexFromString($newColumn) >= PHPExcel_Cell::columnIndexFromString($beforeColumn)));
              $updateRow = (($newRow{0} != '$') && ($beforeRow{0} != '$') && $newRow >= $beforeRow);
  
              // Create new column reference
              if ($updateColumn) {
                  $newColumn    = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($newColumn) - 1 + $pNumCols);
              }
  
              // Create new row reference
              if ($updateRow) {
                  $newRow    = $newRow + $pNumRows;
              }
  
              // Return new reference
              return $newColumn . $newRow;
          } else {
              throw new PHPExcel_Exception("Only single cell references may be passed to this method.");
          }
      }
code: private function updateSingleCellReference($pCellReference = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0)
      {
          if (strpos($pCellReference, ':') === false && strpos($pCellReference, ',') === false) {
              // Get coordinates of $pBefore
              list($beforeColumn, $beforeRow) = PHPExcel_Cell::coordinateFromString($pBefore);
  
              // Get coordinates of $pCellReference
              list($newColumn, $newRow) = PHPExcel_Cell::coordinateFromString($pCellReference);
  
              // Verify which parts should be updated
              $updateColumn = (($newColumn{0} != '$') && ($beforeColumn{0} != '$') && (PHPExcel_Cell::columnIndexFromString($newColumn) >= PHPExcel_Cell::columnIndexFromString($beforeColumn)));
              $updateRow = (($newRow{0} != '$') && ($beforeRow{0} != '$') && $newRow >= $beforeRow);
  
              // Create new column reference
              if ($updateColumn) {
                  $newColumn    = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($newColumn) - 1 + $pNumCols);
              }
  
              // Create new row reference
              if ($updateRow) {
                  $newRow    = $newRow + $pNumRows;
              }
  
              // Return new reference
              return $newColumn . $newRow;
          } else {
              throw new PHPExcel_Exception("Only single cell references may be passed to this method.");
          }
      }
code_tokens: private function updateSingleCellReference ( $ pCellReference = 'A1' , $ pBefore = 'A1' , $ pNumCols = 0 , $ pNumRows = 0 ) { if ( strpos ( $ pCellReference , ':' ) === false && strpos ( $ pCellReference , ',' ) === false ) { // Get coordinates of $pBefore list ( $ beforeColumn , $ beforeRow ) = PHPExcel_Cell :: coordinateFromString ( $ pBefore ) ; // Get coordinates of $pCellReference list ( $ newColumn , $ newRow ) = PHPExcel_Cell :: coordinateFromString ( $ pCellReference ) ; // Verify which parts should be updated $ updateColumn = ( ( $ newColumn { 0 } != '$' ) && ( $ beforeColumn { 0 } != '$' ) && ( PHPExcel_Cell :: columnIndexFromString ( $ newColumn ) >= PHPExcel_Cell :: columnIndexFromString ( $ beforeColumn ) ) ) ; $ updateRow = ( ( $ newRow { 0 } != '$' ) && ( $ beforeRow { 0 } != '$' ) && $ newRow >= $ beforeRow ) ; // Create new column reference if ( $ updateColumn ) { $ newColumn = PHPExcel_Cell :: stringFromColumnIndex ( PHPExcel_Cell :: columnIndexFromString ( $ newColumn ) - 1 + $ pNumCols ) ; } // Create new row reference if ( $ updateRow ) { $ newRow = $ newRow + $ pNumRows ; } // Return new reference return $ newColumn . $ newRow ; } else { throw new PHPExcel_Exception ( "Only single cell references may be passed to this method." ) ; } }
docstring: Update single cell reference
  
  @param    string    $pCellReference        Single cell reference
  @param    int        $pBefore            Insert before this one
  @param    int        $pNumCols            Number of columns to increment
  @param    int        $pNumRows            Number of rows to increment
  @return    string    Updated cell reference
  @throws    PHPExcel_Exception
docstring_tokens: Update single cell reference