Code Duplication    Length = 11-12 lines in 2 locations

src/Response/Response.php 2 locations

@@ 826-836 (lines=11) @@
823
     *
824
     * @return \Jaxon\Plugin\Response
825
     */
826
    public function setFunction($sFunction, $sArgs, $sScript)
827
    {
828
        return $this->addCommand(
829
            [
830
                'cmd' => 'sf',
831
                'func' => trim((string)$sFunction, " \t"),
832
                'prop' => trim((string)$sArgs, " \t")
833
            ],
834
            trim((string)$sScript, " \t\n")
835
        );
836
    }
837
838
    /**
839
     * Add a command to construct a wrapper function around an existing javascript function on the browser
@@ 853-864 (lines=12) @@
850
     *
851
     * @return \Jaxon\Plugin\Response
852
     */
853
    public function wrapFunction($sFunction, $sArgs, $aScripts, $sReturnValueVar)
854
    {
855
        return $this->addCommand(
856
            [
857
                'cmd' => 'wpf',
858
                'func' => trim((string)$sFunction, " \t"),
859
                'prop' => trim((string)$sArgs, " \t"),
860
                'type' => trim((string)$sReturnValueVar, " \t")
861
            ],
862
            $aScripts
863
        );
864
    }
865
866
    /**
867
     * Add a command to load a javascript file on the browser