ManageIQ/manageiq-providers-workflows

View on GitHub
app/models/manageiq/providers/workflows/automation_manager/workflow_instance.rb

Summary

Maintainability
A
0 mins
Test Coverage
B
81%

Use queue_opts[:miq_callback] = { :class_name => self.class.name, :instance_id => id, :method_name => :queue_callback } instead of queue_opts.merge!( # :miq_task_id => miq_task_id, # TODO: This causes the state to move to active on each step - not sure why :miq_callback => { :class_name => self.class.name, :instance_id => id, :method_name => :queue_callback } ).
Open

      queue_opts.merge!(
        # :miq_task_id  => miq_task_id, # TODO: This causes the state to move to active on each step - not sure why
        :miq_callback => {
          :class_name  => self.class.name,
          :instance_id => id,

This cop identifies places where Hash#merge! can be replaced by Hash#[]=.

Example:

hash.merge!(a: 1)
hash.merge!({'key' => 'value'})
hash.merge!(a: 1, b: 2)

There are no issues that match your filters.

Category
Status