Code Duplication    Length = 8-8 lines in 2 locations

src/FrameDecorator/Page.php 2 locations

@@ 369-376 (lines=8) @@
366
367
                // Rule D
368
                $p = $block_parent;
369
                while ($p) {
370
                    if ($p->get_style()->page_break_inside === "avoid") {
371
                        Helpers::dompdf_debug("page-break", "parent->inside: avoid");
372
373
                        return false;
374
                    }
375
                    $p = $p->find_block_parent();
376
                }
377
378
                // To prevent cascading page breaks when a top-level element has
379
                // page-break-inside: avoid, ensure that at least one frame with
@@ 410-417 (lines=8) @@
407
                    $table = Table::find_parent_table($frame);
408
409
                    $p = $table;
410
                    while ($p) {
411
                        if ($p->get_style()->page_break_inside === "avoid") {
412
                            Helpers::dompdf_debug("page-break", "parent->inside: avoid");
413
414
                            return false;
415
                        }
416
                        $p = $p->find_block_parent();
417
                    }
418
419
                    // Avoid breaking after the first row of a table
420
                    if ($table && $table->get_first_child() === $frame || $table->get_first_child()->get_first_child() === $frame) {