Showing 836 of 1,675 total issues
Function _applyStyles
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
_applyStyles = function(node, style, component, _jsPlumb) {
var styleToWrite = {};
if (style.strokeStyle) {
styleToWrite["stroked"] = "true";
var strokeColor = jsPlumbUtil.convertStyle(style.strokeStyle, true);
Function buildHeaders
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildHeaders(table) {
var header_index = computeThIndexes(table), ch, $t,
h, i, t, lock, time, c = table.config;
c.headerList = [];
c.headerContent = [];
Function initialize
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
initialize: function(controller) {
var $ForceDirected = $jit.ForceDirected;
var config = {
iterations: 50,
Function addHeaderResizeEvent
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
ts.addHeaderResizeEvent = function(table, disable, settings) {
table = $(table)[0]; // make sure we're usig a dom element
var headers,
defaults = {
timer : 250
Function checkFilters
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
checkFilters: function(table, filter, skipFirst) {
var c = table.config,
wo = c.widgetOptions,
filterArray = $.isArray(filter),
filters = (filterArray) ? filter : ts.getFilters(table, true),
Function plot
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
plot: function(opt, animating) {
var viz = this.viz,
aGraph = viz.graph,
canvas = viz.canvas,
id = viz.root,
Function paint
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.paint = function(params, containerExtents) {
var p = {}, d = params.d, connector = params.component;
if (params.strokeStyle) {
p["stroked"] = "true";
p["strokecolor"] = jsPlumbUtil.convertStyle(params.strokeStyle, true);
Function toString
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
toString: function(format) {
var formatSet = !!format;
format = format || this._format;
var formattedString = false;
Function populate
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
populate : function(model, values) {
// for a string, see if it has parameter matches, and if so, try to make the substitutions.
var getValue = function(fromString) {
var matches = fromString.match(/(\${.*?})/g);
if (matches != null) {
Function _initDraggableIfNecessary
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
_initDraggableIfNecessary = function(element, isDraggable, dragOptions) {
// TODO move to DragManager?
if (!jsPlumbAdapter.headless) {
var draggable = isDraggable == null ? false : isDraggable, jpcl = jsPlumb.CurrentLibrary;
if (draggable) {
Function set_placeholder
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
fn.set_placeholder = function(col, row) {
var phgd = $.extend({}, this.placeholder_grid_data);
var $nexts = this.widgets_below({
col: phgd.col,
row: phgd.row,
Function PolarArea
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.PolarArea = function (data, options) {
chart.PolarArea.defaults = {
scaleOverlay: true,
scaleOverride: false,
Function calculateDrawingSize
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function calculateDrawingSize() {
var lgtxt;
var cumulativeAngle = -config.startAngle * (Math.PI / 180)+2*Math.PI ,
Function calculateDrawingSize
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function calculateDrawingSize() {
var lgtxt;
var cumulativeAngle = -config.startAngle * (Math.PI / 180)+2*Math.PI ,
cumvalue = 0;
Method results
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def results
#No authorize required since everyone can search
if params[:search].class == Array
classes = params[:search][:classes].map { |i| String::keep_clean_space(i).camelcase.constantize }
else
Method update_master_data!
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def self.update_master_data!
db=Home::connect_external_database
puts 'Updating from Master Data...'
#begin
- 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
Method update_install
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def update_install
#No authorize required
begin
expire_fragment('about_page')
- 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
Method display_results
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def display_results
res = String.new
unless @project.nil?
#pbs_project_element = @pbs_project_element || @project.root_component
pbs_project_element = @pbs_project_element || current_component
- 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
Method display_value
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def display_value(value, est_val, mp_id)
module_project = ModuleProject.find(mp_id)
est_val_pe_attribute = est_val.pe_attribute
precision = est_val_pe_attribute.precision.nil? ? user_number_precision : est_val_pe_attribute.precision
if est_val_pe_attribute.alias == "retained_size" || est_val_pe_attribute.alias == "theorical_size"
- 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
Method set_element_value_with_activities
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def set_element_value_with_activities(estimation_result, module_project)
authorize! :execute_estimation_plan, @project
result_with_consistency = Hash.new
consistency = true
- 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"