The method displayDegreeChart() has an NPath complexity of 202752. The configured NPath complexity threshold is 200. Open
public static function displayDegreeChart(
$scoreList,
$widthTable,
$title = '',
$sizeRatio = 1,
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method displayDegreeChartChildren() has an NPath complexity of 53760. The configured NPath complexity threshold is 200. Open
public static function displayDegreeChartChildren(
$scoreList,
$widthTable,
$title = '',
$sizeRatio = 1,
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method displayDegreeChartByCategory() has an NPath complexity of 270. The configured NPath complexity threshold is 200. Open
public static function displayDegreeChartByCategory($scoreListAll, $title, $sizeRatio = 1)
{
$maxHeight = 0;
$groupCategoriesByBracket = false;
if ($groupCategoriesByBracket) {
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method createAnswersForm() has an NPath complexity of 119499264. The configured NPath complexity threshold is 200. Open
public function createAnswersForm($form)
{
global $text;
$nbAnswers = isset($_POST['nb_answers']) ? (int) $_POST['nb_answers'] : 4;
// The previous default value was 2. See task #1759.
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
Missing class import via use statement (line '242', column '26'). Open
$objAnswer = new Answer($this->id);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '80', column '27'). Open
$answer = new Answer($this->id);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '468', column '36'). Open
$objCategory = new Testcategory();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '534', column '29'). Open
$testCategory = new Testcategory();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '1226', column '35'). Open
$objectExercise = new Exercise();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method displayDegreeChartByCategory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$scoreList = $scoreListAll;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method displayDegreeChartChildren uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return $html;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method displayDegreeChartChildren uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$class = '';
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method createAnswersForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$rdoCorrect->setValue($j);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method displayDegreeChartByCategory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$i++;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method displayDegreeChart uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return $html;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method displayDegreeChartChildren uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$html .= '<td width="'
.$colWidth
.'px" style="vertical-align: bottom;font-size: '
.$textSize
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method processAnswersCreation uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
for ($i = 1; $i <= 8; $i++) {
Question::saveQuestionOption($question, $this->options[$i], $i);
}
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method displayDegreeChart uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$scoreOnBottom = 0;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method displayDegreeChartByCategory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$categoryPrefixList[$matches[1]] = $categoryId;
$scoreList[$categoryId] = $scoreListAll[$categoryId];
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method createAnswersForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$form->addElement('radio', 'correct['.$i.']', null, null, 1);
$form->addElement('radio', 'correct['.$i.']', null, null, 2);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method getResponseDegreeInfo uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if ($studentDegreeChoicePosition >= 6) {
$result = [
'color' => '#FFFFFF',
'background-color' => '#ED4040',
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method displayDegreeChartChildren uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$scoreOnBottom = 0;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method displayDegreeChartByCategory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// doesn't match the prefix '[math] Math category'
$scoreList[$categoryId] = $scoreListAll[$categoryId];
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method getResponseDegreeInfo uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$checkResult = $studentAnswer == $expectedAnswer ? true : false;
if ($checkResult) {
if ($studentDegreeChoicePosition >= 6) {
$result = [
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method displayDegreeChartByCategory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$categoryName = $categoryQuestionName;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method getAnswerColor uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// bummer, wrong answer dude
switch ($percentage) {
case 3:
return self::LEVEL_WHITE;
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid unused parameters such as '$sizeRatio'. Open
public static function displayDegreeChartByCategory($scoreListAll, $title, $sizeRatio = 1)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused local variables such as '$textSize'. Open
$textSize = strpos($title, 'ensemble') > 0 ||
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$totalAttemptNumber'. Open
$totalAttemptNumber = $numberOfQuestions;
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$noValue'. Open
[$noValue, $height] = self::displayDegreeChartChildren(
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$courseId'. Open
$courseId = api_get_course_int_id();
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$data'. Open
foreach ($optionData as $id => $data) {
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused parameters such as '$widthTable'. Open
$widthTable,
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Missing parameter name Open
* @param $widthTable
- Exclude checks
Expected 8 spaces after parameter type; 4 found Open
* @param int $minHeight
- Exclude checks
Variable "IncorrectAnswers" is not in valid camel caps format Open
$html .= '<div class="answers-title">'.$IncorrectAnswers.'</div>';
- Exclude checks
Missing parameter name Open
* @param $position
- Exclude checks
Missing parameter name Open
* @param $scoreList
- Exclude checks
Expected 7 spaces after parameter type; 3 found Open
* @param bool $groupCategoriesByBracket
- Exclude checks
Variable "CorrectAnswers" is not in valid camel caps format Open
$html .= '<div class="answers-title">'.$CorrectAnswers.'</div>';
- Exclude checks
Expected 8 spaces after parameter type; 4 found Open
* @param int $sizeRatio
- Exclude checks
Missing parameter name Open
* @param $exeId
- Exclude checks
Expected 8 spaces after parameter type; 4 found Open
* @param int $sizeRatio
- Exclude checks
Variable "IncorrectAnswers" is not in valid camel caps format Open
$IncorrectAnswers = sprintf(get_lang('Incorrect answers: %s'), $nbResponsesInc);
- Exclude checks
Variable "IgnoranceAnswers" is not in valid camel caps format Open
$IgnoranceAnswers = sprintf(get_lang('Ignorance: %s'), $nbResponsesIng);
- Exclude checks
Missing function doc comment Open
public function __construct()
- Exclude checks
Missing function doc comment Open
public function return_header(Exercise $exercise, $counter = null, $score = [])
- Exclude checks
Expected 5 spaces after parameter type; 1 found Open
* @param string $title
- Exclude checks
Missing parameter name Open
* @param $questionId
- Exclude checks
Method name "MultipleAnswerTrueFalseDegreeCertainty::return_header" is not in camel caps format Open
public function return_header(Exercise $exercise, $counter = null, $score = [])
- Exclude checks
Missing parameter name Open
* @param $exeId
- Exclude checks
Expected 7 spaces after parameter type; 3 found Open
* @param bool $returnHeight
- Exclude checks
Expected 7 spaces after parameter type; 3 found Open
* @param bool $returnHeight
- Exclude checks
Variable "edit_exercise_in_lp" is not in valid camel caps format Open
if (true === $objEx->edit_exercise_in_lp ||
- Exclude checks
Expected 7 spaces after parameter type; 3 found Open
* @param bool $groupCategoriesByBracket
- Exclude checks
Expected 8 spaces after parameter type; 4 found Open
* @param int $numberOfQuestions
- Exclude checks
Expected 8 spaces after parameter type; 4 found Open
* @param int $minHeight
- Exclude checks
Missing parameter name Open
* @param $optionId
- Exclude checks
Variable "IgnoranceAnswers" is not in valid camel caps format Open
$html .= '<div class="answers-title">'.$IgnoranceAnswers.'</div>';
- Exclude checks
Missing parameter name Open
* @param $scoreList
- Exclude checks
Expected 7 spaces after parameter type; 3 found Open
* @param bool $displayExplanationText
- Exclude checks
Expected 8 spaces after parameter type; 4 found Open
* @param int $numberOfQuestions
- Exclude checks
Missing parameter name Open
* @param $widthTable
- Exclude checks
Missing parameter name Open
* @param $exeId
- Exclude checks
Missing parameter name Open
* @param $idAuto
- Exclude checks
Expected 5 spaces after parameter type; 1 found Open
* @param string $title
- Exclude checks
Expected 7 spaces after parameter type; 3 found Open
* @param bool $displayExplanationText
- Exclude checks
Variable "CorrectAnswers" is not in valid camel caps format Open
$CorrectAnswers = sprintf(get_lang('Correct answers: %s'), $nbResponsesCor);
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
$recipientName = api_get_person_name($userInfo['firstname'],
- Exclude checks
The variable $IncorrectAnswers is not named in camelCase. Open
public static function displayDegreeChart(
$scoreList,
$widthTable,
$title = '',
$sizeRatio = 1,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $IgnoranceAnswers is not named in camelCase. Open
public static function displayDegreeChart(
$scoreList,
$widthTable,
$title = '',
$sizeRatio = 1,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $CorrectAnswers is not named in camelCase. Open
public static function displayDegreeChart(
$scoreList,
$widthTable,
$title = '',
$sizeRatio = 1,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $IncorrectAnswers is not named in camelCase. Open
public static function displayDegreeChart(
$scoreList,
$widthTable,
$title = '',
$sizeRatio = 1,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $IgnoranceAnswers is not named in camelCase. Open
public static function displayDegreeChart(
$scoreList,
$widthTable,
$title = '',
$sizeRatio = 1,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $CorrectAnswers is not named in camelCase. Open
public static function displayDegreeChart(
$scoreList,
$widthTable,
$title = '',
$sizeRatio = 1,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method return_header is not named in camelCase. Open
public function return_header(Exercise $exercise, $counter = null, $score = [])
{
$header = parent::return_header($exercise, $counter, $score);
$header .= '<table class="'.$this->questionTableClass.'"><tr>';
$header .= '<th>'.get_lang('Your choice').'</th>';
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}