jdruk/mycroft-for-us

View on GitHub

Showing 19 of 19 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  def create
    @gateway = Gateway.new(gateway_params)
    @gateway.concentrator = @concentrator
    respond_to do |format|
      if @gateway.save
Severity: Major
Found in app/app/controllers/gateways_controller.rb and 1 other location - About 1 hr to fix
app/app/controllers/address_ranges_controller.rb on lines 27..36

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 52.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  def create
    @address_range = AddressRange.new(address_range_params)
    @address_range.concentrator = @concentrator
    respond_to do |format|
      if @address_range.save
Severity: Major
Found in app/app/controllers/address_ranges_controller.rb and 1 other location - About 1 hr to fix
app/app/controllers/gateways_controller.rb on lines 27..36

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 52.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def create
    @client = Client.new(client_params)

    respond_to do |format|
      if @client.save
Severity: Major
Found in app/app/controllers/clients_controller.rb and 6 other locations - About 1 hr to fix
app/app/controllers/addresses_controller.rb on lines 26..35
app/app/controllers/bank_accounts_controller.rb on lines 26..35
app/app/controllers/categories_controller.rb on lines 26..35
app/app/controllers/concentrators_controller.rb on lines 45..54
app/app/controllers/image_cashieros_controller.rb on lines 26..35
app/app/controllers/plans_controller.rb on lines 26..35

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def create
    @image_cashiero = ImageCashiero.new(image_cashiero_params)

    respond_to do |format|
      if @image_cashiero.save
Severity: Major
Found in app/app/controllers/image_cashieros_controller.rb and 6 other locations - About 1 hr to fix
app/app/controllers/addresses_controller.rb on lines 26..35
app/app/controllers/bank_accounts_controller.rb on lines 26..35
app/app/controllers/categories_controller.rb on lines 26..35
app/app/controllers/clients_controller.rb on lines 30..39
app/app/controllers/concentrators_controller.rb on lines 45..54
app/app/controllers/plans_controller.rb on lines 26..35

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def create
    @address = Address.new(address_params)

    respond_to do |format|
      if @address.save
Severity: Major
Found in app/app/controllers/addresses_controller.rb and 6 other locations - About 1 hr to fix
app/app/controllers/bank_accounts_controller.rb on lines 26..35
app/app/controllers/categories_controller.rb on lines 26..35
app/app/controllers/clients_controller.rb on lines 30..39
app/app/controllers/concentrators_controller.rb on lines 45..54
app/app/controllers/image_cashieros_controller.rb on lines 26..35
app/app/controllers/plans_controller.rb on lines 26..35

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def create
    @category = Category.new(category_params)

    respond_to do |format|
      if @category.save
Severity: Major
Found in app/app/controllers/categories_controller.rb and 6 other locations - About 1 hr to fix
app/app/controllers/addresses_controller.rb on lines 26..35
app/app/controllers/bank_accounts_controller.rb on lines 26..35
app/app/controllers/clients_controller.rb on lines 30..39
app/app/controllers/concentrators_controller.rb on lines 45..54
app/app/controllers/image_cashieros_controller.rb on lines 26..35
app/app/controllers/plans_controller.rb on lines 26..35

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def create
    @plan = Plan.new(plan_params)

    respond_to do |format|
      if @plan.save
Severity: Major
Found in app/app/controllers/plans_controller.rb and 6 other locations - About 1 hr to fix
app/app/controllers/addresses_controller.rb on lines 26..35
app/app/controllers/bank_accounts_controller.rb on lines 26..35
app/app/controllers/categories_controller.rb on lines 26..35
app/app/controllers/clients_controller.rb on lines 30..39
app/app/controllers/concentrators_controller.rb on lines 45..54
app/app/controllers/image_cashieros_controller.rb on lines 26..35

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def create
    @concentrator = Concentrator.new(concentrator_params)

    respond_to do |format|
      if @concentrator.save
