Code Duplication    Length = 3-3 lines in 4 locations

lib/PDF.php 4 locations

@@ 321-323 (lines=3) @@
318
        }
319
        // Header
320
        $x = $this->GetX();
321
        foreach($headers as $i => $header) {
322
            $this->Cell($options['width'][$i], $options['height'], $headers[$i], 1, 0, $options['align'][$i], 1);
323
        }
324
        $this->Ln();
325
        // Color and font restoration
326
        $this->SetFillColor (
@@ 349-351 (lines=3) @@
346
            $num_pages = $this->getNumPages();
347
            $this->startTransaction();
348
            $this->SetX($x);
349
            foreach($headers as $i => $header) {
350
                $this->Cell($options['width'][$i], $options['height'], $row[$i], 'LR', 0, $options['align'][$i], $fill);
351
            }
352
            $this->Ln();
353
            if($num_pages < $this->getNumPages()) {
354
                $this->rollbackTransaction(true);
@@ 357-359 (lines=3) @@
354
                $this->rollbackTransaction(true);
355
                $this->AddPage();
356
                $this->SetX($x);
357
                foreach($headers as $i => $header) {
358
                    $this->Cell($options['width'][$i], $options['height'], $headers[$i], 1, 0, $options['align'][$i], 1);
359
                }
360
                $this->Ln();
361
                $this->SetX($x);
362
                foreach($headers as $i => $header) {
@@ 362-364 (lines=3) @@
359
                }
360
                $this->Ln();
361
                $this->SetX($x);
362
                foreach($headers as $i => $header) {
363
                    $this->Cell($options['width'][$i], $options['height'], $row[$i], 'LR', 0, $options['align'][$i], $fill);
364
                }
365
                $this->Ln();
366
            } else {
367
                $this->commitTransaction();