Reduce cognitive complexity of `MergeRequestBlock#check_block_constraints`

The following discussion from !11600 (merged) should be addressed:

  • @nick.thomas started a discussion: (+1 comment)

Method check_block_constraints has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. in ee/app/models/merge_request_block.rb:15

Just spotted ☝.. worth following up after I feel.

cc @nick.thomas

Edited May 08, 2019 by Nick Thomas
Assignee Loading
Time tracking Loading