From 1b78a8e95771a99e64c13358a04b0343175b306c Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Mon, 12 Jun 2017 15:05:46 +0200 Subject: [PATCH] Enable the Layout/CaseIndentation cop --- .rubocop.yml | 3 ++- app/services/notification_service.rb | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 78b587ff4..73e8ae0a7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -21,7 +21,8 @@ Layout/BlockEndNewline: Enabled: true Layout/CaseIndentation: - Enabled: false + Enabled: true + EnforcedStyle: end Layout/ClosingParenthesisIndentation: Enabled: true diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index a401064cf..27abe24cf 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -25,20 +25,20 @@ class NotificationService def text_for_notif attribut='' case @type_notif - when 'commentaire' - "#{notification.liste.size + 1} nouveau(x) commentaire(s) déposé(s)." - when 'cerfa' - "Un nouveau formulaire a été déposé." - when 'piece_justificative' - attribut - when 'champs' - attribut - when 'submitted' - "Le dossier nº #{@dossier_id} a été déposé." - when 'avis' - 'Un nouvel avis a été rendu' - else - 'Notification par défaut' + when 'commentaire' + "#{notification.liste.size + 1} nouveau(x) commentaire(s) déposé(s)." + when 'cerfa' + "Un nouveau formulaire a été déposé." + when 'piece_justificative' + attribut + when 'champs' + attribut + when 'submitted' + "Le dossier nº #{@dossier_id} a été déposé." + when 'avis' + 'Un nouvel avis a été rendu' + else + 'Notification par défaut' end end end