Skip to content

Commit

Permalink
refactored if statement based on code review
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-spangler6 committed Nov 18, 2024
1 parent 6e7db9e commit 39600ac
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/models/concerns/form526_claim_fast_tracking_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,13 @@ def update_form_with_classification_codes(classified_contentions)
def classify_vagov_contentions(params)
user = OpenStruct.new({ flipper_id: user_uuid })
vro_client = VirtualRegionalOffice::Client.new
if Flipper.enabled?(:disability_526_expanded_contention_classification, user)
response = vro_client.classify_vagov_contentions_expanded(params)
return response.body
end
response = vro_client.classify_vagov_contentions(params)

Check failure on line 165 in app/models/concerns/form526_claim_fast_tracking_concern.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Layout/TrailingWhitespace: Trailing whitespace detected.
response = if Flipper.enabled?(:disability_526_expanded_contention_classification, user)

Check failure on line 166 in app/models/concerns/form526_claim_fast_tracking_concern.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Layout/TrailingWhitespace: Trailing whitespace detected.
vro_client.classify_vagov_contentions_expanded(params)

Check failure on line 167 in app/models/concerns/form526_claim_fast_tracking_concern.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Layout/IndentationWidth: Use 2 (not 1) spaces for indentation.

Check failure on line 167 in app/models/concerns/form526_claim_fast_tracking_concern.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Layout/TrailingWhitespace: Trailing whitespace detected.
else

Check failure on line 168 in app/models/concerns/form526_claim_fast_tracking_concern.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Layout/ElseAlignment: Align `else` with `if`.

Check failure on line 168 in app/models/concerns/form526_claim_fast_tracking_concern.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Layout/TrailingWhitespace: Trailing whitespace detected.
vro_client.classify_vagov_contentions(params)

Check failure on line 169 in app/models/concerns/form526_claim_fast_tracking_concern.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Layout/TrailingWhitespace: Trailing whitespace detected.
end

Check failure on line 170 in app/models/concerns/form526_claim_fast_tracking_concern.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Layout/EndAlignment: `end` at 170, 14 is not aligned with `if` at 166, 15.

response.body
end

Expand Down

0 comments on commit 39600ac

Please sign in to comment.