protected function normalizeInput($arguments)
    {
        if (is_array($arguments[0])) {
            return $arguments[0];
        }

        if (count($arguments) == 2) {
            return [$arguments[0] => $arguments[1]];
        }

        throw new Exception('Try JavaScript::put(["foo" => "bar"])');
    }
protected function normalizeInput($arguments)
    {
        if (is_array($arguments[0])) {
            return $arguments[0];
        }

        if (count($arguments) == 2) {
            return [$arguments[0] => $arguments[1]];
        }

        throw new Exception('Try JavaScript::put(["foo" => "bar"])');
    }
protected function normalizeInput ( $ arguments ) { if ( is_array ( $ arguments [ 0 ] ) ) { return $ arguments [ 0 ] ; } if ( count ( $ arguments ) == 2 ) { return [ $ arguments [ 0 ] => $ arguments [ 1 ] ] ; } throw new Exception ( 'Try JavaScript::put(["foo" => "bar"])' ) ; }
Normalize the input arguments.

@param  mixed $arguments
@return array
@throws \Exception
Normalize the input arguments .