Skip to content

Commit

Permalink
fixed code style issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nulls committed Jun 16, 2022
1 parent 28f4899 commit 29395f1
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,11 @@ class BooleanExpressionsRule(configRules: List<RulesConfig>) : DiktatRule(
}
}

private fun applyInternal(input: NExpression<K>,
upperExpressionCreator: ExpressionCreator<K>,
innerExpressionCreator: ExpressionCreator<K>): Expression<K> {
private fun applyInternal(
input: NExpression<K>,
upperExpressionCreator: ExpressionCreator<K>,
innerExpressionCreator: ExpressionCreator<K>
): Expression<K> {
val commonExpression = requireNotNull(findCommonExpression(input.children)) {
"Common expression is not found for $input"
}
Expand All @@ -292,9 +294,11 @@ class BooleanExpressionsRule(configRules: List<RulesConfig>) : DiktatRule(
)))
}

private fun excludeChild(expression: Expression<K>,
expressionCreator: ExpressionCreator<K>,
childToExclude: Expression<K>): Expression<K> {
private fun excludeChild(
expression: Expression<K>,
expressionCreator: ExpressionCreator<K>,
childToExclude: Expression<K>
): Expression<K> {
val leftChildren = expression.children.filterNot { it.equals(childToExclude) }
return if (leftChildren.size == 1) {
leftChildren.first()
Expand Down

0 comments on commit 29395f1

Please sign in to comment.