File tree 1 file changed +10
-6
lines changed
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -279,9 +279,11 @@ class BooleanExpressionsRule(configRules: List<RulesConfig>) : DiktatRule(
279
279
}
280
280
}
281
281
282
- private fun applyInternal (input : NExpression <K >,
283
- upperExpressionCreator : ExpressionCreator <K >,
284
- innerExpressionCreator : ExpressionCreator <K >): Expression <K > {
282
+ private fun applyInternal (
283
+ input : NExpression <K >,
284
+ upperExpressionCreator : ExpressionCreator <K >,
285
+ innerExpressionCreator : ExpressionCreator <K >
286
+ ): Expression <K > {
285
287
val commonExpression = requireNotNull(findCommonExpression(input.children)) {
286
288
" Common expression is not found for $input "
287
289
}
@@ -292,9 +294,11 @@ class BooleanExpressionsRule(configRules: List<RulesConfig>) : DiktatRule(
292
294
)))
293
295
}
294
296
295
- private fun excludeChild (expression : Expression <K >,
296
- expressionCreator : ExpressionCreator <K >,
297
- childToExclude : Expression <K >): Expression <K > {
297
+ private fun excludeChild (
298
+ expression : Expression <K >,
299
+ expressionCreator : ExpressionCreator <K >,
300
+ childToExclude : Expression <K >
301
+ ): Expression <K > {
298
302
val leftChildren = expression.children.filterNot { it.equals(childToExclude) }
299
303
return if (leftChildren.size == 1 ) {
300
304
leftChildren.first()
You can’t perform that action at this time.
0 commit comments