The method __construct() has an NPath complexity of 2184. The configured NPath complexity threshold is 200. Open
public function __construct($category_id = 0)
{
if (!empty($category_id)) {
$this->category_id = $category_id;
}
- 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 display_score() has an NPath complexity of 240. The configured NPath complexity threshold is 200. Open
public function display_score(
$score,
$type = SCORE_DIV_PERCENT,
$what = SCORE_BOTH,
$disableColor = 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
Missing class import via use statement (line '102', column '29'). Open
$instance = new ScoreDisplay($categoryId);
- 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 '486', column '26'). Open
$f = new NumberFormatter($iso, NumberFormatter::SPELLOUT);
- 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 display_score uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// if no custom display set, use default display
$display = $this->displayDefault($my_score, $type, $ignoreDecimals, $removeEmptyDecimals);
}
- 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 updateCustomScoreDisplaySettings uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$category_id = $this->get_current_gradebook_category_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_custom uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if (!empty($this->custom_display_conv)) {
foreach ($this->custom_display_conv as $displayitem) {
if ($scaledscore < $displayitem['score'] || 1 == $displayitem['score']) {
return $displayitem['display'];
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method get_custom_displays uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$category_id = $this->get_current_gradebook_category_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 convert_displays uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$newelement['score'] = 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 get_score_color_percent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$category_id = $this->get_current_gradebook_category_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 sort_display uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return $item1['score'] < $item2['score'] ? -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
Avoid unused parameters such as '$what'. Open
$what = SCORE_BOTH,
- 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 private methods such as 'sort_display'. Open
private function sort_display($item1, $item2)
{
if ($item1['score'] === $item2['score']) {
return 0;
} else {
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
The property $color_split_value is not named in camelCase. Open
class ScoreDisplay
{
private $coloring_enabled;
private $color_split_value;
private $custom_enabled;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $custom_display is not named in camelCase. Open
class ScoreDisplay
{
private $coloring_enabled;
private $color_split_value;
private $custom_enabled;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $category_id is not named in camelCase. Open
public function insert_defaults($category_id)
{
if (empty($category_id)) {
return false;
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The property $upperlimit_included is not named in camelCase. Open
class ScoreDisplay
{
private $coloring_enabled;
private $color_split_value;
private $custom_enabled;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $custom_enabled is not named in camelCase. Open
class ScoreDisplay
{
private $coloring_enabled;
private $color_split_value;
private $custom_enabled;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $category_id is not named in camelCase. Open
public function updateCustomScoreDisplaySettings(
$displays,
$scorecolpercent = 0,
$category_id = null
) {
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The property $coloring_enabled is not named in camelCase. Open
class ScoreDisplay
{
private $coloring_enabled;
private $color_split_value;
private $custom_enabled;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $category_id is not named in camelCase. Open
public function __construct($category_id = 0)
{
if (!empty($category_id)) {
$this->category_id = $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 property $custom_display_conv is not named in camelCase. Open
class ScoreDisplay
{
private $coloring_enabled;
private $color_split_value;
private $custom_enabled;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $category_id is not named in camelCase. Open
private function get_custom_displays($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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 $category_id is not named in camelCase. Open
private function get_score_color_percent($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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 $custom_display is not named in camelCase. Open
private function convert_displays($custom_display)
{
if (isset($custom_display)) {
// get highest score entry, and copy each element to a new array
$converted = [];
- 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 "coloring_enabled" is not in valid camel caps format Open
$this->coloring_enabled = 'true' == $value ? true : false;
- Exclude checks
Variable "upperlimit_included" is not in valid camel caps format Open
$this->upperlimit_included = 'true' === $value ? true : false;
- Exclude checks
Variable "custom_enabled" is not in valid camel caps format Open
if ($this->custom_enabled) {
- Exclude checks
Variable "custom_display" is not in valid camel caps format Open
if (count($this->custom_display) > 0) {
- Exclude checks
Variable "color_split_value" is not in valid camel caps format Open
$this->color_split_value = $this->get_score_color_percent();
- Exclude checks
Variable "coloring_enabled" is not in valid camel caps format Open
return $this->coloring_enabled;
- Exclude checks
Variable "custom_enabled" is not in valid camel caps format Open
return $this->custom_enabled;
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
'category_id' => $category_id,
- Exclude checks
Method name "ScoreDisplay::display_score" is not in camel caps format Open
public function display_score(
- Exclude checks
Variable "my_score" is not in valid camel caps format Open
$percentage = $my_score[0] / $my_score[1] * 100;
- Exclude checks
Method name "ScoreDisplay::get_score_color_percent" is not in camel caps format Open
private function get_score_color_percent($category_id = null)
- Exclude checks
Variable "tbl_display" is not in valid camel caps format Open
$sql = 'SELECT score_color_percent FROM '.$tbl_display.'
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
if (!empty($category_id)) {
- Exclude checks
Variable "portal_displays" is not in valid camel caps format Open
$this->custom_display = $portal_displays;
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
WHERE category_id = '.$category_id.'
- Exclude checks
Variable "custom_display" is not in valid camel caps format Open
foreach ($custom_display as $element) {
- Exclude checks
Variable "color_split_value" is not in valid camel caps format Open
$this->color_split_value = $value;
- Exclude checks
Method name "ScoreDisplay::get_custom_score_display_settings" is not in camel caps format Open
public function get_custom_score_display_settings()
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
if (isset($category_id)) {
- Exclude checks
Method name "ScoreDisplay::insert_defaults" is not in camel caps format Open
public function insert_defaults($category_id)
- Exclude checks
Method name "ScoreDisplay::get_number_decimals" is not in camel caps format Open
public function get_number_decimals()
- Exclude checks
Missing parameter name Open
* @param int gradebook category id (optional)
- Exclude checks
Variable "upperlimit_included" is not in valid camel caps format Open
if ($this->upperlimit_included) {
- Exclude checks
Method name "ScoreDisplay::format_score" is not in camel caps format Open
public function format_score(
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$category_id = $this->get_current_gradebook_category_id();
- Exclude checks
Variable "my_score" is not in valid camel caps format Open
$my_score = 0 == $score ? [] : $score;
- Exclude checks
Variable "my_score" is not in valid camel caps format Open
$my_score[0] = 0;
- Exclude checks
Method name "ScoreDisplay::get_custom_displays" is not in camel caps format Open
private function get_custom_displays($category_id = null)
- Exclude checks
Variable "custom_display" is not in valid camel caps format Open
$this->custom_display = $this->get_custom_displays();
- Exclude checks
Variable "custom_display_conv" is not in valid camel caps format Open
$this->custom_display_conv = $this->convert_displays($this->custom_display);
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$category_id = (int) $category_id;
- Exclude checks
Variable "tbl_display" is not in valid camel caps format Open
$sql = 'SELECT * FROM '.$tbl_display.'
- Exclude checks
Variable "custom_display" is not in valid camel caps format Open
$this->custom_display = $portal_displays;
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
'category_id' => $category_id,
- Exclude checks
Variable "my_score" is not in valid camel caps format Open
$percentage = $my_score[0] / $my_score[1] * 100;
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
if (isset($category_id)) {
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$category_id = (int) $category_id;
- Exclude checks
Variable "portal_displays" is not in valid camel caps format Open
$portal_displays = [];
- Exclude checks
Variable "portal_displays" is not in valid camel caps format Open
sort($portal_displays);
- Exclude checks
Variable "custom_display_conv" is not in valid camel caps format Open
$this->custom_display_conv = $this->convert_displays($this->custom_display);
- Exclude checks
Variable "custom_display" is not in valid camel caps format Open
return $this->custom_display;
- Exclude checks
Variable "color_split_value" is not in valid camel caps format Open
return $this->color_split_value;
- Exclude checks
Variable "custom_display_conv" is not in valid camel caps format Open
if ($this->custom_enabled && isset($this->custom_display_conv)) {
- Exclude checks
Variable "my_score" is not in valid camel caps format Open
$display = $this->displayDefault($my_score, $type, $ignoreDecimals, $removeEmptyDecimals);
- Exclude checks
Variable "coloring_enabled" is not in valid camel caps format Open
if ($this->coloring_enabled && false == $disableColor) {
- Exclude checks
Variable "custom_enabled" is not in valid camel caps format Open
if ($this->custom_enabled) {
- Exclude checks
Variable "number_decimals" is not in valid camel caps format Open
$number_decimals = 0;
- Exclude checks
Variable "my_score" is not in valid camel caps format Open
$percentage = $my_score[0] / $my_score[1] * 100;
- Exclude checks
Variable "color_split_value" is not in valid camel caps format Open
if (($scoreCleaned / $denom) < ($this->color_split_value / 100)) {
- Exclude checks
Variable "custom_display_conv" is not in valid camel caps format Open
foreach ($this->custom_display_conv as $displayitem) {
- Exclude checks
Variable "custom_display_conv" is not in valid camel caps format Open
foreach ($this->custom_display_conv as $displayitem) {
- Exclude checks
Method name "ScoreDisplay::display_as_decimal" is not in camel caps format Open
private function display_as_decimal($score)
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
private function get_score_color_percent($category_id = null)
- Exclude checks
Variable "tbl_display" is not in valid camel caps format Open
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$category_id = (int) $category_id;
- Exclude checks
Method name "ScoreDisplay::convert_displays" is not in camel caps format Open
private function convert_displays($custom_display)
- Exclude checks
Variable "custom_display" is not in valid camel caps format Open
if (isset($custom_display)) {
- Exclude checks
Method name "ScoreDisplay::compare_scores_by_custom_display" is not in camel caps format Open
public static function compare_scores_by_custom_display($score1, $score2)
- Exclude checks
Method name "ScoreDisplay::get_color_split_value" is not in camel caps format Open
public function get_color_split_value()
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$category_id = (int) $category_id;
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
private function get_custom_displays($category_id = null)
- Exclude checks
Variable "tbl_display" is not in valid camel caps format Open
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$category_id = (int) $category_id;
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
public function __construct($category_id = 0)
- Exclude checks
Variable "coloring_enabled" is not in valid camel caps format Open
if ($this->coloring_enabled) {
- Exclude checks
Variable "upperlimit_included" is not in valid camel caps format Open
return $this->upperlimit_included;
- Exclude checks
Variable "my_score" is not in valid camel caps format Open
$percentage = $my_score[0] / $my_score[1] * 100;
- Exclude checks
Variable "my_score" is not in valid camel caps format Open
return $this->format_score($my_score[0], $ignoreDecimals);
- Exclude checks
Method name "ScoreDisplay::display_as_percent" is not in camel caps format Open
private function display_as_percent($score)
- Exclude checks
Variable "custom_display" is not in valid camel caps format Open
private function convert_displays($custom_display)
- Exclude checks
Variable "custom_display" is not in valid camel caps format Open
$this->custom_display_conv = $this->convert_displays($this->custom_display);
- Exclude checks
Variable "custom_display" is not in valid camel caps format Open
$this->custom_display = $displays;
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
if (empty($category_id)) {
- Exclude checks
Variable "custom_display_conv" is not in valid camel caps format Open
if (!empty($this->custom_display_conv)) {
- Exclude checks
Method name "ScoreDisplay::display_simple_score" is not in camel caps format Open
private function display_simple_score($score)
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
WHERE category_id = '.$category_id.'
- Exclude checks
Variable "coloring_enabled" is not in valid camel caps format Open
if ($this->coloring_enabled) {
- Exclude checks
Method name "ScoreDisplay::is_coloring_enabled" is not in camel caps format Open
public function is_coloring_enabled()
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
public function insert_defaults($category_id)
- Exclude checks
Variable "number_decimals" is not in valid camel caps format Open
$number_decimals = api_get_setting('gradebook_number_decimals');
- Exclude checks
Variable "custom_enabled" is not in valid camel caps format Open
if ($this->custom_enabled && isset($this->custom_display_conv)) {
- Exclude checks
Variable "score_denom" is not in valid camel caps format Open
return $this->format_score($score[0] / $score_denom);
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$category_id = $this->get_current_gradebook_category_id();
- Exclude checks
Variable "custom_enabled" is not in valid camel caps format Open
$this->custom_enabled = 'true' == $value ? true : false;
- Exclude checks
Method name "ScoreDisplay::is_custom" is not in camel caps format Open
public function is_custom()
- Exclude checks
Method name "ScoreDisplay::is_upperlimit_included" is not in camel caps format Open
public function is_upperlimit_included()
- Exclude checks
Variable "my_score" is not in valid camel caps format Open
$display = $this->displayDefault($my_score, $type, $ignoreDecimals, $removeEmptyDecimals);
- Exclude checks
Method name "ScoreDisplay::display_as_div" is not in camel caps format Open
private function display_as_div($score, $ignoreDecimals = false, $removeEmptyDecimals = false)
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$category_id = (int) $category_id;
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$this->category_id = $category_id;
- Exclude checks
Variable "custom_display" is not in valid camel caps format Open
if (count($this->custom_display) > 0) {
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$sql = 'DELETE FROM '.$table.' WHERE category_id = '.$category_id;
- Exclude checks
Variable "my_score" is not in valid camel caps format Open
if (!isset($my_score[0])) {
- Exclude checks
Variable "score_denom" is not in valid camel caps format Open
$score_denom = (0 == $score[1]) ? 1 : $score[1];
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
if (isset($category_id)) {
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$this->category_id = $category_id;
- Exclude checks
Variable "custom_display" is not in valid camel caps format Open
$this->custom_display_conv = $this->convert_displays($this->custom_display);
- Exclude checks
Expected 34 spaces after parameter type; 1 found Open
* @param array $displays 2-dimensional array - every sub array must have keys (score, display)
- Exclude checks
Missing parameter name Open
* @param int score color percent (optional)
- Exclude checks
Variable "custom_display" is not in valid camel caps format Open
$this->custom_display_conv = $this->convert_displays($this->custom_display);
- Exclude checks
Variable "number_decimals" is not in valid camel caps format Open
return $number_decimals;
- Exclude checks
Missing function doc comment Open
public static function hasEmptyDecimals($score)
- Exclude checks
Method name "ScoreDisplay::display_custom" is not in camel caps format Open
public function display_custom($score)
- Exclude checks
Method name "ScoreDisplay::get_current_gradebook_category_id" is not in camel caps format Open
private function get_current_gradebook_category_id()
- Exclude checks
Variable "portal_displays" is not in valid camel caps format Open
$portal_displays[$data[0]] = [
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$category_id = null
- Exclude checks
Variable "custom_display_conv" is not in valid camel caps format Open
$this->custom_display_conv = $this->convert_displays($this->custom_display);
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$category_id = $this->get_current_gradebook_category_id();
- Exclude checks
Variable "number_decimals" is not in valid camel caps format Open
if (!isset($number_decimals)) {
- Exclude checks
Method name "ScoreDisplay::sort_display" is not in camel caps format Open
private function sort_display($item1, $item2)
- Exclude checks
The variable $portal_displays is not named in camelCase. Open
public function __construct($category_id = 0)
{
if (!empty($category_id)) {
$this->category_id = $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 $my_score is not named in camelCase. Open
public function display_score(
$score,
$type = SCORE_DIV_PERCENT,
$what = SCORE_BOTH,
$disableColor = 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 $category_id is not named in camelCase. Open
public function updateCustomScoreDisplaySettings(
$displays,
$scorecolpercent = 0,
$category_id = null
) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $portal_displays is not named in camelCase. Open
public function __construct($category_id = 0)
{
if (!empty($category_id)) {
$this->category_id = $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
public function insert_defaults($category_id)
{
if (empty($category_id)) {
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 $score_denom is not named in camelCase. Open
private function display_as_decimal($score)
{
$score_denom = (0 == $score[1]) ? 1 : $score[1];
return $this->format_score($score[0] / $score_denom);
- 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 $score_denom is not named in camelCase. Open
private function display_as_decimal($score)
{
$score_denom = (0 == $score[1]) ? 1 : $score[1];
return $this->format_score($score[0] / $score_denom);
- 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 $my_score is not named in camelCase. Open
public function display_score(
$score,
$type = SCORE_DIV_PERCENT,
$what = SCORE_BOTH,
$disableColor = 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 $my_score is not named in camelCase. Open
public function display_score(
$score,
$type = SCORE_DIV_PERCENT,
$what = SCORE_BOTH,
$disableColor = 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 $my_score is not named in camelCase. Open
public function display_score(
$score,
$type = SCORE_DIV_PERCENT,
$what = SCORE_BOTH,
$disableColor = 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 $my_score is not named in camelCase. Open
public function display_score(
$score,
$type = SCORE_DIV_PERCENT,
$what = SCORE_BOTH,
$disableColor = 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 $category_id is not named in camelCase. Open
public function __construct($category_id = 0)
{
if (!empty($category_id)) {
$this->category_id = $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 $portal_displays is not named in camelCase. Open
public function __construct($category_id = 0)
{
if (!empty($category_id)) {
$this->category_id = $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 $portal_displays is not named in camelCase. Open
public function __construct($category_id = 0)
{
if (!empty($category_id)) {
$this->category_id = $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 $number_decimals is not named in camelCase. Open
public function get_number_decimals()
{
$number_decimals = api_get_setting('gradebook_number_decimals');
if (!isset($number_decimals)) {
$number_decimals = 0;
- 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 $my_score is not named in camelCase. Open
public function display_score(
$score,
$type = SCORE_DIV_PERCENT,
$what = SCORE_BOTH,
$disableColor = 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 $my_score is not named in camelCase. Open
public function display_score(
$score,
$type = SCORE_DIV_PERCENT,
$what = SCORE_BOTH,
$disableColor = 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 $category_id is not named in camelCase. Open
public function __construct($category_id = 0)
{
if (!empty($category_id)) {
$this->category_id = $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
public function updateCustomScoreDisplaySettings(
$displays,
$scorecolpercent = 0,
$category_id = null
) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $category_id is not named in camelCase. Open
public function updateCustomScoreDisplaySettings(
$displays,
$scorecolpercent = 0,
$category_id = null
) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $category_id is not named in camelCase. Open
public function updateCustomScoreDisplaySettings(
$displays,
$scorecolpercent = 0,
$category_id = null
) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $number_decimals is not named in camelCase. Open
public function get_number_decimals()
{
$number_decimals = api_get_setting('gradebook_number_decimals');
if (!isset($number_decimals)) {
$number_decimals = 0;
- 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 $my_score is not named in camelCase. Open
public function display_score(
$score,
$type = SCORE_DIV_PERCENT,
$what = SCORE_BOTH,
$disableColor = 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 $category_id is not named in camelCase. Open
public function updateCustomScoreDisplaySettings(
$displays,
$scorecolpercent = 0,
$category_id = null
) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $number_decimals is not named in camelCase. Open
public function get_number_decimals()
{
$number_decimals = api_get_setting('gradebook_number_decimals');
if (!isset($number_decimals)) {
$number_decimals = 0;
- 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 $my_score is not named in camelCase. Open
public function display_score(
$score,
$type = SCORE_DIV_PERCENT,
$what = SCORE_BOTH,
$disableColor = 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 $category_id is not named in camelCase. Open
public function updateCustomScoreDisplaySettings(
$displays,
$scorecolpercent = 0,
$category_id = null
) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $category_id is not named in camelCase. Open
public function insert_defaults($category_id)
{
if (empty($category_id)) {
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 $number_decimals is not named in camelCase. Open
public function get_number_decimals()
{
$number_decimals = api_get_setting('gradebook_number_decimals');
if (!isset($number_decimals)) {
$number_decimals = 0;
- 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 $my_score is not named in camelCase. Open
public function display_score(
$score,
$type = SCORE_DIV_PERCENT,
$what = SCORE_BOTH,
$disableColor = 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 $category_id is not named in camelCase. Open
private function get_score_color_percent($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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 $tbl_display is not named in camelCase. Open
private function get_score_color_percent($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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_custom_displays($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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_score_color_percent($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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_score_color_percent($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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_custom_displays($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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 $tbl_display is not named in camelCase. Open
private function get_score_color_percent($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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_score_color_percent($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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_custom_displays($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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 $custom_display is not named in camelCase. Open
private function convert_displays($custom_display)
{
if (isset($custom_display)) {
// get highest score entry, and copy each element to a new array
$converted = [];
- 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_custom_displays($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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 $custom_display is not named in camelCase. Open
private function convert_displays($custom_display)
{
if (isset($custom_display)) {
// get highest score entry, and copy each element to a new array
$converted = [];
- 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_display is not named in camelCase. Open
private function get_custom_displays($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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_score_color_percent($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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 $tbl_display is not named in camelCase. Open
private function get_custom_displays($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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_custom_displays($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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 method get_current_gradebook_category_id is not named in camelCase. Open
private function get_current_gradebook_category_id()
{
$table = Database::get_main_table(TABLE_MAIN_GRADEBOOK_CATEGORY);
$courseId = api_get_course_int_id();
$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 display_simple_score is not named in camelCase. Open
private function display_simple_score($score)
{
if (isset($score[0])) {
return $this->format_score($score[0]);
}
- 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 format_score is not named in camelCase. Open
public function format_score(
$score,
$ignoreDecimals = false,
$decimalSeparator = '.',
$thousandSeparator = ',',
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method is_coloring_enabled is not named in camelCase. Open
public function is_coloring_enabled()
{
return $this->coloring_enabled;
}
- 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_custom_score_display_settings is not named in camelCase. Open
public function get_custom_score_display_settings()
{
return $this->custom_display;
}
- 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 insert_defaults is not named in camelCase. Open
public function insert_defaults($category_id)
{
if (empty($category_id)) {
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 compare_scores_by_custom_display is not named in camelCase. Open
public static function compare_scores_by_custom_display($score1, $score2)
{
if (!isset($score1)) {
return isset($score2) ? 1 : 0;
}
- 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_as_decimal is not named in camelCase. Open
private function display_as_decimal($score)
{
$score_denom = (0 == $score[1]) ? 1 : $score[1];
return $this->format_score($score[0] / $score_denom);
- 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_decimals is not named in camelCase. Open
public function get_number_decimals()
{
$number_decimals = api_get_setting('gradebook_number_decimals');
if (!isset($number_decimals)) {
$number_decimals = 0;
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method is_custom is not named in camelCase. Open
public function is_custom()
{
return $this->custom_enabled;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method is_upperlimit_included is not named in camelCase. Open
public function is_upperlimit_included()
{
return $this->upperlimit_included;
}
- 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_color_split_value is not named in camelCase. Open
public function get_color_split_value()
{
return $this->color_split_value;
}
- 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_score is not named in camelCase. Open
public function display_score(
$score,
$type = SCORE_DIV_PERCENT,
$what = SCORE_BOTH,
$disableColor = 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 display_custom is not named in camelCase. Open
public function display_custom($score)
{
if (empty($score)) {
return null;
}
- 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_as_div is not named in camelCase. Open
private function display_as_div($score, $ignoreDecimals = false, $removeEmptyDecimals = false)
{
if (1 == $score) {
return '0 / 0';
}
- 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_custom_displays is not named in camelCase. Open
private function get_custom_displays($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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_display is not named in camelCase. Open
private function sort_display($item1, $item2)
{
if ($item1['score'] === $item2['score']) {
return 0;
} 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 display_as_percent is not named in camelCase. Open
private function display_as_percent($score)
{
if (empty($score)) {
return null;
}
- 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 convert_displays is not named in camelCase. Open
private function convert_displays($custom_display)
{
if (isset($custom_display)) {
// get highest score entry, and copy each element to a new array
$converted = [];
- 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_score_color_percent is not named in camelCase. Open
private function get_score_color_percent($category_id = null)
{
$tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY);
if (isset($category_id)) {
$category_id = (int) $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() {
}
}