Showing 627 of 1,220 total issues
Avoid too many return
statements within this function. Open
return results;
Avoid too many return
statements within this function. Open
return select( selector.replace( rtrim, "$1" ), context, results, seed );
Avoid too many return
statements within this function. Open
return this.constructor( context ).find( selector );
Avoid too many return
statements within this function. Open
return results;
Avoid too many return
statements within this function. Open
return results;
Avoid too many return
statements within this function. Open
return this;
Avoid too many return
statements within this function. Open
return i ?
// Do a sibling check if the nodes have a common ancestor
siblingCheck( ap[i], bp[i] ) :
// Otherwise nodes in our document sort first
Avoid too many return
statements within this function. Open
return results;
Avoid too many return
statements within this function. Open
return ret == null ?
undefined :
ret;
Avoid too many return
statements within this function. Open
return (Math.round(res))
Avoid too many return
statements within this function. Open
return jQuery.makeArray( selector, this );
Avoid too many return
statements within this function. Open
return elem[ name ];
Avoid too many return
statements within this function. Open
return compare & 4 ? -1 : 1;
Method validateAdminPermissions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void validateAdminPermissions(final PermissionsDTO permissions, final Errors errors) {
final String currentTenant = TenantUtils.getCurrentTenant();
// It isn't possible to create ADMIN permissions over third party entities
for (final String applicationId : permissions.getSelectedApplicationsIds()) {
if (!applicationService.isApplicationFromTenant(applicationId, currentTenant)) {
- 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 equals
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
- 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 equals
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
- 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 doDelete
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected <V extends CatalogDocument> void doDelete(final Query query, final Class<V> resourceType) {
if (SyncResource.class.isAssignableFrom(resourceType)) {
final String collectionName = getMongoOps().getCollectionName(resourceType);
final Query queryFiltered = query;
- 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 updateResourceTenantsAuthByProvider
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void updateResourceTenantsAuthByProvider(final String providerId, final String tenantId, final boolean addGrant) {
// Update the Provider tenants authorization list, and list visible configuration, adding or
// removing values as needed and updating dependent elements too (alert, application, component,
// sensor)
- 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 buildSensorsFromCatalogSensors
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static final List<Sensor> buildSensorsFromCatalogSensors(final ApiConverterContext context) {
final List<Sensor> sensors = new ArrayList<Sensor>();
final List<CatalogSensor> catalogSensors = context.getMessage().getSensors();
if (!CollectionUtils.isEmpty(catalogSensors)) {
- 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 canSectorialUserAtLeastReadResource
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public static boolean canSectorialUserAtLeastReadResource(final CatalogUserDetails sectorialUser, final CatalogDocument resource) {
boolean allowed = false;
final boolean isSectorialResource = resource instanceof SectorResource<?>;
final boolean isSectorialGrantResource = resource instanceof SectorResourceGranted;
- 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"