From e6ac2f0d886f2d62e7bfbc5d7f1a6b54b59b8a3c Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 5 Jun 2024 09:29:42 +1000 Subject: [PATCH] Style/SuperArguments Call super without arguments and parentheses when the signature is identical. --- app/components/help_modal_component.rb | 2 +- app/controllers/application_controller.rb | 2 +- app/helpers/bulk_form_builder.rb | 2 +- app/models/concerns/file_preferences.rb | 2 +- .../enterprise_fees_with_tax_report_by_order.rb | 2 +- .../enterprise_fees_with_tax_report_by_producer.rb | 2 +- lib/reporting/reports/enterprise_fee_summary/fee_summary.rb | 2 +- lib/reporting/reports/enterprise_fee_summary/parameters.rb | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/components/help_modal_component.rb b/app/components/help_modal_component.rb index 297ff34765..fef42131aa 100644 --- a/app/components/help_modal_component.rb +++ b/app/components/help_modal_component.rb @@ -2,6 +2,6 @@ class HelpModalComponent < ModalComponent def initialize(id:, close_button: true) - super(id:, close_button:) + super end end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8c5675b217..c31e748a30 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -60,7 +60,7 @@ class ApplicationController < ActionController::Base rescue StandardError 'unknown' end}") - super(options, response_status) + super end def set_checkout_redirect diff --git a/app/helpers/bulk_form_builder.rb b/app/helpers/bulk_form_builder.rb index dcb45ae3bc..cd1da4e54e 100644 --- a/app/helpers/bulk_form_builder.rb +++ b/app/helpers/bulk_form_builder.rb @@ -8,6 +8,6 @@ class BulkFormBuilder < ActionView::Helpers::FormBuilder opts[:class] = "#{opts[:class]} changed".strip end - super(field, **opts) + super end end diff --git a/app/models/concerns/file_preferences.rb b/app/models/concerns/file_preferences.rb index 68682b3263..00dedce496 100644 --- a/app/models/concerns/file_preferences.rb +++ b/app/models/concerns/file_preferences.rb @@ -22,7 +22,7 @@ module FilePreferences if has_preference?("#{key}_blob_id") :file else - super(key) + super end end diff --git a/lib/reporting/reports/enterprise_fee_summary/enterprise_fees_with_tax_report_by_order.rb b/lib/reporting/reports/enterprise_fee_summary/enterprise_fees_with_tax_report_by_order.rb index 2ea4a4db14..6b09906076 100644 --- a/lib/reporting/reports/enterprise_fee_summary/enterprise_fees_with_tax_report_by_order.rb +++ b/lib/reporting/reports/enterprise_fee_summary/enterprise_fees_with_tax_report_by_order.rb @@ -7,7 +7,7 @@ module Reporting attr_accessor :parameters def initialize(user, params = {}, render: false) - super(user, params, render:) + super end def search diff --git a/lib/reporting/reports/enterprise_fee_summary/enterprise_fees_with_tax_report_by_producer.rb b/lib/reporting/reports/enterprise_fee_summary/enterprise_fees_with_tax_report_by_producer.rb index 2760112f1b..a9e487c2e7 100644 --- a/lib/reporting/reports/enterprise_fee_summary/enterprise_fees_with_tax_report_by_producer.rb +++ b/lib/reporting/reports/enterprise_fee_summary/enterprise_fees_with_tax_report_by_producer.rb @@ -7,7 +7,7 @@ module Reporting attr_accessor :permissions def initialize(user, params = {}, render: false) - super(user, params, render:) + super @permissions = Permissions.new(user) end diff --git a/lib/reporting/reports/enterprise_fee_summary/fee_summary.rb b/lib/reporting/reports/enterprise_fee_summary/fee_summary.rb index c2fc14159b..61679e445e 100644 --- a/lib/reporting/reports/enterprise_fee_summary/fee_summary.rb +++ b/lib/reporting/reports/enterprise_fee_summary/fee_summary.rb @@ -7,7 +7,7 @@ module Reporting attr_accessor :permissions, :parameters def initialize(user, params = {}, render: false) - super(user, params, render:) + super @parameters = Parameters.new(params.fetch(:q, {})) @parameters.validate! @permissions = Permissions.new(user) diff --git a/lib/reporting/reports/enterprise_fee_summary/parameters.rb b/lib/reporting/reports/enterprise_fee_summary/parameters.rb index 26c0b1dc06..f5a6febb17 100644 --- a/lib/reporting/reports/enterprise_fee_summary/parameters.rb +++ b/lib/reporting/reports/enterprise_fee_summary/parameters.rb @@ -28,7 +28,7 @@ module Reporting self.shipping_method_ids = [] self.payment_method_ids = [] - super(attributes) + super cleanup_arrays end