Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

refactor: Remove useless top-level :: when defining classes

Christophe Bliardcdb0505ded0e
diff --git a/app/models/query/results.rb b/app/models/query/results.rb
index f00638ac408..ff06cfcae65 100644
--- a/app/models/query/results.rb
+++ b/app/models/query/results.rb
@@ -26,7 +26,7 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-class ::Query::Results
+class Query::Results
include ::Query::Results::GroupBy
include ::Query::Results::Sums
include Redmine::I18n
diff --git a/app/models/query/sort_criteria.rb b/app/models/query/sort_criteria.rb
index 5f3f2006b02..d649185c949 100644
--- a/app/models/query/sort_criteria.rb
+++ b/app/models/query/sort_criteria.rb
@@ -26,7 +26,7 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-class ::Query::SortCriteria < SortHelper::SortCriteria
+class Query::SortCriteria < SortHelper::SortCriteria
attr_reader :available_columns
##
diff --git a/app/models/query/statement_invalid.rb b/app/models/query/statement_invalid.rb
index 9e8847e321f..54d4fdd0eac 100644
--- a/app/models/query/statement_invalid.rb
+++ b/app/models/query/statement_invalid.rb
@@ -26,5 +26,5 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-class ::Query::StatementInvalid < ActiveRecord::StatementInvalid
+class Query::StatementInvalid < ActiveRecord::StatementInvalid
end
diff --git a/app/models/type.rb b/app/models/type.rb
index 5465bad85bc..0606ee30f66 100644
--- a/app/models/type.rb
+++ b/app/models/type.rb
@@ -26,7 +26,7 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-class ::Type < ApplicationRecord
+class Type < ApplicationRecord
# Work Package attributes for this type
# and constraints to specific attributes (by plugins).
include ::Type::Attributes
diff --git a/modules/reporting/lib/widget/table/entry_table.rb b/modules/reporting/lib/widget/table/entry_table.rb
index bba07bc7b71..03d338b62a9 100644
--- a/modules/reporting/lib/widget/table/entry_table.rb
+++ b/modules/reporting/lib/widget/table/entry_table.rb
@@ -26,7 +26,7 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-class ::Widget::Table::EntryTable < Widget::Table
+class Widget::Table::EntryTable < Widget::Table
FIELDS = %i[spent_on user_id activity_id work_package_id comments logged_by_id project_id].freeze
def render
diff --git a/modules/storages/lib/open_project/storages/append_storages_hosts_to_csp_hook.rb b/modules/storages/lib/open_project/storages/append_storages_hosts_to_csp_hook.rb
index 144830a8aa3..62d7ebac57b 100644
--- a/modules/storages/lib/open_project/storages/append_storages_hosts_to_csp_hook.rb
+++ b/modules/storages/lib/open_project/storages/append_storages_hosts_to_csp_hook.rb
@@ -28,7 +28,7 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-class ::OpenProject::Storages::AppendStoragesHostsToCspHook < OpenProject::Hook::Listener
+class OpenProject::Storages::AppendStoragesHostsToCspHook < OpenProject::Hook::Listener
# OpenProject's front-end needs to allow the browser to connect to external
# file servers for direct file uploads. Therefore it needs to extend its
# Content Security Policy (CSP) `connect-src` with the hostnames of all