3scale/porta

View on GitHub
db/migrate/20170918094801_add_missing_tenant_id_columns.rb

Summary

Maintainability
A
0 mins
Test Coverage

AddMissingTenantIdColumns#change contains iterators nested 2 deep
Open

      change_table table_name do |t|

A Nested Iterator occurs when a block contains another block.

Example

Given

class Duck
  class << self
    def duck_names
      %i!tick trick track!.each do |surname|
        %i!duck!.each do |last_name|
          puts "full name is #{surname} #{last_name}"
        end
      end
    end
  end
end

Reek would report the following warning:

test.rb -- 1 warning:
  [5]:Duck#duck_names contains iterators nested 2 deep (NestedIterators)

AddMissingTenantIdColumns#change has the variable name 't'
Open

      change_table table_name do |t|

An Uncommunicative Variable Name is a variable name that doesn't communicate its intent well enough.

Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.

There are no issues that match your filters.

Category
Status