aullman/OpenTok-Angular

View on GitHub

Showing 7 of 7 total issues

Function link has 57 lines of code (exceeds 25 allowed). Consider refactoring.
Open

link: function(scope, element, attrs) {
var props = scope.props() || {};
props.width = props.width ? props.width : ng.element(element).width();
props.height = props.height ? props.height : ng.element(element).height();
var oldChildren = ng.element(element).children();
Severity: Major
Found in opentok-angular.js - About 2 hrs to fix

    Function init has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    init: function(apiKey, sessionId, token, cb) {
    this.session = OT.initSession(apiKey, sessionId);
     
    OTSession.session.on({
    sessionConnected: function() {
    Severity: Minor
    Found in opentok-angular.js - About 1 hr to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      streamDestroyed: function(event) {
      $rootScope.$apply(function() {
      OTSession.streams.splice(OTSession.streams.indexOf(event.stream), 1);
      });
      },
      Severity: Major
      Found in opentok-angular.js and 1 other location - About 1 hr to fix
      opentok-angular.js on lines 70..74

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      connectionDestroyed: function(event) {
      $rootScope.$apply(function() {
      OTSession.connections.splice(OTSession.connections.indexOf(event.connection), 1);
      });
      }
      Severity: Major
      Found in opentok-angular.js and 1 other location - About 1 hr to fix
      opentok-angular.js on lines 54..58

      Function exports has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function(config) {
      config.set({
       
      // base path that will be used to resolve all patterns (eg. files, exclude)
      basePath: '',
      Severity: Minor
      Found in karma.conf.js - About 1 hr to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        connectionCreated: function(event) {
        $rootScope.$apply(function() {
        OTSession.connections.push(event.connection);
        });
        },
        Severity: Minor
        Found in opentok-angular.js and 1 other location - About 35 mins to fix
        opentok-angular.js on lines 49..53

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        streamCreated: function(event) {
        $rootScope.$apply(function() {
        OTSession.streams.push(event.stream);
        });
        },
        Severity: Minor
        Found in opentok-angular.js and 1 other location - About 35 mins to fix
        opentok-angular.js on lines 65..69
        Severity
        Category
        Status
        Source
        Language