Code Duplication    Length = 12-12 lines in 3 locations

src/Response/Response.php 3 locations

@@ 680-691 (lines=12) @@
677
     *
678
     * @return \Jaxon\Plugin\Response
679
     */
680
    public function createInput($sParent, $sType, $sName, $sId)
681
    {
682
        return $this->addCommand(
683
            [
684
                'cmd' => 'ci',
685
                'id' => trim((string)$sParent, " \t"),
686
                'prop' => trim((string)$sId, " \t"),
687
                'type' => trim((string)$sType, " \t")
688
            ],
689
            trim((string)$sName, " \t\n")
690
        );
691
    }
692
693
    /**
694
     * Add a command to insert a new input element preceding the specified element
@@ 703-714 (lines=12) @@
700
     *
701
     * @return \Jaxon\Plugin\Response
702
     */
703
    public function insertInput($sBefore, $sType, $sName, $sId)
704
    {
705
        return $this->addCommand(
706
            [
707
                'cmd' => 'ii',
708
                'id' => trim((string)$sBefore, " \t"),
709
                'prop' => trim((string)$sId, " \t"),
710
                'type' => trim((string)$sType, " \t")
711
            ],
712
            trim((string)$sName, " \t\n")
713
        );
714
    }
715
716
    /**
717
     * Add a command to insert a new input element after the specified element
@@ 726-737 (lines=12) @@
723
     *
724
     * @return \Jaxon\Plugin\Response
725
     */
726
    public function insertInputAfter($sAfter, $sType, $sName, $sId)
727
    {
728
        return $this->addCommand(
729
            [
730
                'cmd' => 'iia',
731
                'id' => trim((string)$sAfter, " \t"),
732
                'prop' => trim((string)$sId, " \t"),
733
                'type' => trim((string)$sType, " \t")
734
            ],
735
            trim((string)$sName, " \t\n")
736
        );
737
    }
738
739
    /**
740
     * Add a command to set an event handler on the browser