Skip to content

Conversation

@christianbeeznest
Copy link
Contributor

No description provided.

$objQuestion->updateWeighting($questionWeighting);
$objQuestion->save($objExercise);

if (HOT_SPOT_DELINEATION == $answerType) {

Choose a reason for hiding this comment

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

Identical blocks of code found in 2 locations. Consider refactoring.

/**
* Add adaptive scenario selector fields (success/failure) to the question form.
*/
private function addAdaptiveScenarioFields(FormValidator $form, array $questionList)

Choose a reason for hiding this comment

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

Method addAdaptiveScenarioFields has 69 lines of code (exceeds 25 allowed). Consider refactoring.

$objQuestion->updateWeighting($questionWeighting);
$objQuestion->save($objExercise);

if (HOT_SPOT_DELINEATION == $answerType) {

Choose a reason for hiding this comment

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

Identical blocks of code found in 2 locations. Consider refactoring.

];
}

public function getScenarioDestination(int $exerciseId): array

Choose a reason for hiding this comment

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

Method getScenarioDestination has 28 lines of code (exceeds 25 allowed). Consider refactoring.

@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit aa3120f and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 2
Duplication 2

View more on Code Climate.

@ywarnier ywarnier merged commit 5299ad5 into chamilo:master Apr 2, 2025
1 of 8 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