From: Toshi MARUYAMA Date: Sat, 9 Nov 2019 17:57:24 +0000 (+0000) Subject: cleanup: rubocop: fix Layout/IndentFirstArrayElement in app/models/project.rb X-Git-Tag: 4.1.0~54 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=82c0eaadc3011e9417dc2740f7df2e4082ae1a33;p=redmine.git cleanup: rubocop: fix Layout/IndentFirstArrayElement in app/models/project.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19049 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2233e177e..bb64ef7a6 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -106,7 +106,6 @@ Layout/IndentFirstArgument: # SupportedStyles: special_inside_parentheses, consistent, align_brackets Layout/IndentFirstArrayElement: Exclude: - - 'app/models/project.rb' - 'app/models/setting.rb' - 'lib/redmine/nested_set/issue_nested_set.rb' - 'lib/redmine/nested_set/project_nested_set.rb' diff --git a/app/models/project.rb b/app/models/project.rb index 6c88093f2..d4af06ca1 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -633,20 +633,22 @@ class Project < ActiveRecord::Base # The earliest start date of a project, based on it's issues and versions def start_date - @start_date ||= [ - issues.minimum('start_date'), - shared_versions.minimum('effective_date'), - Issue.fixed_version(shared_versions).minimum('start_date') - ].compact.min + @start_date ||= + [ + issues.minimum('start_date'), + shared_versions.minimum('effective_date'), + Issue.fixed_version(shared_versions).minimum('start_date') + ].compact.min end # The latest due date of an issue or version def due_date - @due_date ||= [ - issues.maximum('due_date'), - shared_versions.maximum('effective_date'), - Issue.fixed_version(shared_versions).maximum('due_date') - ].compact.max + @due_date ||= + [ + issues.maximum('due_date'), + shared_versions.maximum('effective_date'), + Issue.fixed_version(shared_versions).maximum('due_date') + ].compact.max end def overdue?