Avoid using undefined variables such as '$return_array' which will lead to PHP notices. Open
return $return_array;
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$return_array' which will lead to PHP notices. Open
$return_array[] = $result;
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
The method add_specific_field uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return false;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method add_specific_field_value uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return false;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The parameter $ref_id is not named in camelCase. Open
function get_specific_field_values_list_by_prefix(
$prefix,
$course_code,
$tool_id,
$ref_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 $course_id is not named in camelCase. Open
function add_specific_field_value(
$id_specific_field,
$course_id,
$tool_id,
$ref_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 $course_id is not named in camelCase. Open
function delete_all_specific_field_value($course_id, $id_specific_field, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s AND field_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id, $id_specific_field);
- 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 $ref_id is not named in camelCase. Open
function delete_all_specific_field_value($course_id, $id_specific_field, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s AND field_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id, $id_specific_field);
- 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 $id_specific_field is not named in camelCase. Open
function add_specific_field_value(
$id_specific_field,
$course_id,
$tool_id,
$ref_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 $tool_id is not named in camelCase. Open
function delete_all_values_for_item($course_id, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_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 $course_code is not named in camelCase. Open
function get_specific_field_values_list_by_prefix(
$prefix,
$course_code,
$tool_id,
$ref_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 $tool_id is not named in camelCase. Open
function get_specific_field_values_list_by_prefix(
$prefix,
$course_code,
$tool_id,
$ref_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 $order_by is not named in camelCase. Open
function get_specific_field_list($conditions = [], $order_by = [])
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$return_array = [];
$sql = "SELECT * FROM $table_sf";
- 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 $id_specific_field is not named in camelCase. Open
function delete_all_specific_field_value($course_id, $id_specific_field, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s AND field_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id, $id_specific_field);
- 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 $ref_id is not named in camelCase. Open
function delete_all_values_for_item($course_id, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_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 $tool_id is not named in camelCase. Open
function add_specific_field_value(
$id_specific_field,
$course_id,
$tool_id,
$ref_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 $ref_id is not named in camelCase. Open
function add_specific_field_value(
$id_specific_field,
$course_id,
$tool_id,
$ref_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 $tool_id is not named in camelCase. Open
function delete_all_specific_field_value($course_id, $id_specific_field, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s AND field_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id, $id_specific_field);
- 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 $course_id is not named in camelCase. Open
function delete_all_values_for_item($course_id, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_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 $order_by is not named in camelCase. Open
function get_specific_field_values_list(
$conditions = [],
$order_by = []
) {
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- 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
Consider putting global function "add_specific_field" in a static class Open
function add_specific_field($name)
- Exclude checks
Variable "table_sf_val" is not in valid camel caps format Open
$table_sf_val = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Exclude checks
Variable "_safe_name" is not in valid camel caps format Open
$sql = sprintf($sql, $table_sf, $_safe_code, $_safe_name);
- Exclude checks
Variable "table_sf" is not in valid camel caps format Open
$sql = sprintf($sql, $table_sf, $id);
- Exclude checks
Variable "_safe_code" is not in valid camel caps format Open
$_safe_code = get_specific_field_code_from_name($_safe_code);
- Exclude checks
Variable "table_sf" is not in valid camel caps format Open
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
- Exclude checks
Variable "table_sf" is not in valid camel caps format Open
$sql = sprintf($sql, $table_sf, $_safe_code, $_safe_name);
- Exclude checks
Variable "_safe_name" is not in valid camel caps format Open
$_safe_name = Database::escape_string($name);
- Exclude checks
Variable "table_sf" is not in valid camel caps format Open
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
- Exclude checks
Variable "table_sf" is not in valid camel caps format Open
$sql = "SELECT * FROM $table_sf";
- Exclude checks
Variable "table_sf" is not in valid camel caps format Open
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
- Exclude checks
Variable "_safe_name" is not in valid camel caps format Open
$_safe_code = substr($_safe_name, 0, 1);
- Exclude checks
Variable "table_sf" is not in valid camel caps format Open
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
- Exclude checks
Variable "_safe_code" is not in valid camel caps format Open
$_safe_code = get_specific_field_code_from_name($_safe_code);
- Exclude checks
Consider putting global function "edit_specific_field" in a static class Open
function edit_specific_field($id, $name)
- Exclude checks
Variable "table_sf" is not in valid camel caps format Open
$sql = sprintf($sql, $table_sf, $name, $id);
- Exclude checks
Variable "return_array" is not in valid camel caps format Open
$return_array = [];
- Exclude checks
Variable "order_by" is not in valid camel caps format Open
function get_specific_field_list($conditions = [], $order_by = [])
- Exclude checks
Variable "conditions_string_array" is not in valid camel caps format Open
$conditions_string_array = [];
- Exclude checks
Variable "table_sf" is not in valid camel caps format Open
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
- Exclude checks
Variable "_safe_code" is not in valid camel caps format Open
if (false === $_safe_code) {
- Exclude checks
Variable "_safe_code" is not in valid camel caps format Open
$sql = sprintf($sql, $table_sf, $_safe_code, $_safe_name);
- Exclude checks
Variable "_safe_code" is not in valid camel caps format Open
$_safe_code = substr($_safe_name, 0, 1);
- Exclude checks
Consider putting global function "delete_specific_field" in a static class Open
function delete_specific_field($id)
- Exclude checks
Consider putting global function "get_specific_field_list" in a static class Open
function get_specific_field_list($conditions = [], $order_by = [])
- Exclude checks
Variable "conditions_string_array" is not in valid camel caps format Open
$conditions_string_array[] = $field.' = '.$value;
- Exclude checks
Variable "order_by" is not in valid camel caps format Open
$sql .= ' ORDER BY '.implode(',', $order_by);
- Exclude checks
Variable "return_array" is not in valid camel caps format Open
$return_array[] = $result;
- Exclude checks
Consider putting global function "get_specific_field_values_list_by_prefix" in a static class Open
function get_specific_field_values_list_by_prefix(
- Exclude checks
Variable "tool_id" is not in valid camel caps format Open
$tool_id,
- Exclude checks
Variable "course_info" is not in valid camel caps format Open
$conditions['course_code'] = " '".$course_info['code']."' ";
- Exclude checks
Variable "conditions_string_array" is not in valid camel caps format Open
$conditions_string_array = [];
- Exclude checks
Variable "sql_result" is not in valid camel caps format Open
$sql_result = Database::query($sql);
- Exclude checks
Variable "table_sfv" is not in valid camel caps format Open
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Exclude checks
Variable "table_sfv" is not in valid camel caps format Open
$table_sfv,
- Exclude checks
Variable "table_sf" is not in valid camel caps format Open
$sql = "SELECT code FROM $table_sf ORDER BY code";
- Exclude checks
Variable "ref_id" is not in valid camel caps format Open
$ref_id
- Exclude checks
Variable "ref_id" is not in valid camel caps format Open
$ref_id
- Exclude checks
Variable "table_sf_values" is not in valid camel caps format Open
$table_sf_values,
- Exclude checks
Missing parameter name Open
* @param string Tool ID
- Exclude checks
Missing parameter name Open
* @param int Internal ID used in specific tool table
- Exclude checks
Variable "ref_id" is not in valid camel caps format Open
function delete_all_values_for_item($course_id, $tool_id, $ref_id)
- Exclude checks
Variable "conditions_string_array" is not in valid camel caps format Open
$sql .= implode(' AND ', $conditions_string_array);
- Exclude checks
Variable "tool_id" is not in valid camel caps format Open
$tool_id,
- Exclude checks
Variable "return_array" is not in valid camel caps format Open
$return_array[] = $result;
- Exclude checks
Variable "tool_id" is not in valid camel caps format Open
function delete_all_values_for_item($course_id, $tool_id, $ref_id)
- Exclude checks
Consider putting global function "get_specific_field_code_from_name" in a static class Open
function get_specific_field_code_from_name($name)
- Exclude checks
Variable "course_code" is not in valid camel caps format Open
$course_code,
- Exclude checks
Variable "tool_id" is not in valid camel caps format Open
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id, $id_specific_field);
- Exclude checks
Variable "return_array" is not in valid camel caps format Open
$return_array = [];
- Exclude checks
Variable "ref_id" is not in valid camel caps format Open
$ref_id,
- Exclude checks
Variable "ref_id" is not in valid camel caps format Open
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id, $id_specific_field);
- Exclude checks
Variable "table_sfv" is not in valid camel caps format Open
$sql = "SELECT * FROM $table_sfv";
- Exclude checks
Variable "conditions_string_array" is not in valid camel caps format Open
$conditions_string_array[] = $field.' = '.$value;
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id, $id_specific_field);
- Exclude checks
Variable "id_specific_field" is not in valid camel caps format Open
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id, $id_specific_field);
- Exclude checks
Missing parameter name Open
* @param string Name
- Exclude checks
Consider putting global function "get_specific_field_values_list" in a static class Open
function get_specific_field_values_list(
- Exclude checks
Variable "table_sfv" is not in valid camel caps format Open
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Exclude checks
Variable "return_array" is not in valid camel caps format Open
$return_array[] = $result;
- Exclude checks
Variable "table_sf" is not in valid camel caps format Open
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
- Exclude checks
Variable "return_array" is not in valid camel caps format Open
return $return_array;
- Exclude checks
Variable "ref_id" is not in valid camel caps format Open
$ref_id,
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
function delete_all_specific_field_value($course_id, $id_specific_field, $tool_id, $ref_id)
- Exclude checks
Variable "table_sf_values" is not in valid camel caps format Open
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id, $id_specific_field);
- Exclude checks
Variable "id_specific_field" is not in valid camel caps format Open
$id_specific_field,
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$course_id,
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$course_id,
- Exclude checks
Variable "table_sf_values" is not in valid camel caps format Open
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id);
- Exclude checks
Variable "ref_id" is not in valid camel caps format Open
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id);
- Exclude checks
Variable "existing_list" is not in valid camel caps format Open
if (!in_array($list[$i], $existing_list)) {
- Exclude checks
Variable "conditions_string_array" is not in valid camel caps format Open
$sql .= implode(' AND ', $conditions_string_array);
- Exclude checks
Variable "sql_result" is not in valid camel caps format Open
$sql_result = Database::query($sql);
- Exclude checks
Variable "course_code" is not in valid camel caps format Open
$course_code,
- Exclude checks
Variable "tool_id" is not in valid camel caps format Open
$tool_id,
- Exclude checks
Consider putting global function "delete_all_specific_field_value" in a static class Open
function delete_all_specific_field_value($course_id, $id_specific_field, $tool_id, $ref_id)
- Exclude checks
Variable "id_specific_field" is not in valid camel caps format Open
function delete_all_specific_field_value($course_id, $id_specific_field, $tool_id, $ref_id)
- Exclude checks
Variable "existing_list" is not in valid camel caps format Open
if (!in_array($code, $existing_list)) {
- Exclude checks
Variable "return_array" is not in valid camel caps format Open
return $return_array;
- Exclude checks
Variable "sql_result" is not in valid camel caps format Open
while ($result = Database::fetch_array($sql_result)) {
- Exclude checks
Variable "table_sf_values" is not in valid camel caps format Open
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Exclude checks
Variable "sql_result" is not in valid camel caps format Open
while ($result = Database::fetch_array($sql_result)) {
- Exclude checks
Variable "order_by" is not in valid camel caps format Open
$order_by = []
- Exclude checks
Variable "course_info" is not in valid camel caps format Open
$course_info = api_get_course_info_by_id(intval($conditions['c_id']));
- Exclude checks
Variable "sql_result" is not in valid camel caps format Open
while ($result = Database::fetch_array($sql_result)) {
- Exclude checks
Variable "table_sf" is not in valid camel caps format Open
$table_sf,
- Exclude checks
Variable "sql_result" is not in valid camel caps format Open
$sql_result = Database::query($sql);
- Exclude checks
Variable "tool_id" is not in valid camel caps format Open
function delete_all_specific_field_value($course_id, $id_specific_field, $tool_id, $ref_id)
- Exclude checks
Consider putting global function "delete_all_values_for_item" in a static class Open
function delete_all_values_for_item($course_id, $tool_id, $ref_id)
- Exclude checks
Variable "tool_id" is not in valid camel caps format Open
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id);
- Exclude checks
Variable "table_sf" is not in valid camel caps format Open
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
- Exclude checks
Variable "existing_list" is not in valid camel caps format Open
$existing_list = [];
- Exclude checks
Variable "order_by" is not in valid camel caps format Open
if (count($order_by) > 0) {
- Exclude checks
Variable "order_by" is not in valid camel caps format Open
$sql .= ' ORDER BY '.implode(',', $order_by);
- Exclude checks
Variable "return_array" is not in valid camel caps format Open
return $return_array;
- Exclude checks
Variable "tool_id" is not in valid camel caps format Open
$tool_id,
- Exclude checks
Variable "table_sf_values" is not in valid camel caps format Open
$table_sf_values = Database::get_main_table(
- Exclude checks
Variable "ref_id" is not in valid camel caps format Open
function delete_all_specific_field_value($course_id, $id_specific_field, $tool_id, $ref_id)
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
function delete_all_values_for_item($course_id, $tool_id, $ref_id)
- Exclude checks
Variable "existing_list" is not in valid camel caps format Open
$existing_list[] = $row['code'];
- Exclude checks
Consider putting global function "add_specific_field_value" in a static class Open
function add_specific_field_value(
- Exclude checks
Variable "table_sf_values" is not in valid camel caps format Open
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id);
- Exclude checks
Variable "order_by" is not in valid camel caps format Open
if (count($order_by) > 0) {
- Exclude checks
Variable "id_specific_field" is not in valid camel caps format Open
$id_specific_field,
- Exclude checks
Missing parameter name Open
* @param string Course code
- Exclude checks
The variable $table_sf is not named in camelCase. Open
function add_specific_field($name)
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$name = trim($name);
if (empty($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 $course_info is not named in camelCase. Open
function get_specific_field_values_list(
$conditions = [],
$order_by = []
) {
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $_safe_code is not named in camelCase. Open
function add_specific_field($name)
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$name = trim($name);
if (empty($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 $conditions_string_array is not named in camelCase. Open
function get_specific_field_list($conditions = [], $order_by = [])
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$return_array = [];
$sql = "SELECT * FROM $table_sf";
- 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_sf is not named in camelCase. Open
function delete_specific_field($id)
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$id = (int) $id;
if (!is_numeric($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 $_safe_code is not named in camelCase. Open
function add_specific_field($name)
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$name = trim($name);
if (empty($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 $_safe_name is not named in camelCase. Open
function add_specific_field($name)
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$name = trim($name);
if (empty($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 $conditions_string_array is not named in camelCase. Open
function get_specific_field_list($conditions = [], $order_by = [])
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$return_array = [];
$sql = "SELECT * FROM $table_sf";
- 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 $sql_result is not named in camelCase. Open
function get_specific_field_values_list(
$conditions = [],
$order_by = []
) {
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $table_sf is not named in camelCase. Open
function add_specific_field($name)
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$name = trim($name);
if (empty($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 $_safe_name is not named in camelCase. Open
function add_specific_field($name)
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$name = trim($name);
if (empty($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_sf is not named in camelCase. Open
function delete_specific_field($id)
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$id = (int) $id;
if (!is_numeric($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 $_safe_code is not named in camelCase. Open
function add_specific_field($name)
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$name = trim($name);
if (empty($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 $_safe_code is not named in camelCase. Open
function add_specific_field($name)
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$name = trim($name);
if (empty($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 $_safe_code is not named in camelCase. Open
function add_specific_field($name)
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$name = trim($name);
if (empty($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 $return_array is not named in camelCase. Open
function get_specific_field_list($conditions = [], $order_by = [])
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$return_array = [];
$sql = "SELECT * FROM $table_sf";
- 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 $ref_id is not named in camelCase. Open
function get_specific_field_values_list_by_prefix(
$prefix,
$course_code,
$tool_id,
$ref_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 $table_sf is not named in camelCase. Open
function edit_specific_field($id, $name)
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$id = (int) $id;
if (!is_numeric($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 $table_sf is not named in camelCase. Open
function edit_specific_field($id, $name)
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$id = (int) $id;
if (!is_numeric($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 $_safe_name is not named in camelCase. Open
function add_specific_field($name)
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$name = trim($name);
if (empty($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 $return_array is not named in camelCase. Open
function get_specific_field_list($conditions = [], $order_by = [])
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$return_array = [];
$sql = "SELECT * FROM $table_sf";
- 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 $return_array is not named in camelCase. Open
function get_specific_field_values_list(
$conditions = [],
$order_by = []
) {
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $table_sfv is not named in camelCase. Open
function get_specific_field_values_list_by_prefix(
$prefix,
$course_code,
$tool_id,
$ref_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 $id_specific_field is not named in camelCase. Open
function add_specific_field_value(
$id_specific_field,
$course_id,
$tool_id,
$ref_id,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $course_id is not named in camelCase. Open
function delete_all_specific_field_value($course_id, $id_specific_field, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s AND field_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id, $id_specific_field);
- 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 $ref_id is not named in camelCase. Open
function delete_all_specific_field_value($course_id, $id_specific_field, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s AND field_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id, $id_specific_field);
- 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_sf is not named in camelCase. Open
function get_specific_field_code_from_name($name)
{
// Z is used internally by Xapian
// O & C already used by tool_id and course_id
$list = [
- 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_sf_values is not named in camelCase. Open
function delete_all_specific_field_value($course_id, $id_specific_field, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s AND field_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id, $id_specific_field);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $course_id is not named in camelCase. Open
function delete_all_values_for_item($course_id, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_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 $sql_result is not named in camelCase. Open
function get_specific_field_list($conditions = [], $order_by = [])
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$return_array = [];
$sql = "SELECT * FROM $table_sf";
- 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_sfv is not named in camelCase. Open
function get_specific_field_values_list_by_prefix(
$prefix,
$course_code,
$tool_id,
$ref_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 $table_sf is not named in camelCase. Open
function get_specific_field_list($conditions = [], $order_by = [])
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$return_array = [];
$sql = "SELECT * FROM $table_sf";
- 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 $conditions_string_array is not named in camelCase. Open
function get_specific_field_list($conditions = [], $order_by = [])
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$return_array = [];
$sql = "SELECT * FROM $table_sf";
- 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 $sql_result is not named in camelCase. Open
function get_specific_field_list($conditions = [], $order_by = [])
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$return_array = [];
$sql = "SELECT * FROM $table_sf";
- 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 $ref_id is not named in camelCase. Open
function add_specific_field_value(
$id_specific_field,
$course_id,
$tool_id,
$ref_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 $table_sf_values is not named in camelCase. Open
function delete_all_specific_field_value($course_id, $id_specific_field, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s AND field_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id, $id_specific_field);
- 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 $order_by is not named in camelCase. Open
function get_specific_field_values_list(
$conditions = [],
$order_by = []
) {
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $sql_result is not named in camelCase. Open
function get_specific_field_values_list(
$conditions = [],
$order_by = []
) {
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tool_id is not named in camelCase. Open
function get_specific_field_values_list_by_prefix(
$prefix,
$course_code,
$tool_id,
$ref_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 $table_sf_values is not named in camelCase. Open
function delete_all_values_for_item($course_id, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_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 $existing_list is not named in camelCase. Open
function get_specific_field_code_from_name($name)
{
// Z is used internally by Xapian
// O & C already used by tool_id and course_id
$list = [
- 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 $order_by is not named in camelCase. Open
function get_specific_field_list($conditions = [], $order_by = [])
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$return_array = [];
$sql = "SELECT * FROM $table_sf";
- 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_sfv is not named in camelCase. Open
function get_specific_field_values_list(
$conditions = [],
$order_by = []
) {
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $course_info is not named in camelCase. Open
function get_specific_field_values_list(
$conditions = [],
$order_by = []
) {
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $return_array is not named in camelCase. Open
function get_specific_field_values_list(
$conditions = [],
$order_by = []
) {
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $return_array is not named in camelCase. Open
function get_specific_field_list($conditions = [], $order_by = [])
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$return_array = [];
$sql = "SELECT * FROM $table_sf";
- 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 $return_array is not named in camelCase. Open
function get_specific_field_values_list(
$conditions = [],
$order_by = []
) {
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $conditions_string_array is not named in camelCase. Open
function get_specific_field_values_list(
$conditions = [],
$order_by = []
) {
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $table_sf is not named in camelCase. Open
function get_specific_field_values_list_by_prefix(
$prefix,
$course_code,
$tool_id,
$ref_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 $table_sf_values is not named in camelCase. Open
function delete_all_values_for_item($course_id, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_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 $table_sf is not named in camelCase. Open
function get_specific_field_list($conditions = [], $order_by = [])
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$return_array = [];
$sql = "SELECT * FROM $table_sf";
- 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 $conditions_string_array is not named in camelCase. Open
function get_specific_field_values_list(
$conditions = [],
$order_by = []
) {
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $course_code is not named in camelCase. Open
function get_specific_field_values_list_by_prefix(
$prefix,
$course_code,
$tool_id,
$ref_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 $existing_list is not named in camelCase. Open
function get_specific_field_code_from_name($name)
{
// Z is used internally by Xapian
// O & C already used by tool_id and course_id
$list = [
- 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 $return_array is not named in camelCase. Open
function get_specific_field_values_list_by_prefix(
$prefix,
$course_code,
$tool_id,
$ref_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 $sql_result is not named in camelCase. Open
function get_specific_field_values_list_by_prefix(
$prefix,
$course_code,
$tool_id,
$ref_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 $return_array is not named in camelCase. Open
function get_specific_field_values_list_by_prefix(
$prefix,
$course_code,
$tool_id,
$ref_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 $order_by is not named in camelCase. Open
function get_specific_field_list($conditions = [], $order_by = [])
{
$table_sf = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
$return_array = [];
$sql = "SELECT * FROM $table_sf";
- 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 $conditions_string_array is not named in camelCase. Open
function get_specific_field_values_list(
$conditions = [],
$order_by = []
) {
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $sql_result is not named in camelCase. Open
function get_specific_field_values_list_by_prefix(
$prefix,
$course_code,
$tool_id,
$ref_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 $table_sf_values is not named in camelCase. Open
function add_specific_field_value(
$id_specific_field,
$course_id,
$tool_id,
$ref_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 $table_sf_values is not named in camelCase. Open
function add_specific_field_value(
$id_specific_field,
$course_id,
$tool_id,
$ref_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 $tool_id is not named in camelCase. Open
function delete_all_values_for_item($course_id, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_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 $tool_id is not named in camelCase. Open
function add_specific_field_value(
$id_specific_field,
$course_id,
$tool_id,
$ref_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 $table_sf is not named in camelCase. Open
function get_specific_field_code_from_name($name)
{
// Z is used internally by Xapian
// O & C already used by tool_id and course_id
$list = [
- 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 $ref_id is not named in camelCase. Open
function delete_all_values_for_item($course_id, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_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 $tool_id is not named in camelCase. Open
function delete_all_specific_field_value($course_id, $id_specific_field, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s AND field_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id, $id_specific_field);
- 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 $existing_list is not named in camelCase. Open
function get_specific_field_code_from_name($name)
{
// Z is used internally by Xapian
// O & C already used by tool_id and course_id
$list = [
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $course_id is not named in camelCase. Open
function add_specific_field_value(
$id_specific_field,
$course_id,
$tool_id,
$ref_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 $id_specific_field is not named in camelCase. Open
function delete_all_specific_field_value($course_id, $id_specific_field, $tool_id, $ref_id)
{
$table_sf_values = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
$sql = 'DELETE FROM %s WHERE course_code = \'%s\' AND tool_id = \'%s\' AND ref_id = %s AND field_id = %s';
$sql = sprintf($sql, $table_sf_values, $course_id, $tool_id, $ref_id, $id_specific_field);
- 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 $order_by is not named in camelCase. Open
function get_specific_field_values_list(
$conditions = [],
$order_by = []
) {
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $table_sfv is not named in camelCase. Open
function get_specific_field_values_list(
$conditions = [],
$order_by = []
) {
$table_sfv = Database::get_main_table(TABLE_MAIN_SPECIFIC_FIELD_VALUES);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $table_sf is not named in camelCase. Open
function get_specific_field_values_list_by_prefix(
$prefix,
$course_code,
$tool_id,
$ref_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 $existing_list is not named in camelCase. Open
function get_specific_field_code_from_name($name)
{
// Z is used internally by Xapian
// O & C already used by tool_id and course_id
$list = [
- 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();
}
}