Showing 3 of 7 total issues
Function removeRole
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
removeRole: function(value) {
var i, elem, current_roles, roles, j;
if (arguments.length === 0) {
for (i = this.length - 1; i >= 0; --i) {
Function addRole
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addRole: function(value) {
var roles, i, elem, current_roles, j, roles_length;
if ($.isFunction(value)) {
return this.each(function(i) {
Avoid deeply nested control flow statements. Open
Open
if (current_roles.indexOf(' ' + roles[j] + ' ') < 0) {
current_roles += roles[j] + ' ';
}