Avoid unused local variables such as '$key'. Open
foreach ($courses as $key => $course) {
- 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 '$value'. Open
foreach ($user_courses as $key => $value) {
- 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 method run uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$result = $this->action_display();
}
- 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 run uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
echo '<div>';
}
- 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 retrieve_courses uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$course_fiter = 'visibility = '.COURSE_VISIBILITY_OPEN_WORLD.' OR ';
$course_fiter .= 'visibility = '.COURSE_VISIBILITY_OPEN_PLATFORM.' OR ';
$course_fiter .= '(visibility = '.COURSE_VISIBILITY_REGISTERED.' AND subscribe = 1)';
}
- 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 parameter $user_courses is not named in camelCase. Open
public function display_subscribe_icon($current_course, $user_courses)
{
global $stok;
//Already subscribed
- 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 $search_term is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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 retrieve_user_courses($user_id = null)
{
if (null === $user_id) {
global $_user;
$user_id = $_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 parameter $current_course is not named in camelCase. Open
public function display_subscribe_icon($current_course, $user_courses)
{
global $stok;
//Already subscribed
- 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
Missing function doc comment Open
public function accept()
- Exclude checks
Variable "display_teacher" is not in valid camel caps format Open
if ($display_teacher) {
- Exclude checks
Variable "index_url" is not in valid camel caps format Open
return $url == $index_url || $url == $root;
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
$search_term = self::post('search_term');
- Exclude checks
Missing function doc comment Open
public function display_footer()
- Exclude checks
Missing function doc comment Open
public static function server($key, $default = '')
- Exclude checks
Variable "index_url" is not in valid camel caps format Open
return $url == $index_url || $url == $root;
- Exclude checks
Variable "has_content" is not in valid camel caps format Open
if ($has_content) {
- Exclude checks
Variable "search_course_label" is not in valid camel caps format Open
$search_course_label = self::get_lang('Search courses');
- Exclude checks
Method name "SearchCourseWidget::get_url" is not in camel caps format Open
public function get_url($action = '')
- Exclude checks
Variable "user_courses" is not in valid camel caps format Open
$this->display_subscribe_icon($course, $user_courses);
- Exclude checks
Variable "search_term_html" is not in valid camel caps format Open
echo "<h5>$search_result_for_label $search_term_html</h5>";
- Exclude checks
Variable "search_label" is not in valid camel caps format Open
<input class="btn btn--plain" type="submit" value="$search_label" />
- Exclude checks
Variable "has_content" is not in valid camel caps format Open
$has_content = !empty($search_term) || !empty($action);
- Exclude checks
Method name "SearchCourseWidget::action_display" is not in camel caps format Open
public function action_display()
- Exclude checks
Missing function doc comment Open
public function display_header()
- Exclude checks
Variable "display_teacher" is not in valid camel caps format Open
$display_teacher = 'true' == api_get_setting('display_teacher_in_courselist');
- Exclude checks
Method name "SearchCourseWidget::get_lang" is not in camel caps format Open
public static function get_lang($name)
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
if ($search_term) {
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
<input type="text" name="search_term" class="span2" value="$search_term" />
- Exclude checks
Missing function doc comment Open
public static function get_lang($name)
- Exclude checks
Variable "search_term_html" is not in valid camel caps format Open
$search_term_html = htmlentities($search_term, ENT_QUOTES, $charset);
- Exclude checks
Method name "SearchCourseWidget::display_header" is not in camel caps format Open
public function display_header()
- Exclude checks
Variable "search_label" is not in valid camel caps format Open
$search_label = self::get_lang('_search');
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
$search_term = self::post('search_term');
- Exclude checks
Variable "user_courses" is not in valid camel caps format Open
if (isset($user_courses[$code])) {
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
if ($search_term) {
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id = (int) $user_id;
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id = $_user['user_id'];
- Exclude checks
Missing function doc comment Open
public function get_url($action = '')
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
$search_term_html = htmlentities($search_term, ENT_QUOTES, $charset);
- Exclude checks
Variable "user_courses" is not in valid camel caps format Open
$user_courses = $this->retrieve_user_courses();
- Exclude checks
Variable "course_table" is not in valid camel caps format Open
$course_table = Database::get_main_table(TABLE_MAIN_COURSE);
- Exclude checks
Variable "course_fiter" is not in valid camel caps format Open
$course_fiter = 'visibility = '.COURSE_VISIBILITY_OPEN_WORLD;
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
WHERE ($course_fiter) AND (code LIKE '%$search_term%' OR visual_code LIKE '%$search_term%' OR title LIKE '%$search_term%' OR tutor_name LIKE '%$search_term%')
- Exclude checks
Variable "search_course_label" is not in valid camel caps format Open
<h4>$search_course_label</h4>
- Exclude checks
Method name "SearchCourseWidget::display_subscribe_icon" is not in camel caps format Open
public function display_subscribe_icon($current_course, $user_courses)
- Exclude checks
Variable "current_course" is not in valid camel caps format Open
if (SUBSCRIBE_ALLOWED != $current_course['subscribe']) {
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
$search_term = Database::escape_string($search_term);
- Exclude checks
Variable "course_table" is not in valid camel caps format Open
SELECT * FROM $course_table
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
<input type="hidden" name="search_term" value="$search_term" />
- Exclude checks
Variable "user_course_table" is not in valid camel caps format Open
FROM $course_table course, $user_course_table course_rel_user
- Exclude checks
Variable "user_courses" is not in valid camel caps format Open
foreach ($user_courses as $key => $value) {
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
public function retrieve_courses($search_term)
- Exclude checks
Variable "course_table" is not in valid camel caps format Open
$course_table = Database::get_main_table(TABLE_MAIN_COURSE);
- Exclude checks
Method name "SearchCourseWidget::is_homepage" is not in camel caps format Open
public function is_homepage()
- Exclude checks
Variable "index_url" is not in valid camel caps format Open
$index_url = $root.'index.php';
- Exclude checks
Variable "index_url" is not in valid camel caps format Open
$index_url = $root.'user_portal.php';
- Exclude checks
Variable "search_result_for_label" is not in valid camel caps format Open
$search_result_for_label = self::get_lang('Search results for:');
- Exclude checks
Variable "display_coursecode" is not in valid camel caps format Open
$display_coursecode = 'true' == api_get_setting('display_coursecode_in_courselist');
- Exclude checks
Variable "course_fiter" is not in valid camel caps format Open
$course_fiter .= 'visibility = '.COURSE_VISIBILITY_OPEN_PLATFORM.' OR ';
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id = $_user['user_id'];
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
AND course_rel_user.user_id = $user_id
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
$has_content = !empty($search_term) || !empty($action);
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
$search_term = self::post('search_term');
- Exclude checks
Variable "search_result_for_label" is not in valid camel caps format Open
echo "<h5>$search_result_for_label $search_term_html</h5>";
- Exclude checks
Method name "SearchCourseWidget::display_footer" is not in camel caps format Open
public function display_footer()
- Exclude checks
Variable "display_coursecode" is not in valid camel caps format Open
if ($display_coursecode) {
- Exclude checks
Variable "course_fiter" is not in valid camel caps format Open
$course_fiter = 'visibility = '.COURSE_VISIBILITY_OPEN_WORLD.' OR ';
- Exclude checks
Variable "course_table" is not in valid camel caps format Open
FROM $course_table course, $user_course_table course_rel_user
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
$search_term = $this->post('search_term');
- Exclude checks
Method name "SearchCourseWidget::retrieve_user_courses" is not in camel caps format Open
public function retrieve_user_courses($user_id = null)
- Exclude checks
Variable "sql_select_courses" is not in valid camel caps format Open
$sql_select_courses = "SELECT course.code k, course.visual_code vc, course.subscribe subscr, course.unsubscribe unsubscr,
- Exclude checks
Method name "SearchCourseWidget::is_user_portal" is not in camel caps format Open
public function is_user_portal()
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
$courses = $this->retrieve_courses($search_term);
- Exclude checks
Method name "SearchCourseWidget::display_form" is not in camel caps format Open
public function display_form()
- Exclude checks
Method name "SearchCourseWidget::display_list" is not in camel caps format Open
public function display_list($courses)
- Exclude checks
Method name "SearchCourseWidget::filter_out_user_courses" is not in camel caps format Open
public function filter_out_user_courses($courses)
- Exclude checks
Variable "user_courses" is not in valid camel caps format Open
$user_courses = $this->retrieve_user_courses($user_id);
- Exclude checks
Variable "current_course" is not in valid camel caps format Open
public function display_subscribe_icon($current_course, $user_courses)
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_courses = $this->retrieve_user_courses($user_id);
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
$search_term = Security::remove_XSS($search_term);
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
$search_term = Database::escape_string($search_term);
- Exclude checks
Variable "user_course_table" is not in valid camel caps format Open
$user_course_table = Database::get_main_table(TABLE_MAIN_COURSE_USER);
- Exclude checks
Variable "user_courses" is not in valid camel caps format Open
public function display_subscribe_icon($current_course, $user_courses)
- Exclude checks
Variable "course_fiter" is not in valid camel caps format Open
WHERE ($course_fiter) AND (code LIKE '%$search_term%' OR visual_code LIKE '%$search_term%' OR title LIKE '%$search_term%' OR tutor_name LIKE '%$search_term%')
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
WHERE ($course_fiter) AND (code LIKE '%$search_term%' OR visual_code LIKE '%$search_term%' OR title LIKE '%$search_term%' OR tutor_name LIKE '%$search_term%')
- Exclude checks
Method name "SearchCourseWidget::retrieve_courses" is not in camel caps format Open
public function retrieve_courses($search_term)
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
public function retrieve_user_courses($user_id = null)
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
if (null === $user_id) {
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id = (int) $user_id;
- Exclude checks
Variable "current_course" is not in valid camel caps format Open
$code = $current_course['code'];
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
$search_term = Security::remove_XSS($search_term);
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
if (empty($search_term)) {
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
WHERE ($course_fiter) AND (code LIKE '%$search_term%' OR visual_code LIKE '%$search_term%' OR title LIKE '%$search_term%' OR tutor_name LIKE '%$search_term%')
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
WHERE ($course_fiter) AND (code LIKE '%$search_term%' OR visual_code LIKE '%$search_term%' OR title LIKE '%$search_term%' OR tutor_name LIKE '%$search_term%')
- Exclude checks
Variable "sql_select_courses" is not in valid camel caps format Open
$resultset = Database::query($sql_select_courses);
- Exclude checks
Variable "course_fiter" is not in valid camel caps format Open
$course_fiter .= '(visibility = '.COURSE_VISIBILITY_REGISTERED.' AND subscribe = 1)';
- Exclude checks
The variable $index_url is not named in camelCase. Open
public function is_homepage()
{
$url = self::server('REQUEST_URI');
$url = explode('?', $url);
$url = reset($url);
- 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 $index_url is not named in camelCase. Open
public function is_user_portal()
{
$url = self::server('REQUEST_URI');
$url = explode('?', $url);
$url = reset($url);
- 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_term is not named in camelCase. Open
public function action_display()
{
global $charset;
$search_term = self::post('search_term');
- 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 $current_course is not named in camelCase. Open
public function display_subscribe_icon($current_course, $user_courses)
{
global $stok;
//Already subscribed
- 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_term is not named in camelCase. Open
public function display_subscribe_icon($current_course, $user_courses)
{
global $stok;
//Already subscribed
- 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_table is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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 is not named in camelCase. Open
public function retrieve_user_courses($user_id = null)
{
if (null === $user_id) {
global $_user;
$user_id = $_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 $search_term is not named in camelCase. Open
public function run()
{
if (!$this->accept()) {
return;
}
- 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_term is not named in camelCase. Open
public function action_display()
{
global $charset;
$search_term = self::post('search_term');
- 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_course_label is not named in camelCase. Open
public function display_header()
{
$search_course_label = self::get_lang('Search courses');
echo <<<EOT
<div class="well course_search">
- 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 $display_coursecode is not named in camelCase. Open
public function display_list($courses)
{
if (empty($courses)) {
return 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_course_table is not named in camelCase. Open
public function retrieve_user_courses($user_id = null)
{
if (null === $user_id) {
global $_user;
$user_id = $_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 $display_teacher is not named in camelCase. Open
public function display_list($courses)
{
if (empty($courses)) {
return 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 $search_result_for_label is not named in camelCase. Open
public function action_display()
{
global $charset;
$search_term = self::post('search_term');
- 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_courses is not named in camelCase. Open
public function display_subscribe_icon($current_course, $user_courses)
{
global $stok;
//Already subscribed
- 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_fiter is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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 retrieve_user_courses($user_id = null)
{
if (null === $user_id) {
global $_user;
$user_id = $_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 $search_term is not named in camelCase. Open
public function display_subscribe_icon($current_course, $user_courses)
{
global $stok;
//Already subscribed
- 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 retrieve_user_courses($user_id = null)
{
if (null === $user_id) {
global $_user;
$user_id = $_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 is not named in camelCase. Open
public function retrieve_user_courses($user_id = null)
{
if (null === $user_id) {
global $_user;
$user_id = $_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 $sql_select_courses is not named in camelCase. Open
public function retrieve_user_courses($user_id = null)
{
if (null === $user_id) {
global $_user;
$user_id = $_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 $search_result_for_label is not named in camelCase. Open
public function action_display()
{
global $charset;
$search_term = self::post('search_term');
- 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_label is not named in camelCase. Open
public function display_form()
{
global $stok;
$search_label = self::get_lang('_search');
$self = api_get_self();
- 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_term is not named in camelCase. Open
public function display_form()
{
global $stok;
$search_label = self::get_lang('_search');
$self = api_get_self();
- 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_courses is not named in camelCase. Open
public function display_list($courses)
{
if (empty($courses)) {
return 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 $search_term is not named in camelCase. Open
public function display_subscribe_icon($current_course, $user_courses)
{
global $stok;
//Already subscribed
- 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_term is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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 $has_content is not named in camelCase. Open
public function run()
{
if (!$this->accept()) {
return;
}
- 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_term is not named in camelCase. Open
public function action_display()
{
global $charset;
$search_term = self::post('search_term');
- 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_term is not named in camelCase. Open
public function display_subscribe_icon($current_course, $user_courses)
{
global $stok;
//Already subscribed
- 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 retrieve_user_courses($user_id = null)
{
if (null === $user_id) {
global $_user;
$user_id = $_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_id is not named in camelCase. Open
public function retrieve_user_courses($user_id = null)
{
if (null === $user_id) {
global $_user;
$user_id = $_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 $index_url is not named in camelCase. Open
public function is_homepage()
{
$url = self::server('REQUEST_URI');
$url = explode('?', $url);
$url = reset($url);
- 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_term is not named in camelCase. Open
public function display_form()
{
global $stok;
$search_label = self::get_lang('_search');
$self = api_get_self();
- 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 $display_coursecode is not named in camelCase. Open
public function display_list($courses)
{
if (empty($courses)) {
return 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_table is not named in camelCase. Open
public function retrieve_user_courses($user_id = null)
{
if (null === $user_id) {
global $_user;
$user_id = $_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 is not named in camelCase. Open
public function filter_out_user_courses($courses)
{
if (empty($courses)) {
return $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 $has_content is not named in camelCase. Open
public function run()
{
if (!$this->accept()) {
return;
}
- 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_term_html is not named in camelCase. Open
public function action_display()
{
global $charset;
$search_term = self::post('search_term');
- 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_term is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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_courses is not named in camelCase. Open
public function display_list($courses)
{
if (empty($courses)) {
return 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_fiter is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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_fiter is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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_term is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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_course_table is not named in camelCase. Open
public function retrieve_user_courses($user_id = null)
{
if (null === $user_id) {
global $_user;
$user_id = $_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 $search_term is not named in camelCase. Open
public function run()
{
if (!$this->accept()) {
return;
}
- 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_term is not named in camelCase. Open
public function action_display()
{
global $charset;
$search_term = self::post('search_term');
- 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 is not named in camelCase. Open
public function filter_out_user_courses($courses)
{
if (empty($courses)) {
return $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_courses is not named in camelCase. Open
public function filter_out_user_courses($courses)
{
if (empty($courses)) {
return $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 $search_term_html is not named in camelCase. Open
public function action_display()
{
global $charset;
$search_term = self::post('search_term');
- 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_course_label is not named in camelCase. Open
public function display_header()
{
$search_course_label = self::get_lang('Search courses');
echo <<<EOT
<div class="well course_search">
- 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 $display_teacher is not named in camelCase. Open
public function display_list($courses)
{
if (empty($courses)) {
return 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 $current_course is not named in camelCase. Open
public function display_subscribe_icon($current_course, $user_courses)
{
global $stok;
//Already subscribed
- 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_term is not named in camelCase. Open
public function display_subscribe_icon($current_course, $user_courses)
{
global $stok;
//Already subscribed
- 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_term is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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_table is not named in camelCase. Open
public function retrieve_user_courses($user_id = null)
{
if (null === $user_id) {
global $_user;
$user_id = $_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_courses is not named in camelCase. Open
public function filter_out_user_courses($courses)
{
if (empty($courses)) {
return $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 $search_label is not named in camelCase. Open
public function display_form()
{
global $stok;
$search_label = self::get_lang('_search');
$self = api_get_self();
- 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_fiter is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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_term is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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 filter_out_user_courses($courses)
{
if (empty($courses)) {
return $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 $index_url is not named in camelCase. Open
public function is_user_portal()
{
$url = self::server('REQUEST_URI');
$url = explode('?', $url);
$url = reset($url);
- 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_term is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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_term is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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_fiter is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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_table is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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 $sql_select_courses is not named in camelCase. Open
public function retrieve_user_courses($user_id = null)
{
if (null === $user_id) {
global $_user;
$user_id = $_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_id is not named in camelCase. Open
public function retrieve_user_courses($user_id = null)
{
if (null === $user_id) {
global $_user;
$user_id = $_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_id is not named in camelCase. Open
public function filter_out_user_courses($courses)
{
if (empty($courses)) {
return $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 method display_list is not named in camelCase. Open
public function display_list($courses)
{
if (empty($courses)) {
return 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 retrieve_courses is not named in camelCase. Open
public function retrieve_courses($search_term)
{
if (empty($search_term)) {
return [];
}
- 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 display_form is not named in camelCase. Open
public function display_form()
{
global $stok;
$search_label = self::get_lang('_search');
$self = api_get_self();
- 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 action_display is not named in camelCase. Open
public function action_display()
{
global $charset;
$search_term = self::post('search_term');
- 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 display_footer is not named in camelCase. Open
public function display_footer()
{
echo '</div></div>';
}
- 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 display_subscribe_icon is not named in camelCase. Open
public function display_subscribe_icon($current_course, $user_courses)
{
global $stok;
//Already subscribed
- 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_homepage is not named in camelCase. Open
public function is_homepage()
{
$url = self::server('REQUEST_URI');
$url = explode('?', $url);
$url = reset($url);
- 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 retrieve_user_courses is not named in camelCase. Open
public function retrieve_user_courses($user_id = null)
{
if (null === $user_id) {
global $_user;
$user_id = $_user['user_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() {
}
}
Source
The method is_user_portal is not named in camelCase. Open
public function is_user_portal()
{
$url = self::server('REQUEST_URI');
$url = explode('?', $url);
$url = reset($url);
- 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_url is not named in camelCase. Open
public function get_url($action = '')
{
$self = $_SERVER['PHP_SELF'];
$parameters = [];
if ($action) {
- 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 filter_out_user_courses is not named in camelCase. Open
public function filter_out_user_courses($courses)
{
if (empty($courses)) {
return $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_lang is not named in camelCase. Open
public static function get_lang($name)
{
return SearchCoursePlugin::create()->get_lang($name);
}
- 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 display_header is not named in camelCase. Open
public function display_header()
{
$search_course_label = self::get_lang('Search courses');
echo <<<EOT
<div class="well course_search">
- 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() {
}
}