Skip to content

Conversation

@christianbeeznest
Copy link
Contributor

No description provided.

}

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

Choose a reason for hiding this comment

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

Missing function doc comment

// 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];

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

}

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

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.

}

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

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'.

if (is_array($rowList) && isset($rowList['options']) && is_array($rowList['options'])) {
$rowList = $rowList['options'];
$rowList[] = $all_value;
} else {

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.

@qlty-cloud-legacy
Copy link

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