Missing class import via use statement (line '143', column '25'). Open
$thematic = new Thematic();
- 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 getContent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$class_tr = 'row_even';
}
- 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_course_information_data uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$tematic_advance_progress = '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 getContent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$data_table .= get_lang('There is no available information about your courses');
}
- 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_course_information_data uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$avg_time_spent_in_course = null;
}
- 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 local variables such as '$avg_progress_in_course'. Open
$nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 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 '$avg_score_in_course'. Open
$nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 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 '$avg_score_in_exercise'. Open
$nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 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
The parameter $user_id is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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 $user_id is not named in camelCase. Open
public function __construct($user_id)
{
$this->user_id = $user_id;
$this->path = 'block_course';
if ($this->is_block_visible_for_user($user_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
The property $user_id is not named in camelCase. Open
class BlockCourse extends Block
{
private $user_id;
private $courses;
private $permission = [DRH];
- 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
Variable "course_data" is not in valid camel caps format Open
$course_data = $this->get_course_information_data();
- Exclude checks
Variable "course_data" is not in valid camel caps format Open
foreach ($course_data as $course) {
- Exclude checks
Variable "class_tr" is not in valid camel caps format Open
$class_tr = 'row_even';
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
public function is_block_visible_for_user($user_id)
- Exclude checks
Variable "is_block_visible_for_user" is not in valid camel caps format Open
return $is_block_visible_for_user;
- Exclude checks
Variable "course_data" is not in valid camel caps format Open
if (!empty($course_data)) {
- Exclude checks
Variable "data_table" is not in valid camel caps format Open
$data_table .= '<td align="right">'.$cell.'</td>';
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$this->user_id = $user_id;
- Exclude checks
Variable "data_table" is not in valid camel caps format Open
$content .= $data_table;
- Exclude checks
Variable "is_block_visible_for_user" is not in valid camel caps format Open
$is_block_visible_for_user = false;
- Exclude checks
Variable "data_table" is not in valid camel caps format Open
$data_table .= '<tr class="'.$class_tr.'">';
- Exclude checks
Variable "course_data" is not in valid camel caps format Open
if (!empty($course_data)) {
- Exclude checks
Method name "BlockCourse::get_number_of_courses" is not in camel caps format Open
public function get_number_of_courses()
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$this->user_id = $user_id;
- Exclude checks
Variable "user_info" is not in valid camel caps format Open
$user_info = api_get_user_info($user_id);
- Exclude checks
Variable "user_status" is not in valid camel caps format Open
$user_status,
- Exclude checks
Method name "BlockCourse::get_block" is not in camel caps format Open
public function get_block()
- Exclude checks
Variable "data_table" is not in valid camel caps format Open
$data_table .= '<tr>
- Exclude checks
Variable "class_tr" is not in valid camel caps format Open
$class_tr = 'row_odd';
- Exclude checks
Variable "class_tr" is not in valid camel caps format Open
$data_table .= '<tr class="'.$class_tr.'">';
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$this->courses = CourseManager::get_courses_followed_by_drh($user_id);
- Exclude checks
Variable "user_info" is not in valid camel caps format Open
$user_status = $user_info['status'];
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
if (UserManager::is_admin($user_id) || in_array(
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 16 Open
$this->permission
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
public function __construct($user_id)
- Exclude checks
Variable "user_status" is not in valid camel caps format Open
$user_status = $user_info['status'];
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 12 Open
)
- Exclude checks
Variable "is_block_visible_for_user" is not in valid camel caps format Open
$is_block_visible_for_user = true;
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 16 Open
$user_status,
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_info = api_get_user_info($user_id);
- Exclude checks
Variable "row_course" is not in valid camel caps format Open
foreach ($courses as $row_course) {
- Exclude checks
Method name "BlockCourse::is_block_visible_for_user" is not in camel caps format Open
public function is_block_visible_for_user($user_id)
- Exclude checks
Variable "tbl_course_user" is not in valid camel caps format Open
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
- Exclude checks
Variable "course_data" is not in valid camel caps format Open
$course_data = [];
- Exclude checks
Variable "data_table" is not in valid camel caps format Open
$data_table = null;
- Exclude checks
Variable "data_table" is not in valid camel caps format Open
$data_table .= '</table>';
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
if ($this->is_block_visible_for_user($user_id)) {
- Exclude checks
Variable "data_table" is not in valid camel caps format Open
$data_table .= '<table class="data_table" width:"95%">';
- Exclude checks
Variable "data_table" is not in valid camel caps format Open
$data_table .= '</tr>';
- Exclude checks
Method name "BlockCourse::get_course_information_data" is not in camel caps format Open
public function get_course_information_data()
- Exclude checks
Variable "data_table" is not in valid camel caps format Open
$data_table .= get_lang('There is no available information about your courses');
- Exclude checks
Variable "avg_progress_in_course" is not in valid camel caps format Open
$nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 0;
- Exclude checks
Variable "tematic_advance" is not in valid camel caps format Open
if (!empty($tematic_advance)) {
- Exclude checks
Variable "tematic_advance_progress" is not in valid camel caps format Open
$tematic_advance_progress = '<a title="'.get_lang('GoToThematic advance').'" href="'.api_get_path(WEB_CODE_PATH).'course_progress/index.php?cidReq='.$course_code.'&action=thematic_details">'.$tematic_advance.'%</a>';
- Exclude checks
Variable "avg_time_spent_in_course" is not in valid camel caps format Open
$table_row[] = $avg_time_spent_in_course;
- Exclude checks
Variable "table_row" is not in valid camel caps format Open
$course_data[] = $table_row;
- Exclude checks
Variable "nb_students_in_course" is not in valid camel caps format Open
Tracking::get_time_spent_on_the_course($users, $courseId) / $nb_students_in_course
- Exclude checks
Variable "avg_time_spent_in_course" is not in valid camel caps format Open
$avg_time_spent_in_course = null;
- Exclude checks
Variable "tematic_advance_progress" is not in valid camel caps format Open
$tematic_advance_progress = '0%';
- Exclude checks
Variable "table_row" is not in valid camel caps format Open
$table_row = [];
- Exclude checks
Variable "table_row" is not in valid camel caps format Open
$table_row[] = $avg_time_spent_in_course;
- Exclude checks
Variable "tematic_advance_progress" is not in valid camel caps format Open
$table_row[] = $tematic_advance_progress;
- Exclude checks
Variable "nb_students_in_course" is not in valid camel caps format Open
$nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 0;
- Exclude checks
Variable "avg_time_spent_in_course" is not in valid camel caps format Open
$avg_time_spent_in_course = api_time_to_hms(
- Exclude checks
Variable "tematic_advance" is not in valid camel caps format Open
$tematic_advance_progress = '<a title="'.get_lang('GoToThematic advance').'" href="'.api_get_path(WEB_CODE_PATH).'course_progress/index.php?cidReq='.$course_code.'&action=thematic_details">'.$tematic_advance.'%</a>';
- Exclude checks
Variable "row_course" is not in valid camel caps format Open
$course_code = $row_course['code'];
- Exclude checks
Variable "course_code" is not in valid camel caps format Open
$tematic_advance_progress = '<a title="'.get_lang('GoToThematic advance').'" href="'.api_get_path(WEB_CODE_PATH).'course_progress/index.php?cidReq='.$course_code.'&action=thematic_details">'.$tematic_advance.'%</a>';
- Exclude checks
Variable "tematic_advance" is not in valid camel caps format Open
$tematic_advance = $thematic->get_total_average_of_thematic_advances(
- Exclude checks
Variable "table_row" is not in valid camel caps format Open
$table_row[] = $nb_students_in_course;
- Exclude checks
Variable "nb_students_in_course" is not in valid camel caps format Open
$table_row[] = $nb_students_in_course;
- Exclude checks
Variable "avg_time_spent_in_course" is not in valid camel caps format Open
$nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 0;
- Exclude checks
Variable "avg_score_in_course" is not in valid camel caps format Open
$nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 0;
- Exclude checks
Variable "tbl_course_user" is not in valid camel caps format Open
$sql = "SELECT user_id FROM $tbl_course_user as course_rel_user
- Exclude checks
Variable "course_code" is not in valid camel caps format Open
$course_code = $row_course['code'];
- Exclude checks
Variable "nb_students_in_course" is not in valid camel caps format Open
$nb_students_in_course = count($users);
- Exclude checks
Variable "row_course" is not in valid camel caps format Open
$table_row[] = $row_course['title'];
- Exclude checks
Variable "course_data" is not in valid camel caps format Open
$course_data[] = $table_row;
- Exclude checks
Variable "course_code" is not in valid camel caps format Open
$courseInfo = api_get_course_info($course_code);
- Exclude checks
Variable "table_row" is not in valid camel caps format Open
$table_row[] = $tematic_advance_progress;
- Exclude checks
Variable "course_data" is not in valid camel caps format Open
return $course_data;
- Exclude checks
Variable "avg_score_in_exercise" is not in valid camel caps format Open
$nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = $avg_score_in_exercise = 0;
- Exclude checks
Variable "table_row" is not in valid camel caps format Open
$table_row[] = $row_course['title'];
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 12 Open
)
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 16 Open
$this->permission
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 16 Open
$user_status,
- Exclude checks
The variable $is_block_visible_for_user is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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_data is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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_course is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $avg_time_spent_in_course is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $tematic_advance_progress is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $data_table is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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 $class_tr is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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_course is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $user_status is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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 $user_id is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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 $class_tr is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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 $table_row is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $data_table is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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 $data_table is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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 $tematic_advance is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $tematic_advance_progress is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $table_row is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $table_row is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $data_table is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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 $table_row is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $table_row is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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_data is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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_code is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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_code is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $avg_time_spent_in_course is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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_course_user is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $user_info is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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 $tematic_advance is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $tematic_advance is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $user_id is not named in camelCase. Open
public function __construct($user_id)
{
$this->user_id = $user_id;
$this->path = 'block_course';
if ($this->is_block_visible_for_user($user_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 $is_block_visible_for_user is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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_data is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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 $class_tr is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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_data is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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_course_user is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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_data is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $user_info is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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 $data_table is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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 $avg_progress_in_course is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $data_table is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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 $avg_time_spent_in_course is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $nb_students_in_course is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $avg_score_in_course is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $nb_students_in_course is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $user_id is not named in camelCase. Open
public function __construct($user_id)
{
$this->user_id = $user_id;
$this->path = 'block_course';
if ($this->is_block_visible_for_user($user_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 $user_status is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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 $tematic_advance_progress is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $avg_time_spent_in_course is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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_data is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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_data is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $avg_score_in_exercise is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $nb_students_in_course is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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_code is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $nb_students_in_course is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $table_row is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $user_id is not named in camelCase. Open
public function __construct($user_id)
{
$this->user_id = $user_id;
$this->path = 'block_course';
if ($this->is_block_visible_for_user($user_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 $is_block_visible_for_user is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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 $data_table is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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_course is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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 $user_id is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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 $data_table is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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 $data_table is not named in camelCase. Open
public function getContent()
{
$course_data = $this->get_course_information_data();
$content = '';
$data_table = null;
- 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_course_information_data is not named in camelCase. Open
public function get_course_information_data()
{
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$course_data = [];
$courses = $this->courses;
- 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() {
}
}
Source
The method is_block_visible_for_user is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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() {
}
}
Source
The method get_number_of_courses is not named in camelCase. Open
public function get_number_of_courses()
{
return count($this->courses);
}
- 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() {
}
}
Source
The method get_block is not named in camelCase. Open
public function get_block()
{
$column = 2;
$data = [];
$html = $this->getBlockCard(
- 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() {
}
}