The method load() has an NPath complexity of 1152. The configured NPath complexity threshold is 200. Open
public static function load(
?int $id = 0,
?int $userId = 0,
?int $courseId = 0,
?int $categoryId = 0,
- 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 calc_score() has an NPath complexity of 3825. The configured NPath complexity threshold is 200. Open
public function calc_score($studentId = null, $type = null): array
{
$allowStats = ('true' === api_get_setting('gradebook.allow_gradebook_stats'));
if ($allowStats) {
- 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 '422', column '25'). Open
$eval_log = new Evaluation();
- 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 '364', column '25'). Open
$eval = new Evaluation();
- 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 '966', column '29'). Open
$eval = new Evaluation();
- 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 load uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sql .= ' WHERE';
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method does_name_exist uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sql .= ' AND user_id = '.api_get_user_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 load uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sql .= ' WHERE';
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method does_name_exist uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sql .= ' AND category_id = '.intval($parent);
}
- 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 uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sql .= '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 setCourseId uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->course_code = null;
$this->courseId = 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 save uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sql .= '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 calc_score uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$count = 0;
$sum = 0;
$bestResult = 0;
$weight = 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 does_name_exist uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sql .= ' AND user_id = '.api_get_user_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 load uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sql .= ' WHERE';
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method load uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sql .= ' WHERE';
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method get_evaluations_with_result_for_student uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sql .= ' AND category_id >= 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 save uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sql .= '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 load uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sql .= ' WHERE';
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method check_lock_permissions uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if ($this->is_locked()) {
api_not_allowed();
}
}
- 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 calc_score uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$studentCount = count($evaluation->getUserScoreList());
$sumResult = array_sum($evaluation->getUserScoreList());
$result = [$sumResult, $studentCount];
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The parameter $name_mask is not named in camelCase. Open
public static function findEvaluations($name_mask, $selectcat)
{
$rootcat = Category::load($selectcat);
$evals = $rootcat[0]->get_evaluations(
(api_is_allowed_to_create_course() ? null : api_get_user_id()),
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The property $user_id is not named in camelCase. Open
class Evaluation implements GradebookItem
{
public $studentList;
public GradebookEvaluation $entity;
private int $id;
- 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 $course_code is not named in camelCase. Open
class Evaluation implements GradebookItem
{
public $studentList;
public GradebookEvaluation $entity;
private int $id;
- 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 set_category_id($category_id)
{
$categories = Category::load($category_id);
if (isset($categories[0])) {
$this->setCategory($categories[0]);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $user_id is not named in camelCase. Open
public function set_user_id($user_id)
{
$this->user_id = $user_id;
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $cat_id is not named in camelCase. Open
public static function get_evaluations_with_result_for_student(int $stud_id, ?int $cat_id = null): array
{
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_results = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- 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 $eval_max is not named in camelCase. Open
class Evaluation implements GradebookItem
{
public $studentList;
public GradebookEvaluation $entity;
private int $id;
- 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 $stud_id is not named in camelCase. Open
public static function get_evaluations_with_result_for_student(int $stud_id, ?int $cat_id = null): array
{
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_results = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- 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 $created_at is not named in camelCase. Open
class Evaluation implements GradebookItem
{
public $studentList;
public GradebookEvaluation $entity;
private int $id;
- 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 $first_letter_user is not named in camelCase. Open
public function get_not_subscribed_students($first_letter_user = '')
{
$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
$table = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- 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
Member variable "created_at" is not in valid camel caps format Open
private string $created_at;
- Exclude checks
Method name "Evaluation::set_name" is not in camel caps format Open
public function set_name($name)
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$this->user_id = $user_id;
- Exclude checks
Method name "Evaluation::set_date" is not in camel caps format Open
public function set_date($date)
- Exclude checks
Method name "Evaluation::set_locked" is not in camel caps format Open
public function set_locked($locked)
- Exclude checks
Expected 5 spaces after parameter name; 2 found Open
* @param ?int $locked Whether it is locked or not
- Exclude checks
Method name "Evaluation::does_name_exist" is not in camel caps format Open
public function does_name_exist($name, $parent)
- Exclude checks
Method name "Evaluation::has_results" is not in camel caps format Open
public function has_results(): bool
- Exclude checks
Variable "cat_id" is not in valid camel caps format Open
if (isset($cat_id)) {
- Exclude checks
Variable "first_letter_user" is not in valid camel caps format Open
public function get_not_subscribed_students($first_letter_user = '')
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$categories = Category::load($category_id);
- Exclude checks
Missing function doc comment Open
public function get_user_id()
- Exclude checks
Method name "Evaluation::set_session_id" is not in camel caps format Open
public function set_session_id($sessionId)
- Exclude checks
Expected 1 spaces after parameter type; 2 found Open
* @param ?int $locked Whether it is locked or not
- Exclude checks
Variable "tbl_grade_evaluations" is not in valid camel caps format Open
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
- Exclude checks
Method name "Evaluation::get_icon_name" is not in camel caps format Open
public function get_icon_name()
- Exclude checks
Missing parameter name Open
* @param int locked 1 or unlocked 0
- Exclude checks
Method name "Evaluation::check_lock_permissions" is not in camel caps format Open
public function check_lock_permissions()
- Exclude checks
Variable "eval_max" is not in valid camel caps format Open
isset($this->eval_max) &&
- Exclude checks
Expected 17 spaces after parameter type; 1 found Open
* @param string $name to check (if not given, the name property of this object will be checked)
- Exclude checks
Method name "Evaluation::move_to_cat" is not in camel caps format Open
public function move_to_cat(GradebookCategory $cat)
- Exclude checks
Variable "cat_id" is not in valid camel caps format Open
public static function get_evaluations_with_result_for_student(int $stud_id, ?int $cat_id = null): array
- Exclude checks
Variable "tbl_grade_evaluations" is not in valid camel caps format Open
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
- Exclude checks
Variable "tbl_grade_results" is not in valid camel caps format Open
SELECT evaluation_id FROM '.$tbl_grade_results.'
- Exclude checks
Method name "Evaluation::get_not_subscribed_students" is not in camel caps format Open
public function get_not_subscribed_students($first_letter_user = '')
- Exclude checks
Variable "name_mask" is not in valid camel caps format Open
public static function findEvaluations($name_mask, $selectcat)
- Exclude checks
Variable "course_code" is not in valid camel caps format Open
$this->course_code = null;
- Exclude checks
Method name "Evaluation::create_evaluation_objects_from_sql_result" is not in camel caps format Open
private static function create_evaluation_objects_from_sql_result($result)
- Exclude checks
Missing function doc comment Open
public function get_course_code()
- Exclude checks
Missing function doc comment Open
public function get_date()
- Exclude checks
Method name "Evaluation::get_date" is not in camel caps format Open
public function get_date()
- Exclude checks
Method name "Evaluation::get_locked" is not in camel caps format Open
public function get_locked()
- Exclude checks
Missing function doc comment Open
public function set_visible($visible)
- Exclude checks
Missing function doc comment Open
public function set_session_id($sessionId)
- Exclude checks
Expected 1 spaces after parameter type; 2 found Open
* @param ?int $categoryId parent category
- Exclude checks
Variable "row_old_weight" is not in valid camel caps format Open
'weight' => $row_old_weight['weight'],
- Exclude checks
Variable "eval_log" is not in valid camel caps format Open
$eval_log = new Evaluation();
- Exclude checks
Method name "Evaluation::delete_results" is not in camel caps format Open
public function delete_results(): void
- Exclude checks
Method name "Evaluation::delete_with_results" is not in camel caps format Open
public function delete_with_results(): void
- Exclude checks
Method name "Evaluation::calc_score" is not in camel caps format Open
public function calc_score($studentId = null, $type = null): array
- Exclude checks
Variable "stud_id" is not in valid camel caps format Open
public static function get_evaluations_with_result_for_student(int $stud_id, ?int $cat_id = null): array
- Exclude checks
Missing function doc comment Open
public function get_item_type()
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$this->user_id = $user_id;
- Exclude checks
Missing function doc comment Open
public function set_weight($weight)
- Exclude checks
Missing function doc comment Open
public function set_max($max)
- Exclude checks
Variable "tbl_grade_linkeval_log" is not in valid camel caps format Open
$tbl_grade_linkeval_log = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
- Exclude checks
Variable "row_old_weight" is not in valid camel caps format Open
$row_old_weight = Database::fetch_assoc($rs);
- Exclude checks
Variable "first_letter_user" is not in valid camel caps format Open
lastname LIKE '".Database::escape_string($first_letter_user)."%' AND
- Exclude checks
Variable "name_mask" is not in valid camel caps format Open
if (!(false === api_strpos(api_strtolower($eval->get_name()), api_strtolower($name_mask)))) {
- Exclude checks
Member variable "course_code" is not in valid camel caps format Open
private ?string $course_code;
- Exclude checks
Variable "created_at" is not in valid camel caps format Open
$this->created_at = $date;
- Exclude checks
Method name "Evaluation::set_type" is not in camel caps format Open
public function set_type($type)
- Exclude checks
Expected 9 spaces after parameter name; 1 found Open
* @param ?int $id evaluation id
- Exclude checks
Variable "tbl_grade_evaluations" is not in valid camel caps format Open
$sql = 'SELECT weight from '.$tbl_grade_evaluations.'
- Exclude checks
Variable "current_date" is not in valid camel caps format Open
'created_at' => $current_date,
- Exclude checks
Variable "tbl_grade_evaluations" is not in valid camel caps format Open
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
- Exclude checks
Method name "Evaluation::get_evaluations_with_result_for_student" is not in camel caps format Open
public static function get_evaluations_with_result_for_student(int $stud_id, ?int $cat_id = null): array
- Exclude checks
Variable "stud_id" is not in valid camel caps format Open
WHERE user_id = '.$stud_id.' AND score IS NOT NULL
- Exclude checks
Variable "tbl_user" is not in valid camel caps format Open
$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
- Exclude checks
Variable "course_code" is not in valid camel caps format Open
$this->course_code = $courseInfo['code'];
- Exclude checks
Method name "Evaluation::get_category_id" is not in camel caps format Open
public function get_category_id()
- Exclude checks
Method name "Evaluation::get_description" is not in camel caps format Open
public function get_description()
- Exclude checks
Variable "created_at" is not in valid camel caps format Open
return $this->created_at;
- Exclude checks
Variable "eval_max" is not in valid camel caps format Open
return $this->eval_max;
- Exclude checks
Method name "Evaluation::is_visible" is not in camel caps format Open
public function is_visible()
- Exclude checks
Missing function doc comment Open
public function is_locked()
- Exclude checks
Method name "Evaluation::set_user_id" is not in camel caps format Open
public function set_user_id($user_id)
- Exclude checks
Missing function doc comment Open
public function set_date($date)
- Exclude checks
Method name "Evaluation::set_weight" is not in camel caps format Open
public function set_weight($weight)
- Exclude checks
Variable "tbl_grade_evaluations" is not in valid camel caps format Open
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
- Exclude checks
Method name "Evaluation::get_target_categories" is not in camel caps format Open
public function get_target_categories(): array
- Exclude checks
Missing function doc comment Open
public function get_icon_name()
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
public function set_category_id($category_id)
- Exclude checks
Method name "Evaluation::get_name" is not in camel caps format Open
public function get_name()
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
public function set_user_id($user_id)
- Exclude checks
Variable "tbl_grade_evaluations" is not in valid camel caps format Open
FROM $tbl_grade_evaluations
- Exclude checks
Variable "eval_max" is not in valid camel caps format Open
return is_numeric($score) && $score >= 0 && $score <= $this->eval_max;
- Exclude checks
Method name "Evaluation::get_item_type" is not in camel caps format Open
public function get_item_type()
- Exclude checks
Variable "table_evaluation" is not in valid camel caps format Open
$sql = "UPDATE $table_evaluation
- Exclude checks
Missing function doc comment Open
public function delete_linked_data()
- Exclude checks
Method name "Evaluation::get_user_id" is not in camel caps format Open
public function get_user_id()
- Exclude checks
Method name "Evaluation::set_id" is not in camel caps format Open
public function set_id($id)
- Exclude checks
Method name "Evaluation::set_description" is not in camel caps format Open
public function set_description($description)
- Exclude checks
Expected 1 spaces after parameter type; 2 found Open
* @param ?int $visible Whether it is visible or not
- Exclude checks
Missing parameter name Open
* @param $parent parent category
- Exclude checks
Missing function doc comment Open
public function check_lock_permissions()
- Exclude checks
Missing function doc comment Open
public function get_max()
- Exclude checks
Method name "Evaluation::is_locked" is not in camel caps format Open
public function is_locked()
- Exclude checks
Method name "Evaluation::set_category_id" is not in camel caps format Open
public function set_category_id($category_id)
- Exclude checks
Missing function doc comment Open
public function set_description($description)
- Exclude checks
Expected 5 spaces after parameter name; 1 found Open
* @param ?int $userId user id (evaluation owner)
- Exclude checks
Method name "Evaluation::get_id" is not in camel caps format Open
public function get_id()
- Exclude checks
Variable "tbl_grade_evaluations" is not in valid camel caps format Open
$sql = 'SELECT * FROM '.$tbl_grade_evaluations.'
- Exclude checks
Method name "Evaluation::get_course_code" is not in camel caps format Open
public function get_course_code()
- Exclude checks
Variable "cat_id" is not in valid camel caps format Open
$sql .= ' AND category_id = '.$cat_id;
- Exclude checks
Variable "course_code" is not in valid camel caps format Open
return $this->course_code;
- Exclude checks
Method name "Evaluation::get_weight" is not in camel caps format Open
public function get_weight()
- Exclude checks
Missing function doc comment Open
public function get_type()
- Exclude checks
Variable "eval_max" is not in valid camel caps format Open
$this->eval_max = $max;
- Exclude checks
Missing function doc comment Open
public function set_type($type)
- Exclude checks
Blank line found at start of control structure Open
) {
- Exclude checks
Variable "current_date" is not in valid camel caps format Open
$current_date = api_get_utc_datetime();
- Exclude checks
Variable "tbl_grade_results" is not in valid camel caps format Open
$tbl_grade_results = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- Exclude checks
Method name "Evaluation::get_max" is not in camel caps format Open
public function get_max()
- Exclude checks
Method name "Evaluation::get_type" is not in camel caps format Open
public function get_type()
- Exclude checks
Missing function doc comment Open
public function get_locked()
- Exclude checks
Missing function doc comment Open
public function getCourseId()
- Exclude checks
Variable "tbl_grade_evaluations" is not in valid camel caps format Open
$sql = 'UPDATE '.$tbl_grade_evaluations
- Exclude checks
Missing parameter name Open
* @param $list
- Exclude checks
Missing function doc comment Open
public function get_weight()
- Exclude checks
Missing function doc comment Open
public function is_visible()
- Exclude checks
Method name "Evaluation::set_visible" is not in camel caps format Open
public function set_visible($visible)
- Exclude checks
Variable "tbl_grade_linkeval_log" is not in valid camel caps format Open
Database::insert($tbl_grade_linkeval_log, $params);
- Exclude checks
Variable "tbl_user" is not in valid camel caps format Open
FROM $tbl_user
- Exclude checks
Method name "Evaluation::delete_linked_data" is not in camel caps format Open
public function delete_linked_data()
- Exclude checks
Member variable "user_id" is not in valid camel caps format Open
private int $user_id;
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
return $this->user_id;
- Exclude checks
Missing function doc comment Open
public function set_id($id)
- Exclude checks
Missing function doc comment Open
public function set_name($name)
- Exclude checks
Missing function doc comment Open
public function set_user_id($user_id)
- Exclude checks
Method name "Evaluation::set_max" is not in camel caps format Open
public function set_max($max)
- Exclude checks
Expected 3 spaces after parameter name; 1 found Open
* @param ?int $courseId course code
- Exclude checks
Expected 2 spaces after parameter name; 1 found Open
* @param ?int $cat_id parent category (use 'null' to retrieve them in all categories)
- Exclude checks
Missing function doc comment Open
public function set_locked($locked)
- Exclude checks
Expected 4 spaces after parameter name; 1 found Open
* @param ?int $visible Whether it is visible or not
- Exclude checks
Variable "eval_log" is not in valid camel caps format Open
$eval_log->addEvaluationLog($this->id);
- Exclude checks
Method name "Evaluation::is_valid_score" is not in camel caps format Open
public function is_valid_score(mixed $score): bool
- Exclude checks
Variable "table_evaluation" is not in valid camel caps format Open
$table_evaluation = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
- Exclude checks
The variable $current_date is not named in camelCase. Open
public function addEvaluationLog($id)
{
if (!empty($id)) {
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_linkeval_log = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
- 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_grade_evaluations is not named in camelCase. Open
public function save()
{
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$sql = 'UPDATE '.$tbl_grade_evaluations
." SET title = '".Database::escape_string($this->get_name())."'"
- 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 $first_letter_user is not named in camelCase. Open
public function get_not_subscribed_students($first_letter_user = '')
{
$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
$table = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $table_evaluation is not named in camelCase. Open
public function lock($locked)
{
$table_evaluation = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$sql = "UPDATE $table_evaluation
SET locked = '".intval($locked)."'
- 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_grade_evaluations is not named in camelCase. Open
public function addEvaluationLog($id)
{
if (!empty($id)) {
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_linkeval_log = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
- 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_grade_evaluations is not named in camelCase. Open
public function does_name_exist($name, $parent)
{
if (!isset($name)) {
$name = $this->name;
$parent = $this->category;
- 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 $row_old_weight is not named in camelCase. Open
public function addEvaluationLog($id)
{
if (!empty($id)) {
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_linkeval_log = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
- 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 $row_old_weight is not named in camelCase. Open
public function addEvaluationLog($id)
{
if (!empty($id)) {
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_linkeval_log = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
- 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_grade_evaluations is not named in camelCase. Open
public static function get_evaluations_with_result_for_student(int $stud_id, ?int $cat_id = null): array
{
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_results = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- 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_grade_evaluations is not named in camelCase. Open
public static function get_evaluations_with_result_for_student(int $stud_id, ?int $cat_id = null): array
{
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_results = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- 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_grade_linkeval_log is not named in camelCase. Open
public function addEvaluationLog($id)
{
if (!empty($id)) {
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_linkeval_log = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
- 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_grade_evaluations is not named in camelCase. Open
public function does_name_exist($name, $parent)
{
if (!isset($name)) {
$name = $this->name;
$parent = $this->category;
- 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 $stud_id is not named in camelCase. Open
public static function get_evaluations_with_result_for_student(int $stud_id, ?int $cat_id = null): array
{
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_results = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- 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_grade_linkeval_log is not named in camelCase. Open
public function addEvaluationLog($id)
{
if (!empty($id)) {
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_linkeval_log = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
- 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 $eval_log is not named in camelCase. Open
public function save()
{
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$sql = 'UPDATE '.$tbl_grade_evaluations
." SET title = '".Database::escape_string($this->get_name())."'"
- 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_date is not named in camelCase. Open
public function addEvaluationLog($id)
{
if (!empty($id)) {
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_linkeval_log = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
- 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_user is not named in camelCase. Open
public function get_not_subscribed_students($first_letter_user = '')
{
$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
$table = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- 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_grade_results is not named in camelCase. Open
public static function get_evaluations_with_result_for_student(int $stud_id, ?int $cat_id = null): array
{
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_results = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- 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_grade_results is not named in camelCase. Open
public static function get_evaluations_with_result_for_student(int $stud_id, ?int $cat_id = null): array
{
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_results = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- 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 $name_mask is not named in camelCase. Open
public static function findEvaluations($name_mask, $selectcat)
{
$rootcat = Category::load($selectcat);
$evals = $rootcat[0]->get_evaluations(
(api_is_allowed_to_create_course() ? null : api_get_user_id()),
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tbl_grade_evaluations is not named in camelCase. Open
public function addEvaluationLog($id)
{
if (!empty($id)) {
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_linkeval_log = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
- 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_grade_evaluations is not named in camelCase. Open
public function save()
{
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$sql = 'UPDATE '.$tbl_grade_evaluations
." SET title = '".Database::escape_string($this->get_name())."'"
- 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 $eval_log is not named in camelCase. Open
public function save()
{
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$sql = 'UPDATE '.$tbl_grade_evaluations
." SET title = '".Database::escape_string($this->get_name())."'"
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $table_evaluation is not named in camelCase. Open
public function lock($locked)
{
$table_evaluation = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$sql = "UPDATE $table_evaluation
SET locked = '".intval($locked)."'
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function set_user_id($user_id)
{
$this->user_id = $user_id;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $cat_id is not named in camelCase. Open
public static function get_evaluations_with_result_for_student(int $stud_id, ?int $cat_id = null): array
{
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_results = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- 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 set_category_id($category_id)
{
$categories = Category::load($category_id);
if (isset($categories[0])) {
$this->setCategory($categories[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 $tbl_user is not named in camelCase. Open
public function get_not_subscribed_students($first_letter_user = '')
{
$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
$table = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- 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 $cat_id is not named in camelCase. Open
public static function get_evaluations_with_result_for_student(int $stud_id, ?int $cat_id = null): array
{
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_results = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- 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 is_visible is not named in camelCase. Open
public function is_visible()
{
return $this->visible;
}
- 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 set_user_id is not named in camelCase. Open
public function set_user_id($user_id)
{
$this->user_id = $user_id;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method delete_results is not named in camelCase. Open
public function delete_results(): void
{
$table = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
$sql = 'DELETE FROM '.$table.'
WHERE evaluation_id = '.$this->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_not_subscribed_students is not named in camelCase. Open
public function get_not_subscribed_students($first_letter_user = '')
{
$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
$table = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- 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_item_type is not named in camelCase. Open
public function get_item_type()
{
return 'E';
}
- 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_id is not named in camelCase. Open
public function get_id()
{
return (int) $this->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 set_weight is not named in camelCase. Open
public function set_weight($weight)
{
$this->weight = $weight;
}
- 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_icon_name is not named in camelCase. Open
public function get_icon_name()
{
return $this->has_results() ? 'evalnotempty' : 'evalempty';
}
- 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 set_category_id is not named in camelCase. Open
public function set_category_id($category_id)
{
$categories = Category::load($category_id);
if (isset($categories[0])) {
$this->setCategory($categories[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 move_to_cat is not named in camelCase. Open
public function move_to_cat(GradebookCategory $cat)
{
$this->set_category_id($cat->getId());
$categoryCourseId = $cat->getCourse()->getId();
if ($this->getCourseId() != $categoryCourseId) {
- 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 set_name is not named in camelCase. Open
public function set_name($name)
{
$this->name = $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 set_locked is not named in camelCase. Open
public function set_locked($locked)
{
$this->locked = $locked;
}
- 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_weight is not named in camelCase. Open
public function get_weight()
{
return $this->weight;
}
- 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 create_evaluation_objects_from_sql_result is not named in camelCase. Open
private static function create_evaluation_objects_from_sql_result($result)
{
$alleval = [];
$allow = ('true' === api_get_setting('gradebook.allow_gradebook_stats'));
if ($allow) {
- 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_type is not named in camelCase. Open
public function get_type()
{
return $this->type ?? '';
}
- 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_date is not named in camelCase. Open
public function get_date()
{
return $this->created_at;
}
- 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 does_name_exist is not named in camelCase. Open
public function does_name_exist($name, $parent)
{
if (!isset($name)) {
$name = $this->name;
$parent = $this->category;
- 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 set_visible is not named in camelCase. Open
public function set_visible($visible)
{
$this->visible = $visible;
}
- 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_id is not named in camelCase. Open
public function get_category_id()
{
return $this->category->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_max is not named in camelCase. Open
public function get_max()
{
return $this->eval_max;
}
- 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 check_lock_permissions is not named in camelCase. Open
public function check_lock_permissions()
{
if (api_is_platform_admin()) {
return true;
} 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_locked is not named in camelCase. Open
public function get_locked()
{
return $this->locked ?? 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_locked is not named in camelCase. Open
public function is_locked()
{
return isset($this->locked) && 1 == $this->locked ? true : 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 delete_with_results is not named in camelCase. Open
public function delete_with_results(): void
{
$this->delete_results();
$this->delete();
}
- 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_valid_score is not named in camelCase. Open
public function is_valid_score(mixed $score): bool
{
return is_numeric($score) && $score >= 0 && $score <= $this->eval_max;
}
- 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 calc_score is not named in camelCase. Open
public function calc_score($studentId = null, $type = null): array
{
$allowStats = ('true' === api_get_setting('gradebook.allow_gradebook_stats'));
if ($allowStats) {
- 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_target_categories is not named in camelCase. Open
public function get_target_categories(): array
{
// - course independent evaluation
// -> movable to root or other course independent categories
// - evaluation inside a course
- 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_name is not named in camelCase. Open
public function get_name()
{
return $this->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 set_max is not named in camelCase. Open
public function set_max($max)
{
$this->eval_max = $max;
}
- 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_evaluations_with_result_for_student is not named in camelCase. Open
public static function get_evaluations_with_result_for_student(int $stud_id, ?int $cat_id = null): array
{
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_grade_results = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
- 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_linked_data is not named in camelCase. Open
public function delete_linked_data()
{
}
- 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_user_id is not named in camelCase. Open
public function get_user_id()
{
return $this->user_id;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_course_code is not named in camelCase. Open
public function get_course_code()
{
return $this->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 set_description is not named in camelCase. Open
public function set_description($description)
{
$this->description = $description;
}
- 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 set_date is not named in camelCase. Open
public function set_date($date)
{
$this->created_at = $date;
}
- 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 set_type is not named in camelCase. Open
public function set_type($type)
{
$this->type = $type;
}
- 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_description is not named in camelCase. Open
public function get_description()
{
return $this->description;
}
- 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 set_session_id is not named in camelCase. Open
public function set_session_id($sessionId)
{
$this->setSessionId($sessionId);
}
- 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 has_results is not named in camelCase. Open
public function has_results(): bool
{
$table = Database::get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
$sql = 'SELECT count(id) AS number
FROM '.$table.'
- 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 set_id is not named in camelCase. Open
public function set_id($id)
{
$this->id = (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() {
}
}