Skip to content

Commit

Permalink
camelCase refactoring to snake_case
Browse files Browse the repository at this point in the history
  • Loading branch information
matheuszych committed Jun 28, 2024
1 parent f2e9d51 commit 8ce55e3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Modules/TestQuestionPool/classes/class.assFormulaQuestion.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ public function getResultUnits(assFormulaQuestionResult $result): array
return [];
}

$resultUnits = $this->resultunits[$result->getResult()];
$result_units = $this->resultunits[$result->getResult()];

usort($resultUnits, static function (assFormulaQuestionUnit $a, assFormulaQuestionUnit $b) {
usort($result_units, static function (assFormulaQuestionUnit $a, assFormulaQuestionUnit $b) {
return $a->getSequence() <=> $b->getSequence();
});

return $resultUnits;
return $result_units;
}

public function getAllResultUnits(): array
Expand Down Expand Up @@ -324,11 +324,11 @@ public function substituteVariables(array $userdata, bool $graphicalOutput = fal
}

$units = "";
$resultUnits = $this->getResultUnits($resObj);
if (count($resultUnits) > 0) {
$result_units = $this->getResultUnits($resObj);
if (count($result_units) > 0) {
if ($forsolution) {
if (is_array($userdata)) {
foreach ($resultUnits as $unit) {
foreach ($result_units as $unit) {
if (isset($userdata[$result]["unit"]) && $userdata[$result]["unit"] == $unit->getId()) {
$units = $unit->getUnit();
}
Expand All @@ -341,7 +341,7 @@ public function substituteVariables(array $userdata, bool $graphicalOutput = fal
} else {
$units = '<select name="result_' . $result . '_unit">';
$units .= '<option value="-1">' . $this->lng->txt("select_unit") . '</option>';
foreach ($resultUnits as $unit) {
foreach ($result_units as $unit) {
$units .= '<option value="' . $unit->getId() . '"';
if (array_key_exists($result, $userdata) &&
is_array($userdata[$result]) &&
Expand Down

0 comments on commit 8ce55e3

Please sign in to comment.