The method getFormattedSessionsBlock() has an NPath complexity of 769. The configured NPath complexity threshold is 200. Open
public static function getFormattedSessionsBlock(array $sessions)
{
$extraFieldValue = new ExtraFieldValue('session');
$userId = api_get_user_id();
$sessionsBlocks = [];
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method searchCourses() has an NPath complexity of 288. The configured NPath complexity threshold is 200. Open
public static function searchCourses($categoryCode, $keyword, $limit, $justVisible = false, $conditions = [])
{
$courseTable = Database::get_main_table(TABLE_MAIN_COURSE);
$limitFilter = self::getLimitFilterFromArray($limit);
$avoidCoursesCondition = self::getAvoidCourseCondition();
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method searchAndSortCourses() has an NPath complexity of 3915. The configured NPath complexity threshold is 200. Open
public static function searchAndSortCourses(
$categoryCode,
$keyword,
$limit,
$justVisible = false,
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method getCatalogUrl() has an NPath complexity of 5760. The configured NPath complexity threshold is 200. Open
public static function getCatalogUrl(
$pageCurrent,
$pageLength,
$categoryCode = null,
$action = null,
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The class CoursesAndSessionsCatalog has a coupling between objects value of 21. Consider to reduce the number of dependencies under 13. Open
class CoursesAndSessionsCatalog
{
public const PAGE_LENGTH = 12;
/**
- Read upRead up
- Exclude checks
CouplingBetweenObjects
Since: 1.1.0
A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability
Example
class Foo {
/**
* @var \foo\bar\X
*/
private $x = null;
/**
* @var \foo\bar\Y
*/
private $y = null;
/**
* @var \foo\bar\Z
*/
private $z = null;
public function setFoo(\Foo $foo) {}
public function setBar(\Bar $bar) {}
public function setBaz(\Baz $baz) {}
/**
* @return \SplObjectStorage
* @throws \OutOfRangeException
* @throws \InvalidArgumentException
* @throws \ErrorException
*/
public function process(\Iterator $it) {}
// ...
}
Source https://phpmd.org/rules/design.html#couplingbetweenobjects
Missing class import via use statement (line '804', column '27'). Open
$extraField = new \ExtraField('session');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '1390', column '20'). Open
$tpl = new Template();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '1524', column '20'). Open
$tpl = new Template();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '1565', column '32'). Open
$extraFieldValue = new ExtraFieldValue('session');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '1429', column '20'). Open
$tpl = new Template();
- 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 return_teacher uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$html .= '<a href="'.$value['url'].'" class="ajax" data-title="'.$name.'" title="'.$name.'">
<img src="'.$value['avatar'].'" title="'.$name.'" alt="'.get_lang('UserPicture').'"/></a>';
$html .= '<div class="teachers-details"><h5>
<a href="'.$value['url'].'" class="ajax" data-title="'.$name.'">'
- 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 getCoursesInCategory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$limitFilter = self::getLimitFilterFromArray($limit);
$categoryCode = Database::escape_string($categoryCode);
$listCode = self::childrenCategories($categoryCode);
$conditionCode = ' ';
- 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 searchCourses uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$categoryFilter = ' AND category_code = "'.$categoryCode.'" ';
}
- 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 getCoursesInCategory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sql = "SELECT *, id as real_id FROM $tbl_course course
WHERE
$conditionCode
$avoidCoursesCondition
- 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 return_teacher uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
foreach ($teachers as $value) {
$name = $value['firstname'].' '.$value['lastname'];
if ($length > 2) {
$html .= '<a href="'.$value['url'].'" class="ajax" data-title="'.$name.'" title="'.$name.'">
- 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 getFormattedSessionsBlock uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$catName = $cat->getTitle();
}
- 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 getCoursesInCategory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$id_in = "$id";
}
- 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 getCoursesInCategory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sql = "SELECT *, course.id real_id FROM $tbl_course as course
INNER JOIN $tbl_url_rel_course as url_rel_course
ON (url_rel_course.c_id = course.id)
WHERE
- 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 getCoursesInCategory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sql = "SELECT id, id as real_id
FROM $tbl_course course
WHERE
RAND()*$num_records< $randomValue
- 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 getCatalogPagination uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$pageItemAttributes = [];
}
- 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 getCoursesInCategory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$conditionCode .= " category_code='$categoryCode' ";
}
- 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 getCoursesInCategory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
foreach ($listCode as $code) {
$conditionCode .= " category_code='$code' OR ";
}
$conditionCode .= " category_code='$categoryCode' ";
- 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 getRegisteredInSessionButton uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$url .= 'inc/email_editor.php?';
$url .= http_build_query([
'action' => 'subscribe_me_to_session',
'session' => Security::remove_XSS($sessionName),
- 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 '$urlCondition'. Open
$urlCondition = ' access_url_id = '.$urlId.' AND';
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused parameters such as '$course'. Open
public static function returnThumbnail($course)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
The parameter $search_term is not named in camelCase. Open
public static function return_register_button($course, $stok, $categoryCode, $search_term)
{
$title = get_lang('Subscribe');
$action = 'subscribe_course';
if (!empty($course['registration_code'])) {
- 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 static function return_unregister_button($course, $stok, $search_term, $categoryCode, $sessionId = 0)
{
$title = get_lang('Unsubscription');
$search_term = Security::remove_XSS($search_term);
$categoryCode = Security::remove_XSS($categoryCode);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Variable "tbl_course" is not in valid camel caps format Open
$sql = "SELECT COUNT(*) FROM $tbl_course";
- Exclude checks
Variable "num_records" is not in valid camel caps format Open
RAND()*$num_records< $randomValue
- Exclude checks
Variable "id_in" is not in valid camel caps format Open
$sql = "SELECT *, id as real_id FROM $tbl_course WHERE id IN($id_in)";
- Exclude checks
Missing parameter name Open
* @param $search_term
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
'avatar' => UserManager::getUserPicture($coach->getId(), USER_IMAGE_SIZE_SMALL),
- Exclude checks
Variable "TABLE_COURSE_FIELD" is not in valid camel caps format Open
$TABLE_COURSE_FIELD = Database::get_main_table(TABLE_EXTRA_FIELD);
- Exclude checks
Missing function doc comment Open
public static function getCourseCategoriesTree()
- Exclude checks
Variable "num_records" is not in valid camel caps format Open
list($num_records) = Database::fetch_row($result);
- Exclude checks
Variable "tbl_url_rel_course" is not in valid camel caps format Open
$tbl_url_rel_course = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
- Exclude checks
Variable "tbl_course" is not in valid camel caps format Open
FROM $tbl_course course
- Exclude checks
Variable "tbl_course" is not in valid camel caps format Open
$sql = "SELECT *, course.id real_id FROM $tbl_course as course
- Exclude checks
Expected 6 spaces after parameter type; 2 found Open
* @param array $sortKeys
- Exclude checks
Variable "TABLE_COURSE_FIELD_VALUE" is not in valid camel caps format Open
$sql = "SELECT item_id FROM $TABLE_COURSE_FIELD_VALUE tcfv
- Exclude checks
Variable "num_records" is not in valid camel caps format Open
RAND()*$num_records< $randomValue
- Exclude checks
Variable "tbl_url_rel_course" is not in valid camel caps format Open
INNER JOIN $tbl_url_rel_course as url_rel_course
- Exclude checks
Method name "CoursesAndSessionsCatalog::return_already_registered_label" is not in camel caps format Open
public static function return_already_registered_label($status)
- Exclude checks
Method name "CoursesAndSessionsCatalog::return_register_button" is not in camel caps format Open
public static function return_register_button($course, $stok, $categoryCode, $search_term)
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
'&course_code='.$course['code'].'&search_term='.$search_term.'&category_code='.$categoryCode,
- Exclude checks
Method name "CoursesAndSessionsCatalog::return_unregister_button" is not in camel caps format Open
public static function return_unregister_button($course, $stok, $search_term, $categoryCode, $sessionId = 0)
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
'id' => $coach->getId(),
- Exclude checks
Variable "tbl_url_rel_course" is not in valid camel caps format Open
INNER JOIN $tbl_url_rel_course as url_rel_course
- Exclude checks
Variable "id_in" is not in valid camel caps format Open
if (null === $id_in) {
- Exclude checks
Method name "CoursesAndSessionsCatalog::return_teacher" is not in camel caps format Open
public static function return_teacher($courseInfo)
- Exclude checks
Variable "tbl_course" is not in valid camel caps format Open
FROM $tbl_course course
- Exclude checks
Expected 5 spaces after parameter type; 1 found Open
* @param string $action
- Exclude checks
Variable "count_users" is not in valid camel caps format Open
'count_users' => $count_users,
- Exclude checks
Missing parameter name Open
* @param $stok
- Exclude checks
Missing function doc comment Open
public static function getCatalogSearchSettings()
- Exclude checks
Expected 6 spaces after parameter type; 2 found Open
* @param array $liAttributes
- Exclude checks
Variable "tbl_course" is not in valid camel caps format Open
FROM $tbl_course as course
- Exclude checks
Missing parameter name Open
* @param $categoryCode
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
public static function return_unregister_button($course, $stok, $search_term, $categoryCode, $sessionId = 0)
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
'name' => $coach->getFullname(),
- Exclude checks
Variable "TABLE_COURSE_FIELD_VALUE" is not in valid camel caps format Open
$TABLE_COURSE_FIELD_VALUE = Database::get_main_table(TABLE_EXTRA_FIELD_VALUES);
- Exclude checks
Variable "tbl_url_rel_course" is not in valid camel caps format Open
INNER JOIN $tbl_url_rel_course as url_rel_course
- Exclude checks
Variable "tbl_course" is not in valid camel caps format Open
$sql = "SELECT *, id as real_id FROM $tbl_course course
- Exclude checks
Variable "tbl_url_rel_course" is not in valid camel caps format Open
INNER JOIN $tbl_url_rel_course as url_rel_course
- Exclude checks
Variable "TABLE_COURSE_FIELD" is not in valid camel caps format Open
INNER JOIN $TABLE_COURSE_FIELD tcf
- Exclude checks
Variable "id_in" is not in valid camel caps format Open
$id_in = null;
- Exclude checks
Variable "id_in" is not in valid camel caps format Open
$id_in = "$id";
- Exclude checks
Variable "tbl_course" is not in valid camel caps format Open
$sql = "SELECT *, id as real_id FROM $tbl_course WHERE id IN($id_in)";
- Exclude checks
Variable "tbl_url_rel_course" is not in valid camel caps format Open
INNER JOIN $tbl_url_rel_course as url_rel_course
- Exclude checks
Variable "count_users" is not in valid camel caps format Open
$count_users = CourseManager::get_users_count_in_course($row['code']);
- Exclude checks
Variable "tbl_url_rel_course" is not in valid camel caps format Open
$tbl_url_rel_course = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
- Exclude checks
Variable "id_in" is not in valid camel caps format Open
$id_in .= ",$id";
- Exclude checks
Missing function doc comment Open
public static function getRequirements($id, $type, $includeText, $class, $sessionId = 0)
- Exclude checks
Variable "tbl_course" is not in valid camel caps format Open
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
- Exclude checks
Variable "tbl_course" is not in valid camel caps format Open
FROM $tbl_course course
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
$qb->expr()->eq('url.accessUrlId ', $urlId))
- Exclude checks
Missing function doc comment Open
public static function getSessionPagination($action, $countSessions, $limit)
- Exclude checks
Variable "num_records" is not in valid camel caps format Open
list($num_records) = Database::fetch_row($result);
- Exclude checks
Variable "tbl_course" is not in valid camel caps format Open
FROM $tbl_course course
- Exclude checks
Variable "tbl_url_rel_course" is not in valid camel caps format Open
$tbl_url_rel_course = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
- 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='.$search_term.'&category_code='.$categoryCode;
- Exclude checks
Missing parameter name Open
* @param $status
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 32 Open
.http_build_query(['a' => 'get_user_popup', 'user_id' => $coach->getId()]),
- Exclude checks
Missing parameter name Open
* @param $pageLength
- Exclude checks
Expected 6 spaces after parameter type; 2 found Open
* @param array $fields
- Exclude checks
Missing parameter name Open
* @param $course
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
'url' => api_get_path(WEB_AJAX_PATH).'user_manager.ajax.php?'
- Exclude checks
Expected 5 spaces after parameter type; 1 found Open
* @param string $content
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
public static function return_register_button($course, $stok, $categoryCode, $search_term)
- Exclude checks
Missing parameter name Open
* @param $pageNumber
- Exclude checks
Variable "id_in" is not in valid camel caps format Open
if ($id_in) {
- Exclude checks
Missing function doc comment Open
public static function courseSortOrder()
- Exclude checks
Variable "search_term" is not in valid camel caps format Open
$search_term = Security::remove_XSS($search_term);
- Exclude checks
Expected 5 spaces after parameter type; 1 found Open
* @param string $categoryCode
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
'avatar' => UserManager::getUserPicture($coach->getId(), USER_IMAGE_SIZE_SMALL),
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
'avatar' => UserManager::getUserPicture($coach->getId(), USER_IMAGE_SIZE_SMALL),
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 32 Open
.http_build_query(['a' => 'get_user_popup', 'user_id' => $coach->getId()]),
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
'url' => api_get_path(WEB_AJAX_PATH).'user_manager.ajax.php?'
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
$qb->expr()->eq('url.accessUrlId ', $urlId))
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
'id' => $coach->getId(),
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
'name' => $coach->getFullname(),
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
$qb->expr()->eq('url.accessUrlId ', $urlId))
- Exclude checks
The variable $tbl_course is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 $count_users is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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_COURSE_FIELD_VALUE is not named in camelCase. Open
public static function getCoursesToAvoid()
{
$TABLE_COURSE_FIELD = Database::get_main_table(TABLE_EXTRA_FIELD);
$TABLE_COURSE_FIELD_VALUE = Database::get_main_table(TABLE_EXTRA_FIELD_VALUES);
- 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_url_rel_course is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 static function return_unregister_button($course, $stok, $search_term, $categoryCode, $sessionId = 0)
{
$title = get_lang('Unsubscription');
$search_term = Security::remove_XSS($search_term);
$categoryCode = Security::remove_XSS($categoryCode);
- 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 is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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_url_rel_course is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 $num_records is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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_url_rel_course is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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_COURSE_FIELD_VALUE is not named in camelCase. Open
public static function getCoursesToAvoid()
{
$TABLE_COURSE_FIELD = Database::get_main_table(TABLE_EXTRA_FIELD);
$TABLE_COURSE_FIELD_VALUE = Database::get_main_table(TABLE_EXTRA_FIELD_VALUES);
- 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_url_rel_course is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 $num_records is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 $count_users is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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_COURSE_FIELD is not named in camelCase. Open
public static function getCoursesToAvoid()
{
$TABLE_COURSE_FIELD = Database::get_main_table(TABLE_EXTRA_FIELD);
$TABLE_COURSE_FIELD_VALUE = Database::get_main_table(TABLE_EXTRA_FIELD_VALUES);
- 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 is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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_url_rel_course is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 $num_records is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 static function return_register_button($course, $stok, $categoryCode, $search_term)
{
$title = get_lang('Subscribe');
$action = 'subscribe_course';
if (!empty($course['registration_code'])) {
- 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 $num_records is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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_url_rel_course is not named in camelCase. Open
public static function searchCourses($categoryCode, $keyword, $limit, $justVisible = false, $conditions = [])
{
$courseTable = Database::get_main_table(TABLE_MAIN_COURSE);
$limitFilter = self::getLimitFilterFromArray($limit);
$avoidCoursesCondition = self::getAvoidCourseCondition();
- 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_COURSE_FIELD is not named in camelCase. Open
public static function getCoursesToAvoid()
{
$TABLE_COURSE_FIELD = Database::get_main_table(TABLE_EXTRA_FIELD);
$TABLE_COURSE_FIELD_VALUE = Database::get_main_table(TABLE_EXTRA_FIELD_VALUES);
- 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 $id_in is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 $id_in is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 static function return_unregister_button($course, $stok, $search_term, $categoryCode, $sessionId = 0)
{
$title = get_lang('Unsubscription');
$search_term = Security::remove_XSS($search_term);
$categoryCode = Security::remove_XSS($categoryCode);
- 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 $id_in is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 $id_in is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 $id_in is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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_url_rel_course is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 static function return_unregister_button($course, $stok, $search_term, $categoryCode, $sessionId = 0)
{
$title = get_lang('Unsubscription');
$search_term = Security::remove_XSS($search_term);
$categoryCode = Security::remove_XSS($categoryCode);
- 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 is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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 is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- 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_url_rel_course is not named in camelCase. Open
public static function searchCourses($categoryCode, $keyword, $limit, $justVisible = false, $conditions = [])
{
$courseTable = Database::get_main_table(TABLE_MAIN_COURSE);
$limitFilter = self::getLimitFilterFromArray($limit);
$avoidCoursesCondition = self::getAvoidCourseCondition();
- 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 $id_in is not named in camelCase. Open
public static function getCoursesInCategory($categoryCode, $randomValue = null, $limit = [])
{
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$avoidCoursesCondition = self::getAvoidCourseCondition();
$visibilityCondition = CourseManager::getCourseVisibilitySQLCondition('course', true);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method return_teacher is not named in camelCase. Open
public static function return_teacher($courseInfo)
{
$teachers = CourseManager::getTeachersFromCourse($courseInfo['real_id']);
$length = count($teachers);
- 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 return_register_button is not named in camelCase. Open
public static function return_register_button($course, $stok, $categoryCode, $search_term)
{
$title = get_lang('Subscribe');
$action = 'subscribe_course';
if (!empty($course['registration_code'])) {
- 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 return_already_registered_label is not named in camelCase. Open
public static function return_already_registered_label($status)
{
$icon = '<em class="fa fa-check"></em>';
$title = get_lang('YouAreATeacherOfThisCourse');
if ('student' === $status) {
- 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 return_unregister_button is not named in camelCase. Open
public static function return_unregister_button($course, $stok, $search_term, $categoryCode, $sessionId = 0)
{
$title = get_lang('Unsubscription');
$search_term = Security::remove_XSS($search_term);
$categoryCode = Security::remove_XSS($categoryCode);
- 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() {
}
}