Severity: Major
Found in app/app/controllers/concentrators_controller.rb and 6 other locations - About 1 hr to fix
app/app/controllers/addresses_controller.rb on lines 26..35
app/app/controllers/bank_accounts_controller.rb on lines 26..35
app/app/controllers/categories_controller.rb on lines 26..35
app/app/controllers/clients_controller.rb on lines 30..39
app/app/controllers/image_cashieros_controller.rb on lines 26..35
app/app/controllers/plans_controller.rb on lines 26..35

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def create
    @bank_account = BankAccount.new(bank_account_params)

    respond_to do |format|
      if @bank_account.save
Severity: Major
Found in app/app/controllers/bank_accounts_controller.rb and 6 other locations - About 1 hr to fix
app/app/controllers/addresses_controller.rb on lines 26..35
app/app/controllers/categories_controller.rb on lines 26..35
app/app/controllers/clients_controller.rb on lines 30..39
app/app/controllers/concentrators_controller.rb on lines 45..54
app/app/controllers/image_cashieros_controller.rb on lines 26..35
app/app/controllers/plans_controller.rb on lines 26..35

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  def update
    respond_to do |format|
      if @address_range.update(address_range_params)
        format.html { redirect_to [@concentrator, @address_range], notice: 'Address range was successfully updated.' }
        format.json { render :show, status: :ok, location: @address_range }
Severity: Minor
Found in app/app/controllers/address_ranges_controller.rb and 1 other location - About 55 mins to fix
app/app/controllers/gateways_controller.rb on lines 43..50

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  def update
    respond_to do |format|
      if @gateway.update(gateway_params)
        format.html { redirect_to [@concentrator, @gateway], notice: 'Gateway was successfully updated.' }
        format.json { render :show, status: :ok, location: @gateway }
Severity: Minor
Found in app/app/controllers/gateways_controller.rb and 1 other location - About 55 mins to fix
app/app/controllers/address_ranges_controller.rb on lines 43..50

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

  def update
    respond_to do |format|
      if @user.update(user_params)
        format.html { redirect_to @user, notice: 'User was successfully updated.' }
        format.json { render :show, status: :ok, location: @user }
Severity: Major
Found in app/app/controllers/users_controller.rb and 7 other locations - About 55 mins to fix
app/app/controllers/addresses_controller.rb on lines 42..49
app/app/controllers/bank_accounts_controller.rb on lines 42..49
app/app/controllers/categories_controller.rb on lines 42..49
app/app/controllers/clients_controller.rb on lines 46..53
app/app/controllers/concentrators_controller.rb on lines 61..68
app/app/controllers/image_cashieros_controller.rb on lines 42..49
app/app/controllers/plans_controller.rb on lines 42..49

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

  def update
    respond_to do |format|
      if @client.update(client_params)
        format.html { redirect_to @client, notice: 'Client was successfully updated.' }
        format.json { render :show, status: :ok, location: @client }
Severity: Major
Found in app/app/controllers/clients_controller.rb and 7 other locations - About 55 mins to fix
app/app/controllers/addresses_controller.rb on lines 42..49
app/app/controllers/bank_accounts_controller.rb on lines 42..49
app/app/controllers/categories_controller.rb on lines 42..49
app/app/controllers/concentrators_controller.rb on lines 61..68
app/app/controllers/image_cashieros_controller.rb on lines 42..49
app/app/controllers/plans_controller.rb on lines 42..49
app/app/controllers/users_controller.rb on lines 44..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

  def update
    respond_to do |format|
      if @bank_account.update(bank_account_params)
        format.html { redirect_to @bank_account, notice: 'Bank account was successfully updated.' }
        format.json { render :show, status: :ok, location: @bank_account }
Severity: Major
Found in app/app/controllers/bank_accounts_controller.rb and 7 other locations - About 55 mins to fix
app/app/controllers/addresses_controller.rb on lines 42..49
app/app/controllers/categories_controller.rb on lines 42..49
app/app/controllers/clients_controller.rb on lines 46..53
app/app/controllers/concentrators_controller.rb on lines 61..68
app/app/controllers/image_cashieros_controller.rb on lines 42..49
app/app/controllers/plans_controller.rb on lines 42..49
app/app/controllers/users_controller.rb on lines 44..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

  def update
    respond_to do |format|
      if @plan.update(plan_params)
        format.html { redirect_to @plan, notice: 'Plan of datum was successfully updated.' }
        format.json { render :show, status: :ok, location: @plan }
