Completed
Push — master ( 6e7e9c...46a8a1 )
by Lars
01:38
created
src/voku/helper/HtmlMin.php 1 patch
Indentation   +109 added lines, -109 removed lines patch added patch discarded remove patch
@@ -552,184 +552,184 @@  discard block
 block discarded – undo
552 552
     return \in_array($tag_name, self::$optional_end_tags, true)
553 553
            ||
554 554
            (
555
-               $tag_name == 'li'
555
+                $tag_name == 'li'
556 556
                &&
557 557
                (
558
-                   $nextSibling === null
558
+                    $nextSibling === null
559 559
                    ||
560 560
                    (
561
-                       $nextSibling instanceof \DOMElement
561
+                        $nextSibling instanceof \DOMElement
562 562
                        &&
563 563
                        $nextSibling->tagName == 'li'
564
-                   )
565
-               )
566
-           )
564
+                    )
565
+                )
566
+            )
567 567
            ||
568 568
            (
569
-               (
570
-                   $tag_name == 'rp'
571
-               )
569
+                (
570
+                    $tag_name == 'rp'
571
+                )
572 572
                &&
573 573
                (
574
-                   $nextSibling === null
574
+                    $nextSibling === null
575 575
                    ||
576 576
                    (
577
-                       $nextSibling instanceof \DOMElement
577
+                        $nextSibling instanceof \DOMElement
578 578
                        &&
579 579
                        (
580
-                           $nextSibling->tagName == 'rp'
580
+                            $nextSibling->tagName == 'rp'
581 581
                            ||
582 582
                            $nextSibling->tagName == 'rt'
583
-                       )
584
-                   )
585
-               )
586
-           )
583
+                        )
584
+                    )
585
+                )
586
+            )
587 587
            ||
588 588
            (
589
-               $tag_name == 'tr'
589
+                $tag_name == 'tr'
590 590
                &&
591 591
                (
592
-                   $nextSibling === null
592
+                    $nextSibling === null
593 593
                    ||
594 594
                    (
595
-                       $nextSibling instanceof \DOMElement
595
+                        $nextSibling instanceof \DOMElement
596 596
                        &&
597 597
                        $nextSibling->tagName == 'tr'
598
-                   )
599
-               )
600
-           )
598
+                    )
599
+                )
600
+            )
601 601
            ||
602 602
            (
603
-               (
604
-                   $tag_name == 'td'
603
+                (
604
+                    $tag_name == 'td'
605 605
                    ||
606 606
                    $tag_name == 'th'
607
-               )
607
+                )
608 608
                &&
609 609
                (
610
-                   $nextSibling === null
610
+                    $nextSibling === null
611 611
                    ||
612 612
                    (
613
-                       $nextSibling instanceof \DOMElement
613
+                        $nextSibling instanceof \DOMElement
614 614
                        &&
615 615
                        (
616
-                           $nextSibling->tagName == 'td'
616
+                            $nextSibling->tagName == 'td'
617 617
                            ||
618 618
                            $nextSibling->tagName == 'th'
619
-                       )
620
-                   )
621
-               )
622
-           )
619
+                        )
620
+                    )
621
+                )
622
+            )
623 623
            ||
624 624
            (
625
-               (
626
-                   $tag_name == 'dd'
625
+                (
626
+                    $tag_name == 'dd'
627 627
                    ||
628 628
                    $tag_name == 'dt'
629
-               )
629
+                )
630 630
                &&
631 631
                (
632
-                   (
633
-                       $nextSibling === null
632
+                    (
633
+                        $nextSibling === null
634 634
                        &&
635 635
                        $tag_name == 'dd'
636
-                   )
636
+                    )
637 637
                    ||
638 638
                    (
639
-                       $nextSibling instanceof \DOMElement
639
+                        $nextSibling instanceof \DOMElement
640 640
                        &&
641 641
                        (
642
-                           $nextSibling->tagName == 'dd'
642
+                            $nextSibling->tagName == 'dd'
643 643
                            ||
644 644
                            $nextSibling->tagName == 'dt'
645
-                       )
646
-                   )
647
-               )
648
-           )
645
+                        )
646
+                    )
647
+                )
648
+            )
649 649
            ||
