Showing 10 of 16 total issues
Method build_transaction
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
def build_transaction(builder, transaction)
builder.DrctDbtTxInf do
builder.PmtId do
if transaction.instruction.present?
builder.InstrId(transaction.instruction)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method build_transaction
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
def build_transaction(builder, transaction)
builder.CdtTrfTxInf do
builder.PmtId do
if transaction.instruction.present?
builder.InstrId(transaction.instruction)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method build_transaction
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
def build_transaction(builder, transaction)
builder.DrctDbtTxInf do
builder.PmtId do
if transaction.instruction.present?
builder.InstrId(transaction.instruction)
Method build_payment_informations
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def build_payment_informations(builder, schema_name)
# Build a PmtInf block for every group of transactions
grouped_transactions.each do |group, transactions|
# All transactions with the same requested_date are placed into the same PmtInf block
builder.PmtInf do
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method build_transaction
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
def build_transaction(builder, transaction)
builder.CdtTrfTxInf do
builder.PmtId do
if transaction.instruction.present?
builder.InstrId(transaction.instruction)
Method build_payment_informations
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def build_payment_informations(builder, schema_name)
# Build a PmtInf block for every group of transactions
grouped_transactions.each do |group, transactions|
builder.PmtInf do
builder.PmtInfId(payment_information_identification(group))
Method build_payment_informations
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
def build_payment_informations(builder, schema_name)
# Build a PmtInf block for every group of transactions
grouped_transactions.each do |group, transactions|
# All transactions with the same requested_date are placed into the same PmtInf block
builder.PmtInf do
Method build_amendment_informations
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def build_amendment_informations(builder, transaction)
builder.AmdmntInd(true)
builder.AmdmntInfDtls do
if transaction.original_debtor_account
builder.OrgnlDbtrAcct do
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method build_amendment_informations
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
def build_amendment_informations(builder, transaction)
builder.AmdmntInd(true)
builder.AmdmntInfDtls do
if transaction.original_debtor_account
builder.OrgnlDbtrAcct do
Method build_payment_informations
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def build_payment_informations(builder, schema_name)
# Build a PmtInf block for every group of transactions
grouped_transactions.each do |group, transactions|
builder.PmtInf do
builder.PmtInfId(payment_information_identification(group))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"