Severity: Major
Found in app/app/controllers/plans_controller.rb and 7 other locations - About 55 mins to fix
app/app/controllers/addresses_controller.rb on lines 42..49
app/app/controllers/bank_accounts_controller.rb on lines 42..49
app/app/controllers/categories_controller.rb on lines 42..49
app/app/controllers/clients_controller.rb on lines 46..53
app/app/controllers/concentrators_controller.rb on lines 61..68
app/app/controllers/image_cashieros_controller.rb on lines 42..49
app/app/controllers/users_controller.rb on lines 44..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

  def update
    respond_to do |format|
      if @address.update(address_params)
        format.html { redirect_to @address, notice: 'Address was successfully updated.' }
        format.json { render :show, status: :ok, location: @address }
Severity: Major
Found in app/app/controllers/addresses_controller.rb and 7 other locations - About 55 mins to fix
app/app/controllers/bank_accounts_controller.rb on lines 42..49
app/app/controllers/categories_controller.rb on lines 42..49
app/app/controllers/clients_controller.rb on lines 46..53
app/app/controllers/concentrators_controller.rb on lines 61..68
app/app/controllers/image_cashieros_controller.rb on lines 42..49
app/app/controllers/plans_controller.rb on lines 42..49
app/app/controllers/users_controller.rb on lines 44..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

  def update
    respond_to do |format|
      if @category.update(category_params)
        format.html { redirect_to @category, notice: 'Category was successfully updated.' }
        format.json { render :show, status: :ok, location: @category }
Severity: Major
Found in app/app/controllers/categories_controller.rb and 7 other locations - About 55 mins to fix
app/app/controllers/addresses_controller.rb on lines 42..49
app/app/controllers/bank_accounts_controller.rb on lines 42..49
app/app/controllers/clients_controller.rb on lines 46..53
app/app/controllers/concentrators_controller.rb on lines 61..68
app/app/controllers/image_cashieros_controller.rb on lines 42..49
app/app/controllers/plans_controller.rb on lines 42..49
app/app/controllers/users_controller.rb on lines 44..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

  def update
    respond_to do |format|
      if @concentrator.update(concentrator_params)
        format.html { redirect_to @concentrator, notice: 'Concentrator was successfully updated.' }
        format.json { render :show, status: :ok, location: @concentrator }
Severity: Major
Found in app/app/controllers/concentrators_controller.rb and 7 other locations - About 55 mins to fix
app/app/controllers/addresses_controller.rb on lines 42..49
app/app/controllers/bank_accounts_controller.rb on lines 42..49
app/app/controllers/categories_controller.rb on lines 42..49
app/app/controllers/clients_controller.rb on lines 46..53
app/app/controllers/image_cashieros_controller.rb on lines 42..49
app/app/controllers/plans_controller.rb on lines 42..49
app/app/controllers/users_controller.rb on lines 44..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

  def update
    respond_to do |format|
      if @image_cashiero.update(image_cashiero_params)
        format.html { redirect_to @image_cashiero, notice: 'Image cashiero was successfully updated.' }
        format.json { render :show, status: :ok, location: @image_cashiero }
Severity: Major
Found in app/app/controllers/image_cashieros_controller.rb and 7 other locations - About 55 mins to fix
app/app/controllers/addresses_controller.rb on lines 42..49
app/app/controllers/bank_accounts_controller.rb on lines 42..49
app/app/controllers/categories_controller.rb on lines 42..49
app/app/controllers/clients_controller.rb on lines 46..53
app/app/controllers/concentrators_controller.rb on lines 61..68
app/app/controllers/plans_controller.rb on lines 42..49
app/app/controllers/users_controller.rb on lines 44..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language