3scale/porta

View on GitHub

Showing 5,269 of 5,606 total issues

CmsBlog#self.up calls 't.integer :updated_by_id' 8 times
Open

        t.integer :updated_by_id
        t.timestamps
      end
      create_table :blog_versions do |t|
        t.string :name
Severity: Minor
Found in db/migrate/20100216080646_cms_blog.rb by reek

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

CmsBlog#self.up calls 't.timestamps' 8 times
Open

        t.timestamps
      end
      create_table :blog_versions do |t|
        t.string :name
        t.string :format
Severity: Minor
Found in db/migrate/20100216080646_cms_blog.rb by reek

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

CmsStreams#self.up calls 't.integer :created_by_id' 2 times
Open

      t.integer :created_by_id
      t.integer :updated_by_id
      t.timestamps
    end
    create_table :stream_versions do |t|

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

CreateLegalTerms#self.up calls 't.boolean :published, :default => false' 2 times
Open

      t.boolean :published, :default => false
      t.boolean :deleted, :default => false
      t.boolean :archived, :default => false
      t.integer :created_by_id
      t.integer :updated_by_id

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

DumpingUnusedTables#self.down calls 't.datetime "created_at"' 9 times
Open

      t.datetime "created_at"
      t.datetime "updated_at"
      t.string   "paypal_transaction_id",                                :default => "",         :null => false
    end
    add_index "credit_transactions", ["paypal_transaction_id"], :name => "index_credit_transactions_on_paypal_transaction_id"

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

DroppingReleases#self.down calls 't.datetime "created_at"' 3 times
Open

      t.datetime "created_at"
      t.datetime "updated_at"
      t.boolean  "deleted",      :default => false
      t.boolean  "published",    :default => false
      t.boolean  "archived",     :default => false

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

RemovingTheNewsPortlets#self.down calls 't.integer "created_by_id"' 2 times
Open

      t.integer  "created_by_id"
      t.integer  "updated_by_id"
      t.datetime "created_at"
      t.datetime "updated_at"
    end

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

RemoveStreams#self.down calls 't.datetime "updated_at"' 2 times
Open

      t.datetime "updated_at"
      t.boolean  "published",          :default => false
      t.boolean  "deleted",            :default => false
      t.boolean  "archived",           :default => false
      t.string   "version_comment"

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

MergeConnectAndEnterpriseDataModels#self.down calls 't.string "name"' 2 times
Open

      t.string   "name"
      t.text     "content"
      t.integer  "version"
      t.datetime "created_at"
      t.datetime "updated_at"

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

AddJanrainToSettings#self.up calls 'provider.settings' 2 times
Open

      provider.settings.update_attribute( :janrain_api_key, fetch_from_config( provider,:janrain_api_key))
      provider.settings.update_attribute( :janrain_relying_party, fetch_from_config( provider,:janrain_relying_party))

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

RemovingBcmsTables#self.down calls 't.boolean "cacheable", :default => false' 2 times
Open

      t.boolean  "cacheable",                       :default => false
      t.boolean  "hidden",                          :default => false
      t.boolean  "published",                       :default => false
      t.boolean  "deleted",                         :default => false
      t.boolean  "archived",                        :default => false

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

RemovingBcmsTables#self.down calls 't.integer "account_id", :limit => 8' 23 times
Open

      t.integer "account_id", :limit => 8
      t.integer "group_id",   :limit => 8
      t.integer "tenant_id",  :limit => 8
    end
    add_index "account_group_memberships", ["account_id"], :name => "idx_account_id"

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

RemovingBcmsTables#self.down calls 't.string "attachment_content_type"' 2 times
Open

      t.string   "attachment_content_type"
      t.integer  "attachment_file_size"
      t.string   "title"
      t.string   "url"
      t.text     "description"

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

RemovingBcmsTables#self.down calls 't.text "headers"' 2 times
Open

      t.text     "headers"
      t.string   "notes"
      t.integer  "tenant_id",       :limit => 8
    end
    add_index "dynamic_view_versions", ["account_id"], :name => "index_dynamic_view_versions_on_account_id"

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

RemovingBcmsTables#self.down calls 't.text "summary"' 2 times
Open

      t.text     "summary"
      t.text     "body"
      t.integer  "comments_count"
      t.datetime "published_at"
      t.boolean  "published",                                 :default => false

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

AddTypeToAuthenticationProviders#change calls 'AuthenticationProvider.where(kind: 'github')' 2 times
Open

        AuthenticationProvider.where(kind: 'github').update_all(type: 'AuthenticationProvider::GitHub')

        AuthenticationProvider.where(kind: 'github').where.not(client_id: nil, client_secret: nil)

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

CreateMasterPlans#self.down calls 'Account.with_deleted' 3 times
Open

    Account.with_deleted.master.service.features.destroy_all
    Account.with_deleted.master.service.plans[1..-1].each(&:destroy)
    Account.with_deleted.master.service.plans.each { |plan| plan.usage_limits.destroy_all }

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

BrowserCmsTables#self.up calls 't.boolean "cacheable", :default => false' 2 times
Open

      t.boolean  "cacheable",          :default => false
      t.boolean  "hidden",             :default => false
      t.boolean  "published",          :default => false
      t.boolean  "deleted",            :default => false
      t.boolean  "archived",           :default => false

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

BrowserCmsTables#self.up calls 't.integer "attachment_id"' 3 times
Open

      t.integer  "attachment_id"
      t.integer  "version"
      t.string   "file_path"
      t.string   "file_location"
      t.string   "file_extension"

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

BrowserCmsTables#self.up calls 't.integer "file_size"' 2 times
Open

      t.integer  "file_size"
      t.datetime "created_at"
      t.datetime "updated_at"
      t.string   "name"
      t.boolean  "published",       :default => false

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Severity
Category
Status
Source
Language