The method display_glossary() has an NPath complexity of 2880. The configured NPath complexity threshold is 200. Open
public static function display_glossary()
{
// This function should always be called with the corresponding
// parameter for view type. Meanwhile, use this cheap trick.
$view = self::getGlossaryView();
- 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 GlossaryManager has a coupling between objects value of 15. Consider to reduce the number of dependencies under 13. Open
class GlossaryManager
{
/**
* Get all glossary terms.
*
- 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 '948', column '25'). Open
$template = new Template('', false, false, false, true, false, false);
- 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 '981', column '24'). Open
$pdf = new PDF(
- 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 '526', column '21'). Open
$form = new FormValidator(
- 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 '546', column '30'). Open
$table = new SortableTable(
- 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 '975', column '29'). Open
$template = new Template('', false, false, false, true, false, false);
- 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 '954', column '20'). Open
$pdf = new PDF();
- 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 move_glossary uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sortorder = 'ASC';
}
- 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 display_glossary uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$actionsLeft .= '<a href="'.$url.'&action=changeview&view=table">'.
Display::getMdiIcon(StateIcon::LIST_VIEW, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Table view')).'</a>';
}
- 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 display_glossary uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if (api_is_allowed_to_edit(true, true)) {
$content .= Display::noDataView(
get_lang('Glossary'),
Display::getMdiIcon(ObjectIcon::GLOSSARY, 'ch-tool-icon', null, ICON_SIZE_BIG),
- 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 display_glossary uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$content .= self::displayGlossaryList();
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method get_glossary_data uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$qb = $repo->getResourcesByCourse($course, $session);
$glossaries = $qb->getQuery()->getResult();
}
- 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 delete_glossary uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$showMessage = false;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method get_glossary_data uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$array[1] = $glossary->getDescription();
}
- 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 update_glossary uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$repo = Container::getGlossaryRepository();
/** @var CGlossary $glossary */
$glossary = $repo->find($values['glossary_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 movePdfToDocuments uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
Display::addFlash(Display::return_message(get_lang('Nothing to add')));
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method save_glossary uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$glossary = new CGlossary();
$courseId = api_get_course_int_id();
$sessionId = api_get_session_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 display_glossary uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$actionsLeft .= Display::url(
Display::getMdiIcon(ActionIcon::UP, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Sort Ascending')),
$url.'&'.http_build_query(['order' => 'ASC'])
);
- 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 parameters such as '$number_of_items'. Open
$number_of_items,
- 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
Avoid unused parameters such as '$column'. Open
$column,
- 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
Avoid unused parameters such as '$from'. Open
$from,
- 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
Avoid unused parameters such as '$url_params'. Open
public static function actions_filter($glossary_id, $url_params, $row)
- 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
Avoid unused parameters such as '$direction'. Open
$direction
- 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 $glossary_id is not named in camelCase. Open
public static function delete_glossary($glossary_id, $showMessage = true)
{
$repo = Container::getGlossaryRepository();
/** @var CGlossary $glossary */
$glossary = $repo->find($glossary_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 $url_params is not named in camelCase. Open
public static function actions_filter($glossary_id, $url_params, $row)
{
$glossary_id = $row[2];
$return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
- 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 $number_of_items is not named in camelCase. Open
public static function get_glossary_data(
$from,
$number_of_items,
$column,
$direction
- 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 $glossary_id is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- 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 $glossary_id is not named in camelCase. Open
public static function actions_filter($glossary_id, $url_params, $row)
{
$glossary_id = $row[2];
$return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
- 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 $glossary_id is not named in camelCase. Open
public static function get_glossary_term_by_glossary_id($glossary_id)
{
$repo = Container::getGlossaryRepository();
/** @var CGlossary $glossary */
$glossary = $repo->find($glossary_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 $not_id is not named in camelCase. Open
public static function glossary_exists($term, $not_id = 0)
{
$repo = Container::getGlossaryRepository();
$courseId = api_get_course_int_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
Method name "GlossaryManager::save_glossary" is not in camel caps format Open
public static function save_glossary($values, $showMessage = true)
- Exclude checks
Variable "glossary_id" is not in valid camel caps format Open
href="'.api_get_self().'?action=delete_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'"
- Exclude checks
Method name "GlossaryManager::export_to_pdf" is not in camel caps format Open
public static function export_to_pdf()
- Exclude checks
Method name "GlossaryManager::update_glossary" is not in camel caps format Open
public static function update_glossary($values, $showMessage = true)
- Exclude checks
Variable "res_max" is not in valid camel caps format Open
$res_max = Database::query($get_max);
- Exclude checks
Variable "glossary_id" is not in valid camel caps format Open
$glossaryData = $repo->find($glossary_id);
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$course_id = api_get_course_int_id();
- Exclude checks
Variable "next_id" is not in valid camel caps format Open
if ($found && empty($next_id)) {
- Exclude checks
Variable "max_glossary_item" is not in valid camel caps format Open
->setDisplayOrder($max_glossary_item + 1)
- Exclude checks
Variable "res_max" is not in valid camel caps format Open
$row = Database::fetch_array($res_max);
- Exclude checks
Variable "not_id" is not in valid camel caps format Open
public static function glossary_exists($term, $not_id = 0)
- Exclude checks
Variable "glossary_id" is not in valid camel caps format Open
$glossary = $repo->find($glossary_id);
- Exclude checks
Variable "number_of_items" is not in valid camel caps format Open
$number_of_items,
- Exclude checks
Variable "glossary_id" is not in valid camel caps format Open
public static function actions_filter($glossary_id, $url_params, $row)
- Exclude checks
Variable "glossary_id" is not in valid camel caps format Open
$glossary_id = $row[2];
- Exclude checks
Variable "next_id" is not in valid camel caps format Open
WHERE c_id = $course_id AND glossary_id = '".Database::escape_string($next_id)."'";
- Exclude checks
Method name "GlossaryManager::get_glossary_term_by_glossary_id" is not in camel caps format Open
public static function get_glossary_term_by_glossary_id($glossary_id)
- Exclude checks
Variable "glossary_id" is not in valid camel caps format Open
$glossary = $repo->find($glossary_id);
- Exclude checks
Method name "GlossaryManager::get_glossary_term_by_glossary_name" is not in camel caps format Open
public static function get_glossary_term_by_glossary_name($name)
- Exclude checks
Method name "GlossaryManager::display_glossary" is not in camel caps format Open
public static function display_glossary()
- Exclude checks
Method name "GlossaryManager::get_glossary_data" is not in camel caps format Open
public static function get_glossary_data(
- Exclude checks
Variable "next_id" is not in valid camel caps format Open
$next_id = $row['glossary_id'];
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$course_id = api_get_course_int_id();
- Exclude checks
Variable "url_params" is not in valid camel caps format Open
public static function actions_filter($glossary_id, $url_params, $row)
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
WHERE c_id = $course_id AND glossary_id = '".Database::escape_string($next_id)."'";
- Exclude checks
Method name "GlossaryManager::get_max_glossary_item" is not in camel caps format Open
public static function get_max_glossary_item()
- Exclude checks
Missing function doc comment Open
public static function getGlossaryView(): string
- Exclude checks
Variable "glossary_item" is not in valid camel caps format Open
self::actions_filter($glossary_item[2], '', $glossary_item).'</div>';
- Exclude checks
Method name "GlossaryManager::delete_glossary" is not in camel caps format Open
public static function delete_glossary($glossary_id, $showMessage = true)
- Exclude checks
Variable "glossary_item" is not in valid camel caps format Open
$content .= Display::panel($glossary_item[1], $glossary_item[0].' '.$actions);
- Exclude checks
Method name "GlossaryManager::reorder_glossary" is not in camel caps format Open
public static function reorder_glossary()
- Exclude checks
Variable "glossary_id" is not in valid camel caps format Open
public static function move_glossary($direction, $glossary_id)
- Exclude checks
Variable "current_id" is not in valid camel caps format Open
$current_id = $glossary_id;
- Exclude checks
Method name "GlossaryManager::get_glossary_terms" is not in camel caps format Open
public static function get_glossary_terms()
- Exclude checks
Variable "res_max" is not in valid camel caps format Open
if (0 == Database::num_rows($res_max)) {
- Exclude checks
Missing parameter name Open
* @param int Session ID filter (optional)
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
WHERE c_id = $course_id AND glossary_id = '".Database::escape_string($current_id)."'";
- Exclude checks
Variable "get_max" is not in valid camel caps format Open
$get_max = "SELECT MAX(display_order) FROM $table
- Exclude checks
Variable "get_max" is not in valid camel caps format Open
$res_max = Database::query($get_max);
- Exclude checks
Variable "next_display_order" is not in valid camel caps format Open
$next_display_order = $row['display_order'];
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
c_id = $course_id AND
- Exclude checks
Variable "glossary_id" is not in valid camel caps format Open
public static function get_glossary_term_by_glossary_id($glossary_id)
- Exclude checks
Variable "glossary_id" is not in valid camel caps format Open
if ($row['glossary_id'] == $glossary_id) {
- Exclude checks
Missing function doc comment Open
public static function sorter($item1, $item2)
- Exclude checks
Variable "not_id" is not in valid camel caps format Open
if ($term == $item->getTitle() && $not_id != $item->getIid()) {
- Exclude checks
Variable "glossary_id" is not in valid camel caps format Open
public static function delete_glossary($glossary_id, $showMessage = true)
- Exclude checks
Variable "glossary_item" is not in valid camel caps format Open
$content .= Display::panel($glossary_item[1], $glossary_item[0].' '.$actions);
- Exclude checks
Method name "GlossaryManager::get_number_glossary_terms" is not in camel caps format Open
public static function get_number_glossary_terms($sessionId = 0)
- Exclude checks
Variable "glossary_item" is not in valid camel caps format Open
foreach ($glossaryList as $glossary_item) {
- Exclude checks
Variable "glossary_item" is not in valid camel caps format Open
self::actions_filter($glossary_item[2], '', $glossary_item).'</div>';
- Exclude checks
Method name "GlossaryManager::move_glossary" is not in camel caps format Open
public static function move_glossary($direction, $glossary_id)
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
WHERE c_id = $course_id
- Exclude checks
Variable "current_display_order" is not in valid camel caps format Open
$current_display_order = $row['display_order'];
- Exclude checks
Variable "next_display_order" is not in valid camel caps format Open
$sql1 = "UPDATE $table SET display_order = '".Database::escape_string($next_display_order)."'
- Exclude checks
Variable "current_id" is not in valid camel caps format Open
WHERE c_id = $course_id AND glossary_id = '".Database::escape_string($current_id)."'";
- Exclude checks
Variable "max_glossary_item" is not in valid camel caps format Open
$max_glossary_item = self::get_max_glossary_item();
- Exclude checks
Variable "glossary_id" is not in valid camel caps format Open
$return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
- Exclude checks
Variable "glossary_id" is not in valid camel caps format Open
$current_id = $glossary_id;
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$course_id = api_get_course_int_id();
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
WHERE c_id = $course_id ";
- Exclude checks
Method name "GlossaryManager::glossary_exists" is not in camel caps format Open
public static function glossary_exists($term, $not_id = 0)
- Exclude checks
Method name "GlossaryManager::actions_filter" is not in camel caps format Open
public static function actions_filter($glossary_id, $url_params, $row)
- Exclude checks
Method name "GlossaryManager::javascript_glossary" is not in camel caps format Open
public static function javascript_glossary()
- Exclude checks
Variable "current_display_order" is not in valid camel caps format Open
$sql2 = "UPDATE $table SET display_order = '".Database::escape_string($current_display_order)."'
- Exclude checks
The variable $glossary_item is not named in camelCase. Open
public static function displayGlossaryList(): string
{
$glossaryList = self::get_glossary_data(0, 1000, 0, 'ASC');
$content = '';
foreach ($glossaryList as $glossary_item) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $course_id is not named in camelCase. Open
public static function get_glossary_term_by_glossary_name($name)
{
// @todo Filter by like on ORM
$table = Database::get_course_table(TABLE_GLOSSARY);
$sessionId = api_get_session_id();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $course_id is not named in camelCase. Open
public static function get_max_glossary_item()
{
// @todo get max by orm
/*
$repo = Container::getGlossaryRepository();
- 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 $glossary_item is not named in camelCase. Open
public static function displayGlossaryList(): string
{
$glossaryList = self::get_glossary_data(0, 1000, 0, 'ASC');
$content = '';
foreach ($glossaryList as $glossary_item) {
- 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 $next_id is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- 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_id is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- 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 $res_max is not named in camelCase. Open
public static function get_max_glossary_item()
{
// @todo get max by orm
/*
$repo = Container::getGlossaryRepository();
- 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 $glossary_id is not named in camelCase. Open
public static function delete_glossary($glossary_id, $showMessage = true)
{
$repo = Container::getGlossaryRepository();
/** @var CGlossary $glossary */
$glossary = $repo->find($glossary_id);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $course_id is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- 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 $glossary_id is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- 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 $next_display_order is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- 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 $glossary_id is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $course_id is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- 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 $max_glossary_item is not named in camelCase. Open
public static function save_glossary($values, $showMessage = true)
{
if (!is_array($values) || !isset($values['title'])) {
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 $next_display_order is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $course_id is not named in camelCase. Open
public static function get_max_glossary_item()
{
// @todo get max by orm
/*
$repo = Container::getGlossaryRepository();
- 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 $glossary_id is not named in camelCase. Open
public static function actions_filter($glossary_id, $url_params, $row)
{
$glossary_id = $row[2];
$return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
- 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 $next_id is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $course_id is not named in camelCase. Open
public static function get_glossary_term_by_glossary_name($name)
{
// @todo Filter by like on ORM
$table = Database::get_course_table(TABLE_GLOSSARY);
$sessionId = api_get_session_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 $res_max is not named in camelCase. Open
public static function get_max_glossary_item()
{
// @todo get max by orm
/*
$repo = Container::getGlossaryRepository();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $course_id is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- 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 $get_max is not named in camelCase. Open
public static function get_max_glossary_item()
{
// @todo get max by orm
/*
$repo = Container::getGlossaryRepository();
- 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 $glossary_item is not named in camelCase. Open
public static function displayGlossaryList(): string
{
$glossaryList = self::get_glossary_data(0, 1000, 0, 'ASC');
$content = '';
foreach ($glossaryList as $glossary_item) {
- 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 $next_id is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $course_id is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- 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_display_order is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- 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 $glossary_id is not named in camelCase. Open
public static function actions_filter($glossary_id, $url_params, $row)
{
$glossary_id = $row[2];
$return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
- 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 $glossary_id is not named in camelCase. Open
public static function actions_filter($glossary_id, $url_params, $row)
{
$glossary_id = $row[2];
$return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
- 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_id is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- 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 $glossary_id is not named in camelCase. Open
public static function get_glossary_term_by_glossary_id($glossary_id)
{
$repo = Container::getGlossaryRepository();
/** @var CGlossary $glossary */
$glossary = $repo->find($glossary_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 $max_glossary_item is not named in camelCase. Open
public static function save_glossary($values, $showMessage = true)
{
if (!is_array($values) || !isset($values['title'])) {
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 $not_id is not named in camelCase. Open
public static function glossary_exists($term, $not_id = 0)
{
$repo = Container::getGlossaryRepository();
$courseId = api_get_course_int_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 $res_max is not named in camelCase. Open
public static function get_max_glossary_item()
{
// @todo get max by orm
/*
$repo = Container::getGlossaryRepository();
- 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 $get_max is not named in camelCase. Open
public static function get_max_glossary_item()
{
// @todo get max by orm
/*
$repo = Container::getGlossaryRepository();
- 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 $glossary_id is not named in camelCase. Open
public static function actions_filter($glossary_id, $url_params, $row)
{
$glossary_id = $row[2];
$return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
- 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_display_order is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- 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 $glossary_item is not named in camelCase. Open
public static function displayGlossaryList(): string
{
$glossaryList = self::get_glossary_data(0, 1000, 0, 'ASC');
$content = '';
foreach ($glossaryList as $glossary_item) {
- 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 $glossary_item is not named in camelCase. Open
public static function displayGlossaryList(): string
{
$glossaryList = self::get_glossary_data(0, 1000, 0, 'ASC');
$content = '';
foreach ($glossaryList as $glossary_item) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method get_glossary_term_by_glossary_id is not named in camelCase. Open
public static function get_glossary_term_by_glossary_id($glossary_id)
{
$repo = Container::getGlossaryRepository();
/** @var CGlossary $glossary */
$glossary = $repo->find($glossary_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 get_glossary_term_by_glossary_name is not named in camelCase. Open
public static function get_glossary_term_by_glossary_name($name)
{
// @todo Filter by like on ORM
$table = Database::get_course_table(TABLE_GLOSSARY);
$sessionId = api_get_session_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 reorder_glossary is not named in camelCase. Open
public static function reorder_glossary()
{
$repo = Container::getGlossaryRepository();
$courseId = api_get_course_int_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 actions_filter is not named in camelCase. Open
public static function actions_filter($glossary_id, $url_params, $row)
{
$glossary_id = $row[2];
$return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
- 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 save_glossary is not named in camelCase. Open
public static function save_glossary($values, $showMessage = true)
{
if (!is_array($values) || !isset($values['title'])) {
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 javascript_glossary is not named in camelCase. Open
public static function javascript_glossary()
{
return "<script>
function confirmation (name) {
if (confirm(\" ".get_lang("Do you really want to delete this term")." \"+ 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 delete_glossary is not named in camelCase. Open
public static function delete_glossary($glossary_id, $showMessage = true)
{
$repo = Container::getGlossaryRepository();
/** @var CGlossary $glossary */
$glossary = $repo->find($glossary_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 move_glossary is not named in camelCase. Open
public static function move_glossary($direction, $glossary_id)
{
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_number_glossary_terms is not named in camelCase. Open
public static function get_number_glossary_terms($sessionId = 0)
{
// @todo Filter by keywork dont work
$repo = Container::getGlossaryRepository();
- 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_glossary_terms is not named in camelCase. Open
public static function get_glossary_terms()
{
$glossaryData = [];
$repo = Container::getGlossaryRepository();
- 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_max_glossary_item is not named in camelCase. Open
public static function get_max_glossary_item()
{
// @todo get max by orm
/*
$repo = Container::getGlossaryRepository();
- 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 glossary_exists is not named in camelCase. Open
public static function glossary_exists($term, $not_id = 0)
{
$repo = Container::getGlossaryRepository();
$courseId = api_get_course_int_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 export_to_pdf is not named in camelCase. Open
public static function export_to_pdf()
{
$data = self::get_glossary_data(
0,
self::get_number_glossary_terms(api_get_session_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 display_glossary is not named in camelCase. Open
public static function display_glossary()
{
// This function should always be called with the corresponding
// parameter for view type. Meanwhile, use this cheap trick.
$view = self::getGlossaryView();
- 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 update_glossary is not named in camelCase. Open
public static function update_glossary($values, $showMessage = true)
{
/*
// Database table definition
$table = Database::get_course_table(TABLE_GLOSSARY);
- 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_glossary_data is not named in camelCase. Open
public static function get_glossary_data(
$from,
$number_of_items,
$column,
$direction
- 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() {
}
}