diff --git a/src/PhpSpreadsheet/Worksheet/Worksheet.php b/src/PhpSpreadsheet/Worksheet/Worksheet.php index 22b36c22fc..7dde970f78 100644 --- a/src/PhpSpreadsheet/Worksheet/Worksheet.php +++ b/src/PhpSpreadsheet/Worksheet/Worksheet.php @@ -3618,14 +3618,12 @@ public function copyCells(string $fromCell, string $toCells, bool $copyStyle = t * Copy a range area, with merged cells applied to another location. * Acts similarly to Excel copy/paste merged areas to specific cell. * - * @param PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $worksheet or active sheet * @param string $sourceRange cell range, e.g. C3:C10 * @param int $repetitions the number of times to repeat the source range * @param int $groupSize the number of cells in the source range to repeat */ public function repeatSourceRange(string $sourceRange, int $repetitions = 2, int $groupSize = 2): void { - $worksheet = $this; // Get the start and end coordinates of the source range [$sourceStart, $sourceEnd] = Coordinate::rangeBoundaries($sourceRange); $sourceStartColumnIndex = $sourceStart[0];