Showing 182 of 306 total issues
Function link
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function($scope, element) {
$scope.element = element;
$scope.MAX_REPORT_DESCRIPTION_LENGTH = MAX_REPORT_DESCRIPTION_LENGTH.toString();
$scope.alertDisplayed = null;
Function constraintsToChrome_
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var constraintsToChrome_ = function(c) {
if (typeof c !== 'object' || c.mandatory || c.optional) {
return c;
}
var cc = {};
Function getStats
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.RTCPeerConnection.prototype.getStats = function(selector,
successCallback, errorCallback) {
var pc = this;
var args = arguments;
Function testProps
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function testProps(props, prefixed, value, skipValueTest) {
skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest;
// Try native detect first
if (!is(value, 'undefined')) {
Function link
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function link(scope, element, attrs) {
var unregisterRootScopeListener,
source = angular.element(attrs.from),
toPreserve = angular.element(attrs.preserve);
Function link
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function link(scope, element) {
var widgets = [];
var toggleAnim = false;
var stopScaling = false;
Function wrapPeerConnectionEvent
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function wrapPeerConnectionEvent(window, eventNameToWrap, wrapper) {
if (!window.RTCPeerConnection) {
return;
}
var proto = window.RTCPeerConnection.prototype;
Function onlocalcandidate
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
iceGatherer.onlocalcandidate = function(evt) {
if (pc.usingBundle && sdpMLineIndex > 0) {
// if we know that we use bundle we can drop candidates with
// Ñ•dpMLineIndex > 0. If we don't do this then our state gets
// confused since we dispose the extra ice gatherer.
Function detectBrowser
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
detectBrowser: function(window) {
var navigator = window && window.navigator;
// Returned result object.
var result = {};
Function shimCreateObjectURL
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
shimCreateObjectURL: function(window) {
var URL = window && window.URL;
if (!(typeof window === 'object' && window.HTMLMediaElement &&
'srcObject' in window.HTMLMediaElement.prototype &&
Consider simplifying this complex logical expression. Open
Open
if (server && (server.urls || server.url)) {
var urls = server.urls || server.url;
if (server.url && !server.urls) {
console.warn('RTCIceServer.url is deprecated! Use urls instead.');
}
Function injectElementWithStyles
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function injectElementWithStyles(rule, callback, nodes, testnames) {
var mod = 'modernizr';
var style;
var ret;
var node;
Function init
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function init(io) {
if (initialized) {
logger.warn('The notification conferences service is already initialized');
return;
}
Function shimPeerConnection
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
shimPeerConnection: function(window) {
var browserDetails = utils.detectBrowser(window);
if (window.RTCIceGatherer) {
// ORTC defines an RTCIceCandidate object but no constructor.
Function constraintsToFF37_
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var constraintsToFF37_ = function(c) {
if (typeof c !== 'object' || c.require) {
return c;
}
var require = [];
Function writeMediaSection
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SDPUtils.writeMediaSection = function(transceiver, caps, type, stream) {
var sdp = SDPUtils.writeRtpDescription(transceiver.kind, caps);
// Map ICE parameters (ufrag, pwd) to SDP.
sdp += SDPUtils.writeIceParameters(
Function exports
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(dependencies) {
'use strict';
var logger = dependencies('logger');
Function addTrack
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.RTCPeerConnection.prototype.addTrack = function(track, stream) {
var pc = this;
if (pc.signalingState === 'closed') {
throw new DOMException(
'The RTCPeerConnection\'s signalingState is \'closed\'.',
Function exports
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
module.exports = function(dependencies) {
var logger = dependencies('logger'),
errors = require('../errors')(dependencies),
config = dependencies('config')('default');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function fileWatcher
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
function fileWatcher(logger, file, onChange) {
var watchingConfig = false;
var lastHash = null;
return function fileWatcherInstance() {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"