Skip to content

Fix some of the issues reported by SonarCloud - #38147

Merged
micbar merged 5 commits into
masterfrom
sonar-issues
Dec 3, 2020
Merged

micbar merged 5 commits into
masterfrom
sonar-issues

Conversation

@karakayasemi

Copy link
Copy Markdown
Contributor

Description

  • fix unreachable states due to void method usage in if statements
  • fix identical sub-expressions bug, check targetGroupObject is null
  • do not return void methods result
  • remove unreachable code

Related Issue

Motivation and Context

Reduce number of bugs reported by SonarCloud

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@phil-davis phil-davis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


$isSubAdminOfGroup = false;
if ($targetUserObject !== null && $targetUserObject !== null) {
if ($targetUserObject !== null && $targetGroupObject !== null) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this looks like a real bug. The change will fix some edge case.

@owncloud owncloud deleted a comment from update-docs Bot Nov 30, 2020
@micbar
micbar merged commit cfd32b8 into master Dec 3, 2020
@delete-merged-branch
delete-merged-branch Bot deleted the sonar-issues branch December 3, 2020 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants