-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content update should use modify method #10937 #10938
base: epic-node-upgrading
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## epic-node-upgrading #10938 +/- ##
=========================================================
+ Coverage 84.61% 84.69% +0.07%
- Complexity 20054 20066 +12
=========================================================
Files 2641 2641
Lines 69707 69676 -31
Branches 5617 5610 -7
=========================================================
+ Hits 58984 59010 +26
+ Misses 8007 7952 -55
+ Partials 2716 2714 -2 ☔ View full report in Codecov by Sentry. |
{ | ||
return contentBeforeChange; | ||
} | ||
if ( currentInherit.contains( ContentInheritType.CONTENT ) || currentInherit.contains( ContentInheritType.NAME ) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue identified by the PMD linter is that the nested if
statements could be combined into a single conditional statement to improve code clarity and reduce redundancy. In this case, since the outer if
already checks params.stopInherit()
, we can combine the two conditions into one.
Here’s the suggested single line change to combine the conditions:
if ( currentInherit.contains( ContentInheritType.CONTENT ) || currentInherit.contains( ContentInheritType.NAME ) ) | |
if (params.stopInherit() && (currentInherit.contains(ContentInheritType.CONTENT) || currentInherit.contains(ContentInheritType.NAME))) { |
This change ensures that both conditions are checked in one statement, making the code cleaner and easier to read.
This comment was generated by an experimental AI tool.
No description provided.