imanel/websocket-rack

View on GitHub
example/html/web_socket.js

Summary

Maintainability
B
6 hrs
Test Coverage

File web_socket.js has 262 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Copyright: Hiroshi Ichikawa <http://gimite.net/en/>
// License: New BSD License
// Reference: http://dev.w3.org/html5/websockets/
// Reference: http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol

Severity: Minor
Found in example/html/web_socket.js - About 2 hrs to fix

    Function __createFlash has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      WebSocket.prototype.__createFlash = function(url, protocol, proxyHost, proxyPort, headers) {
        var self = this;
        self.__flash =
          WebSocket.__flash.create(url, protocol, proxyHost || null, proxyPort || 0, headers || null);
    
    
    Severity: Minor
    Found in example/html/web_socket.js - About 1 hr to fix

      Function __initialize has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        WebSocket.__initialize = function() {
          if (WebSocket.__swfLocation) {
            // For backword compatibility.
            window.WEB_SOCKET_SWF_LOCATION = WebSocket.__swfLocation;
          }
      Severity: Minor
      Found in example/html/web_socket.js - About 1 hr to fix

        Function __createFlash has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          WebSocket.prototype.__createFlash = function(url, protocol, proxyHost, proxyPort, headers) {
        Severity: Minor
        Found in example/html/web_socket.js - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status