650 650
            (
651
-               $tag_name == 'option'
651
+                $tag_name == 'option'
652 652
                &&
653 653
                (
654
-                   $nextSibling === null
654
+                    $nextSibling === null
655 655
                    ||
656 656
                    (
657
-                       $nextSibling instanceof \DOMElement
657
+                        $nextSibling instanceof \DOMElement
658 658
                        &&
659 659
                        (
660
-                           $nextSibling->tagName == 'option'
660
+                            $nextSibling->tagName == 'option'
661 661
                            ||
662 662
                            $nextSibling->tagName == 'optgroup'
663
-                       )
664
-                   )
665
-               )
666
-           )
663
+                        )
664
+                    )
665
+                )
666
+            )
667 667
            ||
668 668
            (
669
-               $tag_name == 'p'
669
+                $tag_name == 'p'
670 670
                &&
671 671
                (
672
-                   (
673
-                       $nextSibling === null
672
+                    (
673
+                        $nextSibling === null
674 674
                        &&
675 675
                        (
676
-                           $node->parentNode !== null
676
+                            $node->parentNode !== null
677 677
                            &&
678 678
                            !\in_array(
679
-                               $node->parentNode->tagName,
680
-                               [
681
-                                   'a',
682
-                                   'audio',
683
-                                   'del',
684
-                                   'ins',
685
-                                   'map',
686
-                                   'noscript',
687
-                                   'video',
688
-                               ],
689
-                               true
690
-                           )
691
-                       )
692
-                   )
679
+                                $node->parentNode->tagName,
680
+                                [
681
+                                    'a',
682
+                                    'audio',
683
+                                    'del',
684
+                                    'ins',
685
+                                    'map',
686
+                                    'noscript',
687
+                                    'video',
688
+                                ],
689
+                                true
690
+                            )
691
+                        )
692
+                    )
693 693
                    ||
694 694
                    (
695
-                       $nextSibling instanceof \DOMElement
695
+                        $nextSibling instanceof \DOMElement
696 696
                        &&
697 697
                        \in_array(
698
-                           $nextSibling->tagName,
699
-                           [
700
-                               'address',
701
-                               'article',
702
-                               'aside',
703
-                               'blockquote',
704
-                               'dir',
705
-                               'div',
706
-                               'dl',
707
-                               'fieldset',
708
-                               'footer',
709
-                               'form',
710
-                               'h1',
711
-                               'h2',
712
-                               'h3',
713
-                               'h4',
714
-                               'h5',
715
-                               'h6',
716
-                               'header',
717
-                               'hgroup',
718
-                               'hr',
719
-                               'menu',
720
-                               'nav',
721
-                               'ol',
722
-                               'p',
723
-                               'pre',
724
-                               'section',
725
-                               'table',
726
-                               'ul',
727
-                           ],
728
-                           true
729
-                       )
730
-                   )
731
-               )
732
-           );
698
+                            $nextSibling->tagName,
699
+                            [
700
+                                'address',
701
+                                'article',
702
+                                'aside',
703
+                                'blockquote',
704
+                                'dir',
705
+                                'div',
706
+                                'dl',
707
+                                'fieldset',
708
+                                'footer',
709
+                                'form',
710
+                                'h1',
711
+                                'h2',
712
+                                'h3',
713
+                                'h4',
714
+                                'h5',
715
+                                'h6',
716
+                                'header',
717
+                                'hgroup',
718
+                                'hr',
719
+                                'menu',
720
+                                'nav',
721
+                                'ol',
722
+                                'p',
723
+                                'pre',
724
+                                'section',
725
+                                'table',
726
+                                'ul',
727
+                            ],
728
+                            true
729
+                        )
730
+                    )
731
+                )
732
+            );
733 733
   }
734 734
 
735 735
   protected function domNodeToString(\DOMNode $node): string
@@ -757,9 +757,9 @@  discard block
 block discarded – undo
757 757
           }
758 758
 
759 759
           $html .= '<!DOCTYPE ' . $child->name . ''
760
-                   . ($child->publicId ? ' ' . $tmpTypePublic . ' "' . $child->publicId . '"' : '')
761
-                   . ($child->systemId ? ' ' . $tmpTypeSystem . ' "' . $child->systemId . '"' : '')
762
-                   . '>';
760
+                    . ($child->publicId ? ' ' . $tmpTypePublic . ' "' . $child->publicId . '"' : '')
761
+                    . ($child->systemId ? ' ' . $tmpTypeSystem . ' "' . $child->systemId . '"' : '')
762
+                    . '>';
763 763
         }
764 764
 
765 765
       } elseif ($child instanceof \DOMElement) {
Please login to merge, or discard this patch.