code: protected function adjustHyperlinks($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows)
      {
          $aHyperlinkCollection = $pSheet->getHyperlinkCollection();
          ($pNumCols > 0 || $pNumRows > 0) ?
              uksort($aHyperlinkCollection, ['self', 'cellReverseSort']) : uksort($aHyperlinkCollection, ['self', 'cellSort']);
  
          foreach ($aHyperlinkCollection as $key => $value) {
              $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows);
              if ($key != $newReference) {
                  $pSheet->setHyperlink($newReference, $value);
                  $pSheet->setHyperlink($key, null);
              }
          }
      }
docs: Update hyperlinks when inserting/deleting rows/columns.
  
  @param Worksheet $pSheet The worksheet that we're editing
  @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
  @param int $beforeColumnIndex Index number of the column we're inserting/deleting before
  @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion)
  @param int $beforeRow Number of the row we're inserting/deleting before
  @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion)