Avoid using undefined variables such as '$score' which will lead to PHP notices. Open
$score[$key] = $row['total_score'];
- 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
The method process uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else { // course not visible for user
if ($search_show_unlinked_results) {
$result['url'] = '';
$results[] = $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 get_information uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return [];
}
- 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
FIXME found Open
$image = $thumbnail; //FIXME: use big images
- Exclude checks
The class quiz_processor is not named in CamelCase. Open
class quiz_processor extends search_processor
{
public $exercices = [];
public function __construct($rows)
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
The parameter $exercise_id is not named in camelCase. Open
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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
Variable "row_val" is not in valid camel caps format Open
$courseid = $row_val['courseid'];
- Exclude checks
Variable "row_id" is not in valid camel caps format Open
'row_id' => $row_id,
- Exclude checks
Missing function doc comment Open
public function process()
- Exclude checks
Variable "exercise_id" is not in valid camel caps format Open
foreach ($se_data['exercise_ids'] as $exercise_id) {
- Exclude checks
Variable "course_visible_for_user" is not in valid camel caps format Open
$course_visible_for_user = api_is_course_visible_for_user(null, $courseid);
- Exclude checks
Variable "dk_result" is not in valid camel caps format Open
$dk_result = $em
- Exclude checks
Variable "exercise_id" is not in valid camel caps format Open
'id' => $exercise_id,
- Exclude checks
Variable "exercise_id" is not in valid camel caps format Open
'ref' => $exercise_id,
- Exclude checks
Variable "item_result" is not in valid camel caps format Open
$author = UserManager::formatUserFullName($item_result->getInsertUser());
- Exclude checks
Variable "exercise_id" is not in valid camel caps format Open
$this->exercises[$courseid][$exercise_id]['total_score'] += $row_val['score'];
- Exclude checks
Variable "exercise_id" is not in valid camel caps format Open
$url = sprintf($url, $courseid, $exercise_id);
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
$se_data = $row_val['xapian_data'][SE_DATA];
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
switch ($row_val['xapian_data'][SE_DATA]['type']) {
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
'total_score' => $row_val['score'],
- Exclude checks
Variable "exercise_id" is not in valid camel caps format Open
list($thumbnail, $image, $name, $author) = $this->get_information($courseid, $exercise_id);
- Exclude checks
Variable "item_result" is not in valid camel caps format Open
$item_result = $em
- Exclude checks
Variable "se_data" is not in valid camel caps format Open
$exercise_id = $se_data['exercise_id'];
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
$this->exercises[$courseid][$exercise_id]['total_score'] += $row_val['score'];
- Exclude checks
Variable "course_information" is not in valid camel caps format Open
$course_information = api_get_course_info($courseCode);
- Exclude checks
Variable "exercise_id" is not in valid camel caps format Open
$this->exercises[$courseid][$exercise_id]['total_score'] += $row_val['score'];
- Exclude checks
Variable "se_data" is not in valid camel caps format Open
foreach ($se_data['exercise_ids'] as $exercise_id) {
- Exclude checks
Variable "exercise_id" is not in valid camel caps format Open
foreach ($exercises as $exercise_id => $exercise) {
- Exclude checks
Variable "search_show_unlinked_results" is not in valid camel caps format Open
if ($course_visible_for_user || $search_show_unlinked_results) {
- Exclude checks
Variable "course_information" is not in valid camel caps format Open
if (!empty($course_information)) {
- Exclude checks
Variable "exercise_id" is not in valid camel caps format Open
$visibility = api_get_item_visibility(api_get_course_info($courseid), TOOL_QUIZ, $exercise_id);
- Exclude checks
Variable "course_visible_for_user" is not in valid camel caps format Open
if ($course_visible_for_user) {
- Exclude checks
Variable "exercise_id" is not in valid camel caps format Open
private function get_information($courseCode, $exercise_id)
- Exclude checks
Variable "exercise_id" is not in valid camel caps format Open
$this->exercises[$courseid][$exercise_id] = $item;
- Exclude checks
Variable "exercise_id" is not in valid camel caps format Open
$this->exercises[$courseid][$exercise_id] = $item;
- Exclude checks
Variable "search_show_unlinked_results" is not in valid camel caps format Open
if ($search_show_unlinked_results) {
- Exclude checks
Method name "quiz_processor::get_information" is not in camel caps format Open
private function get_information($courseCode, $exercise_id)
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
'cId' => $course_id,
- Exclude checks
Missing function doc comment Open
public function __construct($rows)
- Exclude checks
Variable "row_id" is not in valid camel caps format Open
'row_id' => $row_id,
- Exclude checks
Variable "search_show_unlinked_results" is not in valid camel caps format Open
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- Exclude checks
Variable "item_result" is not in valid camel caps format Open
if ($item_result) {
- Exclude checks
Variable "row_id" is not in valid camel caps format Open
foreach ($rows as $row_id => $row_val) {
- Exclude checks
Variable "se_data" is not in valid camel caps format Open
$question = $se_data['question_id'];
- Exclude checks
Variable "course_information" is not in valid camel caps format Open
$course_id = $course_information['real_id'];
- Exclude checks
Variable "exercise_id" is not in valid camel caps format Open
$exercise_id = intval($exercise_id);
- Exclude checks
Variable "se_data" is not in valid camel caps format Open
if (is_array($se_data['exercise_ids'])) {
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
'course' => $course_id,
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
foreach ($rows as $row_id => $row_val) {
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
'total_score' => $row_val['score'],
- Exclude checks
Variable "se_data" is not in valid camel caps format Open
$se_data = $row_val['xapian_data'][SE_DATA];
- Exclude checks
Variable "exercise_id" is not in valid camel caps format Open
$exercise_id = $se_data['exercise_id'];
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
$this->exercises[$courseid][$exercise_id]['total_score'] += $row_val['score'];
- Exclude checks
Variable "course_visible_for_user" is not in valid camel caps format Open
if ($course_visible_for_user || $search_show_unlinked_results) {
- Exclude checks
Variable "dk_result" is not in valid camel caps format Open
if ($dk_result) {
- Exclude checks
Variable "dk_result" is not in valid camel caps format Open
$name = $dk_result->getTitle();
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$course_id = $course_information['real_id'];
- Exclude checks
Variable "exercise_id" is not in valid camel caps format Open
$exercise_id = intval($exercise_id);
- Exclude checks
Class name "quiz_processor" is not in camel caps format Open
class quiz_processor extends search_processor
- Exclude checks
The variable $row_id is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $item_result is not named in camelCase. Open
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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 $se_data is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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 $exercise_id is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->exercises as $courseid => $exercises) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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 $search_show_unlinked_results is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->exercises as $courseid => $exercises) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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_information is not named in camelCase. Open
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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 $row_val is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $row_val is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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_information is not named in camelCase. Open
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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 $row_val is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $se_data is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $exercise_id is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->exercises as $courseid => $exercises) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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 $se_data is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $se_data is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $exercise_id is not named in camelCase. Open
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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 $row_val is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $exercise_id is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->exercises as $courseid => $exercises) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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_information is not named in camelCase. Open
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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 $dk_result is not named in camelCase. Open
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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 $row_id is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $exercise_id is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $dk_result is not named in camelCase. Open
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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 $exercise_id is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $exercise_id is not named in camelCase. Open
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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 $item_result is not named in camelCase. Open
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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 $row_val is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $exercise_id is not named in camelCase. Open
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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 $exercise_id is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $exercise_id is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $row_id is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $search_show_unlinked_results is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->exercises as $courseid => $exercises) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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 $exercise_id is not named in camelCase. Open
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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 $exercise_id is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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_visible_for_user is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->exercises as $courseid => $exercises) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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 $item_result is not named in camelCase. Open
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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_visible_for_user is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->exercises as $courseid => $exercises) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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 $row_val is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $search_show_unlinked_results is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->exercises as $courseid => $exercises) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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_visible_for_user is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->exercises as $courseid => $exercises) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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 $dk_result is not named in camelCase. Open
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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 $row_val is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $exercise_id is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $row_val is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $se_data is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group by exercise
foreach ($rows as $row_id => $row_val) {
- 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 $exercise_id is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->exercises as $courseid => $exercises) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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 get_information is not named in camelCase. Open
private function get_information($courseCode, $exercise_id)
{
$course_information = api_get_course_info($courseCode);
$course_id = $course_information['real_id'];
- 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() {
}
}