Code Duplication    Length = 10-14 lines in 2 locations

lib/Cpdf.php 2 locations

@@ 5535-5548 (lines=14) @@
5532
                }
5533
                break;
5534
5535
            case 'rewind':
5536
                // do not destroy the current checkpoint, but move us back to the state then, so that we can try again
5537
                if (is_array($this->checkpoint)) {
5538
                    // can only abort if were inside a checkpoint
5539
                    $tmp = $this->checkpoint;
5540
5541
                    foreach ($tmp as $k => $v) {
5542
                        if ($k !== 'checkpoint') {
5543
                            $this->$k = $v;
5544
                        }
5545
                    }
5546
                    unset($tmp);
5547
                }
5548
                break;
5549
5550
            case 'abort':
5551
                if (is_array($this->checkpoint)) {
@@ 5550-5559 (lines=10) @@
5547
                }
5548
                break;
5549
5550
            case 'abort':
5551
                if (is_array($this->checkpoint)) {
5552
                    // can only abort if were inside a checkpoint
5553
                    $tmp = $this->checkpoint;
5554
                    foreach ($tmp as $k => $v) {
5555
                        $this->$k = $v;
5556
                    }
5557
                    unset($tmp);
5558
                }
5559
                break;
5560
        }
5561
    }
5562
}