Code Duplication    Length = 12-12 lines in 3 locations

source/DomComponentsByDanielGP.php 3 locations

@@ 592-603 (lines=12) @@
589
     * @param string $additionalStyle
590
     * @return string
591
     */
592
    public function setCalendarControl($controlName, $additionalStyle = '')
593
    {
594
        return $this->setStringIntoTag(' ', 'span', [
595
                    'onclick' => implode('', [
596
                        'javascript:NewCssCal(\'' . $controlName,
597
                        '\',\'yyyyMMdd\',\'dropdown\',false,\'24\',false);',
598
                    ]),
599
                    'class'   => 'fa fa-calendar',
600
                    'id'      => $controlName . '_picker',
601
                    'style'   => 'cursor:pointer;' . $additionalStyle,
602
        ]);
603
    }
604
605
    /**
606
     * Set a control to a user-friendly calendar with time included
@@ 612-623 (lines=12) @@
609
     * @param string $additionalStyle
610
     * @return string
611
     */
612
    public function setCalendarControlWithTime($controlName, $additionalStyle = '')
613
    {
614
        return $this->setStringIntoTag(' ', 'span', [
615
                    'onclick' => implode('', [
616
                        'javascript:NewCssCal(\'' . $controlName,
617
                        '\',\'yyyyMMdd\',\'dropdown\',true,\'24\',true);',
618
                    ]),
619
                    'class'   => 'fa fa-calendar',
620
                    'id'      => $controlName . '_picker',
621
                    'style'   => 'cursor:pointer;' . $additionalStyle,
622
        ]);
623
    }
624
625
    /**
626
     * Cleans a string for certain internal rules
@@ 649-660 (lines=12) @@
646
     *
647
     * @param integer $height
648
     */
649
    protected function setClearBoth1px($height = 1)
650
    {
651
        return $this->setStringIntoTag(' ', 'div', [
652
                    'style' => implode('', [
653
                        'height:' . $height . 'px;',
654
                        'line-height:' . $height . 'px;',
655
                        'float:none;',
656
                        'clear:both;',
657
                        'margin:0px;'
658
                    ])
659
        ]);
660
    }
661
662
    /**
663
     * Returns css codes