Showing 10 of 10 total issues
Method untrack_changes_in_object
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def untrack_changes_in_object(object) is_tracked = object.instance_variable_defined?('@fie_tracked') if is_tracked object.methods.each do |attribute_name, attribute_value|
- Read upRead up
Method track_changes_in_object
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def track_changes_in_object(object) state = self is_untracked = !object.instance_variable_defined?('@fie_tracked') if is_untracked
- Read upRead up
Method track_changes_in_array
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def track_changes_in_array(object) state = self unless object.frozen? object.class_eval do
Function processCommand
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
processCommand(command, parameters = {}) { switch(command) { case 'refresh_view': innerHTML(document.querySelector('[fie-body=true]'), parameters.html); const event = new Event(this.eventName);
Function _diffSetup
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_diffSetup() { polyfill(); use( Object.assign(_ => {}, {
- Read upRead up
Method update_object_using_changelog
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def update_object_using_changelog(changelog, object = self) unless changelog.blank? changelog.each do |node_name, _| changelog_node = changelog[node_name] is_not_end_of_tree = changelog_node.is_a? Hash
- Read upRead up
Method traverse
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def traverse(changelog:, object:, node_name:, changelog_node:) if object.is_a?(Array) node_name = node_name.to_i object_node = object[node_name] elsif object.is_a?(Hash)
- Read upRead up
Method update_object_value
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def update_object_value(object:, node_name:, value:) if object.is_a?(Array) node_name = node_name.to_i object[node_name] = value elsif object.is_a?(Hash)
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
def untrack_changes_in_objects(object) if object.is_a? Hash untrack_changes_in_hash(object) elsif object.is_a? Array untrack_changes_in_array(object)
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
def track_changes_in_objects(object) if object.is_a?(Array) track_changes_in_array(object) elsif object.is_a?(Hash) track_changes_in_hash(object)
- Read upRead up