The method readOrderedBy() has an NPath complexity of 288. The configured NPath complexity threshold is 200. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 save() has an NPath complexity of 91413. The configured NPath complexity threshold is 200. Open
public function save()
{
$answerTable = Database::get_course_table(TABLE_QUIZ_ANSWER);
$em = Database::getManager();
$questionId = (int) $this->questionId;
- 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 duplicate() has an NPath complexity of 3740. The configured NPath complexity threshold is 200. Open
public function duplicate(Question $newQuestion, $courseInfo = null)
{
$newQuestionId = $newQuestion->id;
$em = Database::getManager();
- 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
Avoid using undefined variables such as '$newOptionList' which will lead to PHP notices. Open
$newOptionList[] = $item['iid'];
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$newOptionList' which will lead to PHP notices. Open
$fixedList[$newOptionList[$i]] = $item['iid'];
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Missing class import via use statement (line '83', column '32'). Open
$objExercise = new Exercise($this->course_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
The method __construct uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->read(); // natural order
}
- 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 __construct uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$courseInfo = api_get_course_info();
}
- 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 __construct uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$objExercise = $exercise;
}
- 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 save uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// https://support.chamilo.org/issues/6558
// function updateAnswers already escape_string, error if we do it twice.
// Feed function updateAnswers with none escaped strings
$this->updateAnswers(
- 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 duplicate 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 <= $this->nbrAnswers; $i++) {
if ($this->course['id'] != $courseInfo['id']) {
$this->answer[$i] = DocumentManager::replaceUrlWithNewCourseCode(
$this->answer[$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 save uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$correct = $status;
}
- 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 property $new_destination is not named in camelCase. Open
class Answer
{
public $questionId;
// these are arrays
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $course_id is not named in camelCase. Open
public function __construct($questionId, $course_id = 0, $exercise = null, $readAnswer = true)
{
$this->questionId = (int) $questionId;
$this->answer = [];
$this->correct = [];
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The property $new_correct is not named in camelCase. Open
class Answer
{
public $questionId;
// these are arrays
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $new_nbrAnswers is not named in camelCase. Open
class Answer
{
public $questionId;
// these are arrays
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $new_hotspot_coordinates is not named in camelCase. Open
class Answer
{
public $questionId;
// these are arrays
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $new_answer is not named in camelCase. Open
class Answer
{
public $questionId;
// these are arrays
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $new_hotspot_type is not named in camelCase. Open
class Answer
{
public $questionId;
// these are arrays
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $hotspot_coordinates is not named in camelCase. Open
class Answer
{
public $questionId;
// these are arrays
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $new_comment is not named in camelCase. Open
class Answer
{
public $questionId;
// these are arrays
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $hotspot_type is not named in camelCase. Open
class Answer
{
public $questionId;
// these are arrays
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $new_weighting is not named in camelCase. Open
class Answer
{
public $questionId;
// these are arrays
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $new_position is not named in camelCase. Open
class Answer
{
public $questionId;
// these are arrays
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $auto_id is not named in camelCase. Open
public function selectAnswerByAutoId($auto_id)
{
$table = Database::get_course_table(TABLE_QUIZ_ANSWER);
$auto_id = (int) $auto_id;
$sql = "SELECT iid, answer FROM $table
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $new_hotspot_type is not named in camelCase. Open
public function createAnswer(
$answer,
$correct,
$comment,
$weighting,
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $new_hotspot_coordinates is not named in camelCase. Open
public function createAnswer(
$answer,
$correct,
$comment,
$weighting,
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Member variable "new_weighting" is not in valid camel caps format Open
public $new_weighting;
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
$this->hotspot_coordinates = [];
- Exclude checks
Variable "new_comment" is not in valid camel caps format Open
$this->new_comment = [];
- Exclude checks
Variable "result_question" is not in valid camel caps format Open
$result_question = Database::query($sql);
- Exclude checks
Variable "TBL_ANSWER" is not in valid camel caps format Open
FROM $TBL_ANSWER
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
$this->hotspot_coordinates[$i] = $object->hotspot_coordinates;
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
return isset($this->hotspot_type[$id]) ? $this->hotspot_type[$id] : null;
- Exclude checks
Variable "new_answer" is not in valid camel caps format Open
$this->new_answer[$id] = $answer;
- Exclude checks
Variable "new_correct" is not in valid camel caps format Open
$this->new_correct = [];
- Exclude checks
Variable "doubt_data" is not in valid camel caps format Open
$doubt_data = null;
- Exclude checks
Variable "auto_id" is not in valid camel caps format Open
public function selectAnswerByAutoId($auto_id)
- Exclude checks
Variable "new_hotspot_coordinates" is not in valid camel caps format Open
$new_hotspot_coordinates = null,
- Exclude checks
Variable "new_hotspot_type" is not in valid camel caps format Open
$new_hotspot_type = null,
- Exclude checks
Member variable "new_correct" is not in valid camel caps format Open
public $new_correct;
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$courseInfo = api_get_course_info_by_id($course_id);
- Exclude checks
Variable "result_question" is not in valid camel caps format Open
$questionType = Database::fetch_array($result_question);
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
$this->hotspot_coordinates[$i] = $object->hotspot_coordinates;
- Exclude checks
Variable "doubt_data" is not in valid camel caps format Open
if (UNIQUE_ANSWER_NO_OPTION == $questionType['type'] && !empty($doubt_data)) {
- Exclude checks
Variable "new_nbrAnswers" is not in valid camel caps format Open
$this->new_nbrAnswers++;
- Exclude checks
Variable "new_hotspot_coordinates" is not in valid camel caps format Open
$this->new_hotspot_coordinates[$id] = $new_hotspot_coordinates;
- Exclude checks
Variable "new_hotspot_type" is not in valid camel caps format Open
$this->new_hotspot_type[$id] = $new_hotspot_type;
- Exclude checks
Member variable "new_comment" is not in valid camel caps format Open
public $new_comment;
- Exclude checks
Variable "random_answers" is not in valid camel caps format Open
if ('1' == $objExercise->random_answers && CALCULATED_ANSWER != $this->getQuestionType()) {
- Exclude checks
Variable "doubt_data" is not in valid camel caps format Open
$this->iid[$i] = $doubt_data->iid;
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
'hotspot_type' => $this->hotspot_type[$i],
- Exclude checks
Variable "new_hotspot_coordinates" is not in valid camel caps format Open
$this->new_hotspot_coordinates = [];
- Exclude checks
Variable "new_hotspot_type" is not in valid camel caps format Open
$this->new_hotspot_type = [];
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
$this->hotspot_coordinates[$i] = $object->hotspot_coordinates;
- Exclude checks
Variable "new_correct" is not in valid camel caps format Open
$this->new_correct[$id] = $correct;
- Exclude checks
Variable "new_weighting" is not in valid camel caps format Open
$this->new_weighting[$id] = $weighting;
- Exclude checks
Variable "new_destination" is not in valid camel caps format Open
$this->new_destination[$id] = $destination;
- Exclude checks
Member variable "new_hotspot_coordinates" is not in valid camel caps format Open
public $new_hotspot_coordinates;
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$this->course_id = $courseInfo['real_id'];
- Exclude checks
Variable "TBL_ANSWER" is not in valid camel caps format Open
$TBL_ANSWER = Database::get_course_table(TABLE_QUIZ_ANSWER);
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
$this->hotspot_type[$i] = $object->hotspot_type;
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
$this->hotspot_coordinates[$i] = isset($object->hotspot_coordinates) ? $object->hotspot_coordinates : 0;
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
$this->hotspot_coordinates[$i] = isset($object->hotspot_coordinates) ? $object->hotspot_coordinates : 0;
- Exclude checks
Variable "doubt_data" is not in valid camel caps format Open
$this->comment[$i] = $doubt_data->comment;
- Exclude checks
Variable "auto_id" is not in valid camel caps format Open
$auto_id = (int) $auto_id;
- Exclude checks
Variable "TBL_QUIZ" is not in valid camel caps format Open
$TBL_QUIZ = Database::get_course_table(TABLE_QUIZ_QUESTION);
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
$this->hotspot_coordinates[$i] = isset($object->hotspot_coordinates) ? $object->hotspot_coordinates : 0;
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
$this->hotspot_type[$i] = isset($object->hotspot_type) ? $object->hotspot_type : 0;
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
return isset($this->hotspot_coordinates[$id]) ? $this->hotspot_coordinates[$id] : null;
- Exclude checks
Variable "new_nbrAnswers" is not in valid camel caps format Open
$id = $this->new_nbrAnswers;
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
if (!empty($course_id)) {
- Exclude checks
Variable "new_answer" is not in valid camel caps format Open
$this->new_answer = [];
- Exclude checks
Variable "new_nbrAnswers" is not in valid camel caps format Open
$this->new_nbrAnswers = 0;
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
return isset($this->hotspot_type[$id]) ? $this->hotspot_type[$id] : null;
- Exclude checks
Variable "new_hotspot_type" is not in valid camel caps format Open
$this->new_hotspot_type[$id] = $new_hotspot_type;
- Exclude checks
Member variable "new_position" is not in valid camel caps format Open
public $new_position;
- Exclude checks
Member variable "new_hotspot_type" is not in valid camel caps format Open
public $new_hotspot_type;
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
$this->hotspot_type = [];
- Exclude checks
Variable "new_position" is not in valid camel caps format Open
$this->new_position[$id] = $position;
- Exclude checks
Variable "new_hotspot_coordinates" is not in valid camel caps format Open
$this->new_hotspot_coordinates[$id] = $new_hotspot_coordinates;
- Exclude checks
Variable "new_nbrAnswers" is not in valid camel caps format Open
for ($i = 1; $i <= $this->new_nbrAnswers; $i++) {
- Exclude checks
Variable "new_answer" is not in valid camel caps format Open
$answer = (string) $this->new_answer[$i];
- Exclude checks
Member variable "hotspot_coordinates" is not in valid camel caps format Open
public $hotspot_coordinates;
- Exclude checks
Member variable "new_nbrAnswers" is not in valid camel caps format Open
public $new_nbrAnswers;
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
$this->hotspot_type[$i] = isset($object->hotspot_type) ? $object->hotspot_type : 0;
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
return isset($this->hotspot_coordinates[$id]) ? $this->hotspot_coordinates[$id] : null;
- Exclude checks
Member variable "hotspot_type" is not in valid camel caps format Open
public $hotspot_type;
- Exclude checks
Variable "TBL_QUIZ" is not in valid camel caps format Open
$sql = "SELECT type FROM $TBL_QUIZ
- Exclude checks
Variable "doubt_data" is not in valid camel caps format Open
$this->destination[$i] = $doubt_data->destination;
- Exclude checks
Member variable "new_answer" is not in valid camel caps format Open
public $new_answer;
- Exclude checks
Variable "new_weighting" is not in valid camel caps format Open
$this->new_weighting = [];
- Exclude checks
Member variable "new_destination" is not in valid camel caps format Open
public $new_destination; // id of the next question if feedback option is set to Directfeedback
- Exclude checks
Variable "new_destination" is not in valid camel caps format Open
$this->new_destination = [];
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
$this->hotspot_type[$i] = $object->hotspot_type;
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
$this->hotspot_type[$i] = $object->hotspot_type;
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
$this->hotspot_type[$i] = isset($object->hotspot_type) ? $object->hotspot_type : 0;
- Exclude checks
Variable "doubt_data" is not in valid camel caps format Open
$this->answer[$i] = $doubt_data->answer;
- Exclude checks
Variable "doubt_data" is not in valid camel caps format Open
$this->weighting[$i] = $doubt_data->ponderation;
- Exclude checks
Variable "auto_id" is not in valid camel caps format Open
WHERE iid='$auto_id'";
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
public function __construct($questionId, $course_id = 0, $exercise = null, $readAnswer = true)
- Exclude checks
Variable "doubt_data" is not in valid camel caps format Open
$doubt_data = $object;
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
$this->hotspot_type[$i] = $object->hotspot_type;
- Exclude checks
Variable "doubt_data" is not in valid camel caps format Open
$this->correct[$i] = $doubt_data->correct;
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
'hotspot_coord' => $this->hotspot_coordinates[$i],
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$objExercise = new Exercise($this->course_id);
- Exclude checks
Variable "new_position" is not in valid camel caps format Open
$this->new_position = [];
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
$this->hotspot_coordinates[$i] = $object->hotspot_coordinates;
- Exclude checks
Variable "doubt_data" is not in valid camel caps format Open
$this->position[$i] = $doubt_data->position;
- Exclude checks
Variable "doubt_data" is not in valid camel caps format Open
$this->autoId[$i] = $doubt_data->iid;
- Exclude checks
Variable "auto_id" is not in valid camel caps format Open
$auto_id = (int) $auto_id;
- Exclude checks
Variable "new_comment" is not in valid camel caps format Open
$this->new_comment[$id] = $comment;
- Exclude checks
Variable "new_correct" is not in valid camel caps format Open
$correct = isset($this->new_correct[$i]) ? (int) $this->new_correct[$i] : null;
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
$this->hotspot_coordinates = $this->new_hotspot_coordinates;
- Exclude checks
Variable "new_position" is not in valid camel caps format Open
$position = isset($this->new_position[$i]) ? $this->new_position[$i] : null;
- Exclude checks
Variable "new_weighting" is not in valid camel caps format Open
$this->new_weighting[$i],
- Exclude checks
Variable "new_position" is not in valid camel caps format Open
$this->new_position[$i],
- Exclude checks
Variable "new_destination" is not in valid camel caps format Open
$this->destination = $this->new_destination;
- Exclude checks
Variable "new_correct" is not in valid camel caps format Open
$this->new_correct[$i],
- Exclude checks
Variable "new_correct" is not in valid camel caps format Open
foreach ($this->new_correct as $value => $status) {
- Exclude checks
Variable "new_correct" is not in valid camel caps format Open
foreach ($this->new_correct as $value => $status) {
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
$hotspot_coordinates = isset($this->new_hotspot_coordinates[$i]) ? $this->new_hotspot_coordinates[$i] : null;
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
'hotspot_coordinates' => $this->hotspot_coordinates[$i],
- Exclude checks
Doc comment for parameter $courseInfo does not match actual variable name $newQuestion Open
* @param null $courseInfo destination course info (result of the function api_get_course_info() )
- Exclude checks
Variable "new_position" is not in valid camel caps format Open
$position = isset($this->new_position[$i]) ? $this->new_position[$i] : null;
- Exclude checks
Variable "new_destination" is not in valid camel caps format Open
$destination = isset($this->new_destination[$i]) ? $this->new_destination[$i] : null;
- Exclude checks
Variable "new_destination" is not in valid camel caps format Open
$destination = isset($this->new_destination[$i]) ? $this->new_destination[$i] : null;
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
->setHotspotCoordinates($hotspot_coordinates)
- Exclude checks
Variable "new_destination" is not in valid camel caps format Open
$this->new_destination[$i],
- Exclude checks
Variable "new_nbrAnswers" is not in valid camel caps format Open
if (count($this->position) > $this->new_nbrAnswers) {
- Exclude checks
Variable "new_correct" is not in valid camel caps format Open
$this->correct = $this->new_correct;
- Exclude checks
Variable "new_comment" is not in valid camel caps format Open
$this->comment = $this->new_comment;
- Exclude checks
Variable "new_nbrAnswers" is not in valid camel caps format Open
$this->nbrAnswers = $this->new_nbrAnswers;
- Exclude checks
Variable "new_hotspot_type" is not in valid camel caps format Open
$hotspot_type = isset($this->new_hotspot_type[$i]) ? $this->new_hotspot_type[$i] : null;
- Exclude checks
Variable "new_weighting" is not in valid camel caps format Open
$weighting = isset($this->new_weighting[$i]) ? (float) $this->new_weighting[$i] : null;
- Exclude checks
Variable "new_nbrAnswers" is not in valid camel caps format Open
$i = $this->new_nbrAnswers + 1;
- Exclude checks
Variable "new_position" is not in valid camel caps format Open
$this->position = $this->new_position;
- Exclude checks
Variable "new_correct" is not in valid camel caps format Open
$correct = isset($this->new_correct[$i]) ? (int) $this->new_correct[$i] : null;
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
$hotspot_type = isset($this->new_hotspot_type[$i]) ? $this->new_hotspot_type[$i] : null;
- Exclude checks
Variable "new_hotspot_type" is not in valid camel caps format Open
$hotspot_type = isset($this->new_hotspot_type[$i]) ? $this->new_hotspot_type[$i] : null;
- Exclude checks
Variable "new_answer" is not in valid camel caps format Open
$this->new_answer[$i],
- Exclude checks
Variable "hotspot_coordinates" is not in valid camel caps format Open
->setHotspotCoordinates($this->hotspot_coordinates[$i])
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
->setHotspotType($this->hotspot_type[$i])
- Exclude checks
Variable "new_comment" is not in valid camel caps format Open
$comment = isset($this->new_comment[$i]) ? $this->new_comment[$i] : null;
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
$this->hotspot_type = $this->new_hotspot_type;
- Exclude checks
Variable "new_weighting" is not in valid camel caps format Open
$weighting = isset($this->new_weighting[$i]) ? (float) $this->new_weighting[$i] : null;
- Exclude checks
Variable "new_hotspot_coordinates" is not in valid camel caps format Open
$hotspot_coordinates = isset($this->new_hotspot_coordinates[$i]) ? $this->new_hotspot_coordinates[$i] : null;
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
->setHotspotType($hotspot_type)
- Exclude checks
Variable "new_hotspot_coordinates" is not in valid camel caps format Open
$this->hotspot_coordinates = $this->new_hotspot_coordinates;
- Exclude checks
Variable "new_hotspot_type" is not in valid camel caps format Open
$this->hotspot_type = $this->new_hotspot_type;
- Exclude checks
Variable "new_comment" is not in valid camel caps format Open
$this->new_comment[$i],
- Exclude checks
Variable "hotspot_type" is not in valid camel caps format Open
'hotspot_type' => $this->hotspot_type[$i],
- Exclude checks
Variable "new_hotspot_coordinates" is not in valid camel caps format Open
$hotspot_coordinates = isset($this->new_hotspot_coordinates[$i]) ? $this->new_hotspot_coordinates[$i] : null;
- Exclude checks
Variable "new_hotspot_coordinates" is not in valid camel caps format Open
$this->new_hotspot_coordinates[$i],
- Exclude checks
Variable "new_answer" is not in valid camel caps format Open
$this->answer = $this->new_answer;
- Exclude checks
Variable "new_comment" is not in valid camel caps format Open
$comment = isset($this->new_comment[$i]) ? $this->new_comment[$i] : null;
- Exclude checks
Variable "new_hotspot_type" is not in valid camel caps format Open
$this->new_hotspot_type[$i]
- Exclude checks
Variable "new_weighting" is not in valid camel caps format Open
$this->weighting = $this->new_weighting;
- Exclude checks
The variable $result_question is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $result_question is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $course_id is not named in camelCase. Open
public function __construct($questionId, $course_id = 0, $exercise = null, $readAnswer = true)
{
$this->questionId = (int) $questionId;
$this->answer = [];
$this->correct = [];
- 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 $TBL_ANSWER is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $TBL_QUIZ is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $doubt_data is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $course_id is not named in camelCase. Open
public function __construct($questionId, $course_id = 0, $exercise = null, $readAnswer = true)
{
$this->questionId = (int) $questionId;
$this->answer = [];
$this->correct = [];
- 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 $TBL_ANSWER is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $TBL_QUIZ is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $new_hotspot_coordinates is not named in camelCase. Open
public function createAnswer(
$answer,
$correct,
$comment,
$weighting,
- 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 $doubt_data is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $auto_id is not named in camelCase. Open
public function selectAnswerByAutoId($auto_id)
{
$table = Database::get_course_table(TABLE_QUIZ_ANSWER);
$auto_id = (int) $auto_id;
$sql = "SELECT iid, answer FROM $table
- 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 $auto_id is not named in camelCase. Open
public function selectAnswerByAutoId($auto_id)
{
$table = Database::get_course_table(TABLE_QUIZ_ANSWER);
$auto_id = (int) $auto_id;
$sql = "SELECT iid, answer FROM $table
- 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 $doubt_data is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $auto_id is not named in camelCase. Open
public function selectAnswerByAutoId($auto_id)
{
$table = Database::get_course_table(TABLE_QUIZ_ANSWER);
$auto_id = (int) $auto_id;
$sql = "SELECT iid, answer FROM $table
- 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 $new_hotspot_type is not named in camelCase. Open
public function createAnswer(
$answer,
$correct,
$comment,
$weighting,
- 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 $hotspot_coordinates is not named in camelCase. Open
public function save()
{
$answerTable = Database::get_course_table(TABLE_QUIZ_ANSWER);
$em = Database::getManager();
$questionId = (int) $this->questionId;
- 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 $doubt_data is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $doubt_data is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $doubt_data is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $doubt_data is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $hotspot_type is not named in camelCase. Open
public function save()
{
$answerTable = Database::get_course_table(TABLE_QUIZ_ANSWER);
$em = Database::getManager();
$questionId = (int) $this->questionId;
- 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 $doubt_data is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $doubt_data is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $doubt_data is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $doubt_data is not named in camelCase. Open
public function readOrderedBy($field, $order = 'ASC')
{
$field = Database::escape_string($field);
if (empty($field)) {
$field = 'position';
- 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 $hotspot_type is not named in camelCase. Open
public function save()
{
$answerTable = Database::get_course_table(TABLE_QUIZ_ANSWER);
$em = Database::getManager();
$questionId = (int) $this->questionId;
- 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 $hotspot_coordinates is not named in camelCase. Open
public function save()
{
$answerTable = Database::get_course_table(TABLE_QUIZ_ANSWER);
$em = Database::getManager();
$questionId = (int) $this->questionId;
- 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();
}
}