Skip to content
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

User: Fix usergroup table loading and form updates - refs BT#22277 #5984

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

christianbeeznest
Copy link
Contributor

No description provided.

@@ -1588,16 +1588,32 @@ public function save($params, $showQuery = false)
return false;
}

public function update($params, $showQuery = false)
public function update($params, $showQuery = false): bool
Copy link

Choose a reason for hiding this comment

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

Missing function doc comment

@@ -1200,11 +1200,13 @@ public static function grid_js(

// Default row quantity
if (!isset($extra_params['rowList'])) {
$extra_params['rowList'] = [20, 50, 100, 500, 1000, $all_value];
$defaultRowList = [20, 50, 100, 500, 1000, $all_value];
Copy link

Choose a reason for hiding this comment

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

Variable "all_value" is not in valid camel caps format

@@ -1588,16 +1588,32 @@
return false;
}

public function update($params, $showQuery = false)
public function update($params, $showQuery = false): bool
Copy link

Choose a reason for hiding this comment

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

The method update() has an NPath complexity of 768. The configured NPath complexity threshold is 200.

@@ -1588,16 +1588,32 @@
return false;
}

public function update($params, $showQuery = false)
public function update($params, $showQuery = false): bool
Copy link

Choose a reason for hiding this comment

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

Avoid unused parameters such as '$showQuery'.

$rowList = $rowList['options'];
$rowList[] = $all_value;
} else {
Copy link

Choose a reason for hiding this comment

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

The method grid_js uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.

Copy link

codeclimate bot commented Dec 17, 2024

Code Climate has analyzed commit 481e899 and detected 11 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 8
Complexity 1
Bug Risk 1
Clarity 1

View more on Code Climate.

@NicoDucou NicoDucou merged commit 487b328 into chamilo:master Dec 17, 2024
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants