Code Duplication    Length = 11-11 lines in 3 locations

src/Response/Response.php 3 locations

@@ 748-758 (lines=11) @@
745
     *
746
     * @return \Jaxon\Plugin\Response
747
     */
748
    public function setEvent($sTarget, $sEvent, $sScript)
749
    {
750
        return $this->addCommand(
751
            [
752
                'cmd' => 'ev',
753
                'id' => trim((string)$sTarget, " \t"),
754
                'prop' => trim((string)$sEvent, " \t")
755
            ],
756
            trim((string)$sScript, " \t\n")
757
        );
758
    }
759
760
    /**
761
     * Add a command to set a click handler on the browser
@@ 784-794 (lines=11) @@
781
     *
782
     * @return \Jaxon\Plugin\Response
783
     */
784
    public function addHandler($sTarget, $sEvent, $sHandler)
785
    {
786
        return $this->addCommand(
787
            [
788
                'cmd' => 'ah',
789
                'id' => trim((string)$sTarget, " \t"),
790
                'prop' => trim((string)$sEvent, " \t")
791
            ],
792
            trim((string)$sHandler, " \t\n")
793
        );
794
    }
795
796
    /**
797
     * Add a command to remove an event handler from an element
@@ 805-815 (lines=11) @@
802
     *
803
     * @return \Jaxon\Plugin\Response
804
     */
805
    public function removeHandler($sTarget, $sEvent, $sHandler)
806
    {
807
        return $this->addCommand(
808
            [
809
                'cmd' => 'rh',
810
                'id' => trim((string)$sTarget, " \t"),
811
                'prop' => trim((string)$sEvent, " \t")
812
            ],
813
            trim((string)$sHandler, " \t\n")
814
        );
815
    }
816
817
    /**
818
     * Add a command to construct a javascript function on the browser