The method get_data() has an NPath complexity of 1848. The configured NPath complexity threshold is 200. Open
public function get_data(
$sorting = 0,
$start = 0,
$count = null,
$ignore_score_color = 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 get_category_cached uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$cat = Category::load($category_id);
if (isset($cat)) {
$this->categorycache[$category_id] = $cat[0];
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method build_average_column uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$avgscore = $item->calc_score('', 'average');
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method get_course_name_from_code_cached uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$name = CourseManager::getCourseNameFromCode($courseCode);
$this->coursecodecache[$courseCode] = $name;
return $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 get_category_cached uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return null;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method get_category_name_to_display uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return $cat->get_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 sort_by_type uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return $item1->get_item_type() < $item2->get_item_type() ? -1 : 1;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method get_data uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$avgscore = $item->calc_score();
}
- 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 __construct uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$evals_filtered = $evals_filtered_copy;
}
- 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 compare_scores uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return ($score1[0] / $score1[1]) < ($score2[0] / $score2[1]) ? -1 : 1;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method get_data uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$row[] = $this->build_average_column($item, $ignore_score_color);
$row[] = $this->build_result_column($item, $ignore_score_color);
if ($scoredisplay->is_custom()) {
$row[] = $this->build_mask_column($item, $ignore_score_color);
- 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 '$ignore_score_color'. Open
private function build_average_column($item, $ignore_score_color)
- 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 $category_id is not named in camelCase. Open
private function get_category_cached(int $category_id)
{
if (isset($this->categorycache) &&
isset($this->categorycache[$category_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 $ignore_score_color is not named in camelCase. Open
private function build_average_column($item, $ignore_score_color)
{
if (isset($this->avgcache)) {
$avgscore = $this->avgcache[$item->get_item_type().$item->get_id()];
} else {
- 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 $ignore_score_color is not named in camelCase. Open
private function build_result_column($item, $ignore_score_color)
{
$studscore = $this->scorecache[$item->get_item_type().$item->get_id()];
$scoredisplay = ScoreDisplay::instance();
$displaytype = SCORE_DIV_PERCENT;
- 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 $ignore_score_color is not named in camelCase. Open
private function build_mask_column($item, $ignore_score_color)
{
$studscore = $this->scorecache[$item->get_item_type().$item->get_id()];
$scoredisplay = ScoreDisplay::instance();
$displaytype = SCORE_DIV_PERCENT;
- 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 $ignore_score_color is not named in camelCase. Open
public function get_data(
$sorting = 0,
$start = 0,
$count = null,
$ignore_score_color = false
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Variable "evals_filtered_copy" is not in valid camel caps format Open
$evals_filtered = $evals_filtered_copy;
- Exclude checks
Method name "UserDataGenerator::get_total_items_count" is not in camel caps format Open
public function get_total_items_count()
- Exclude checks
Variable "ignore_score_color" is not in valid camel caps format Open
$ignore_score_color = false
- Exclude checks
Missing parameter name Open
* @param $item2
- Exclude checks
Missing parameter name Open
* @param $item2
- Exclude checks
Method name "UserDataGenerator::build_average_column" is not in camel caps format Open
private function build_average_column($item, $ignore_score_color)
- Exclude checks
Variable "ignore_score_color" is not in valid camel caps format Open
if ($ignore_score_color) {
- Exclude checks
Variable "ignore_score_color" is not in valid camel caps format Open
private function build_mask_column($item, $ignore_score_color)
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$this->categorycache[$category_id] = $cat[0];
- Exclude checks
Variable "ignore_score_color" is not in valid camel caps format Open
$row[] = $this->build_mask_column($item, $ignore_score_color);
- Exclude checks
Missing parameter name Open
* @param $item2
- Exclude checks
Method name "UserDataGenerator::sort_by_type" is not in camel caps format Open
public function sort_by_type($item1, $item2)
- Exclude checks
Method name "UserDataGenerator::sort_by_name" is not in camel caps format Open
public function sort_by_name($item1, $item2)
- Exclude checks
Missing parameter name Open
* @param $item1
- Exclude checks
Method name "UserDataGenerator::build_category_name" is not in camel caps format Open
private function build_category_name($item)
- Exclude checks
Method name "UserDataGenerator::get_course_name_from_code_cached" is not in camel caps format Open
private function get_course_name_from_code_cached(string $courseCode): string
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
isset($this->categorycache[$category_id])
- Exclude checks
Missing parameter name Open
* @param $item2
- Exclude checks
Missing parameter name Open
* @param $item1
- Exclude checks
Missing parameter name Open
* @param $score2
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
private function get_category_cached(int $category_id)
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$cat = Category::load($category_id);
- Exclude checks
Variable "evals_filtered_copy" is not in valid camel caps format Open
$evals_filtered_copy = $evals;
- Exclude checks
Variable "evals_filtered" is not in valid camel caps format Open
$evals_filtered = $evals_filtered_copy;
- Exclude checks
Variable "evals_filtered" is not in valid camel caps format Open
$this->items = array_merge($evals_filtered, $links);
- Exclude checks
Missing parameter name Open
* @param $item1
- Exclude checks
Missing parameter name Open
* @param $item1
- Exclude checks
Variable "ignore_score_color" is not in valid camel caps format Open
$row[] = $this->build_average_column($item, $ignore_score_color);
- Exclude checks
Missing parameter name Open
* @param $item2
- Exclude checks
Variable "ignore_score_color" is not in valid camel caps format Open
private function build_result_column($item, $ignore_score_color)
- Exclude checks
Method name "UserDataGenerator::get_category_name_to_display" is not in camel caps format Open
private function get_category_name_to_display($cat)
- Exclude checks
Variable "evals_filtered" is not in valid camel caps format Open
$evals_filtered = $evals;
- Exclude checks
Method name "UserDataGenerator::get_data" is not in camel caps format Open
public function get_data(
- Exclude checks
Method name "UserDataGenerator::compare_scores" is not in camel caps format Open
public function compare_scores($score1, $score2)
- Exclude checks
Method name "UserDataGenerator::build_course_name" is not in camel caps format Open
private function build_course_name($item)
- Exclude checks
Method name "UserDataGenerator::get_category_cached" is not in camel caps format Open
private function get_category_cached(int $category_id)
- Exclude checks
Variable "ignore_score_color" is not in valid camel caps format Open
private function build_average_column($item, $ignore_score_color)
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
return $this->categorycache[$category_id];
- Exclude checks
Variable "ignore_score_color" is not in valid camel caps format Open
if ($ignore_score_color) {
- Exclude checks
Missing parameter name Open
* @param $item1
- Exclude checks
Method name "UserDataGenerator::sort_by_average" is not in camel caps format Open
public function sort_by_average($item1, $item2)
- Exclude checks
Missing parameter name Open
* @param $score1
- Exclude checks
Method name "UserDataGenerator::build_result_column" is not in camel caps format Open
private function build_result_column($item, $ignore_score_color)
- Exclude checks
Missing parameter name Open
* @param $item1
- Exclude checks
Missing parameter name Open
* @param $item1
- Exclude checks
Missing parameter name Open
* @param $item2
- Exclude checks
Method name "UserDataGenerator::sort_by_category" is not in camel caps format Open
public function sort_by_category($item1, $item2)
- Exclude checks
Variable "ignore_score_color" is not in valid camel caps format Open
$row[] = $this->build_result_column($item, $ignore_score_color);
- Exclude checks
Missing parameter name Open
* @param $item2
- Exclude checks
Method name "UserDataGenerator::sort_by_mask" is not in camel caps format Open
public function sort_by_mask($item1, $item2)
- Exclude checks
Method name "UserDataGenerator::sort_by_course" is not in camel caps format Open
public function sort_by_course($item1, $item2)
- Exclude checks
Method name "UserDataGenerator::sort_by_score" is not in camel caps format Open
public function sort_by_score($item1, $item2)
- Exclude checks
Method name "UserDataGenerator::build_mask_column" is not in camel caps format Open
private function build_mask_column($item, $ignore_score_color)
- Exclude checks
The variable $evals_filtered is not named in camelCase. Open
public function __construct($userid, $evals = [], $links = [])
{
$this->userid = $userid;
$result = [];
/** @var Evaluation $eval */
- 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 $ignore_score_color is not named in camelCase. Open
private function build_result_column($item, $ignore_score_color)
{
$studscore = $this->scorecache[$item->get_item_type().$item->get_id()];
$scoredisplay = ScoreDisplay::instance();
$displaytype = SCORE_DIV_PERCENT;
- 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 $category_id is not named in camelCase. Open
private function get_category_cached(int $category_id)
{
if (isset($this->categorycache) &&
isset($this->categorycache[$category_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 $category_id is not named in camelCase. Open
private function get_category_cached(int $category_id)
{
if (isset($this->categorycache) &&
isset($this->categorycache[$category_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 $evals_filtered is not named in camelCase. Open
public function __construct($userid, $evals = [], $links = [])
{
$this->userid = $userid;
$result = [];
/** @var Evaluation $eval */
- 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 $ignore_score_color is not named in camelCase. Open
public function get_data(
$sorting = 0,
$start = 0,
$count = null,
$ignore_score_color = 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 $ignore_score_color is not named in camelCase. Open
public function get_data(
$sorting = 0,
$start = 0,
$count = null,
$ignore_score_color = 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 $evals_filtered_copy is not named in camelCase. Open
public function __construct($userid, $evals = [], $links = [])
{
$this->userid = $userid;
$result = [];
/** @var Evaluation $eval */
- 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 $category_id is not named in camelCase. Open
private function get_category_cached(int $category_id)
{
if (isset($this->categorycache) &&
isset($this->categorycache[$category_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 $ignore_score_color is not named in camelCase. Open
public function get_data(
$sorting = 0,
$start = 0,
$count = null,
$ignore_score_color = 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 $evals_filtered is not named in camelCase. Open
public function __construct($userid, $evals = [], $links = [])
{
$this->userid = $userid;
$result = [];
/** @var Evaluation $eval */
- 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 $ignore_score_color is not named in camelCase. Open
private function build_mask_column($item, $ignore_score_color)
{
$studscore = $this->scorecache[$item->get_item_type().$item->get_id()];
$scoredisplay = ScoreDisplay::instance();
$displaytype = SCORE_DIV_PERCENT;
- 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 $category_id is not named in camelCase. Open
private function get_category_cached(int $category_id)
{
if (isset($this->categorycache) &&
isset($this->categorycache[$category_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 $evals_filtered_copy is not named in camelCase. Open
public function __construct($userid, $evals = [], $links = [])
{
$this->userid = $userid;
$result = [];
/** @var Evaluation $eval */
- 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 build_course_name is not named in camelCase. Open
private function build_course_name($item)
{
return $this->get_course_name_from_code_cached($item->get_course_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 build_result_column is not named in camelCase. Open
private function build_result_column($item, $ignore_score_color)
{
$studscore = $this->scorecache[$item->get_item_type().$item->get_id()];
$scoredisplay = ScoreDisplay::instance();
$displaytype = SCORE_DIV_PERCENT;
- 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 build_mask_column is not named in camelCase. Open
private function build_mask_column($item, $ignore_score_color)
{
$studscore = $this->scorecache[$item->get_item_type().$item->get_id()];
$scoredisplay = ScoreDisplay::instance();
$displaytype = SCORE_DIV_PERCENT;
- 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 sort_by_name is not named in camelCase. Open
public function sort_by_name($item1, $item2)
{
return api_strnatcmp($item1->get_name(), $item2->get_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 compare_scores is not named in camelCase. Open
public function compare_scores($score1, $score2)
{
if (!isset($score1)) {
return isset($score2) ? 1 : 0;
} elseif (!isset($score2)) {
- 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_category_name_to_display is not named in camelCase. Open
private function get_category_name_to_display($cat)
{
if (isset($cat)) {
if ('0' == $cat->get_parent_id() || null == $cat->get_parent_id()) {
return '';
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method sort_by_type is not named in camelCase. Open
public function sort_by_type($item1, $item2)
{
if ($item1->get_item_type() == $item2->get_item_type()) {
return $this->sort_by_name($item1, $item2);
} else {
- 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 sort_by_score is not named in camelCase. Open
public function sort_by_score($item1, $item2)
{
$score1 = $this->scorecache[$item1->get_item_type().$item1->get_id()];
$score2 = $this->scorecache[$item2->get_item_type().$item2->get_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 build_category_name is not named in camelCase. Open
private function build_category_name($item)
{
$cat = $this->get_category_cached($item->get_category_id());
return $this->get_category_name_to_display($cat);
- 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_total_items_count is not named in camelCase. Open
public function get_total_items_count()
{
return count($this->items);
}
- 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 sort_by_average is not named in camelCase. Open
public function sort_by_average($item1, $item2)
{
$score1 = $this->avgcache[$item1->get_item_type().$item1->get_id()];
$score2 = $this->avgcache[$item2->get_item_type().$item2->get_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_course_name_from_code_cached is not named in camelCase. Open
private function get_course_name_from_code_cached(string $courseCode): string
{
if (isset($this->coursecodecache) &&
isset($this->coursecodecache[$courseCode])
) {
- 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 sort_by_course is not named in camelCase. Open
public function sort_by_course($item1, $item2)
{
$name1 = api_strtolower(
$this->get_course_name_from_code_cached($item1->get_course_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 build_average_column is not named in camelCase. Open
private function build_average_column($item, $ignore_score_color)
{
if (isset($this->avgcache)) {
$avgscore = $this->avgcache[$item->get_item_type().$item->get_id()];
} else {
- 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_data is not named in camelCase. Open
public function get_data(
$sorting = 0,
$start = 0,
$count = null,
$ignore_score_color = 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 sort_by_mask is not named in camelCase. Open
public function sort_by_mask($item1, $item2)
{
$score1 = $this->scorecache[$item1->get_item_type().$item1->get_id()];
$score2 = $this->scorecache[$item2->get_item_type().$item2->get_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_category_cached is not named in camelCase. Open
private function get_category_cached(int $category_id)
{
if (isset($this->categorycache) &&
isset($this->categorycache[$category_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 sort_by_category is not named in camelCase. Open
public function sort_by_category($item1, $item2)
{
$cat1 = $this->get_category_cached($item1->get_category_id());
$cat2 = $this->get_category_cached($item2->get_category_id());
$name1 = api_strtolower($this->get_category_name_to_display($cat1));
- 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() {
}
}