Avoid using undefined variables such as '$score' which will lead to PHP notices. Open
$score[$key] = $row['score'];
- 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 assigning values to variables in if clauses and the like (line '92', column '21'). Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
The method process uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else { // course not visible for user
if ($search_show_unlinked_results) {
$result['url'] = '';
$results[] = $result;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid assigning values to variables in if clauses and the like (line '80', column '17'). Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
The method get_information uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return [];
}
- 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
FIXME found Open
return [$thumbnail, $image, $name, $author, $url]; // FIXME: is it posible to get an author here?
- Exclude checks
FIXME found Open
//FIXME: use big images
- Exclude checks
The class document_processor is not named in CamelCase. Open
class document_processor extends search_processor
{
public function __construct($rows)
{
$this->rows = $rows;
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
The parameter $course_id is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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 $doc_id is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Variable "search_show_unlinked_results" is not in valid camel caps format Open
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- Exclude checks
Variable "doc_id" is not in valid camel caps format Open
$doc_id = intval($doc_id);
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
WHERE ref = $doc_id AND tool = '".TOOL_DOCUMENT."' AND c_id = $course_id
- Exclude checks
Variable "course_visible_for_user" is not in valid camel caps format Open
$course_visible_for_user = api_is_course_visible_for_user(null, $row_val['courseid']);
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
WHERE $doc_table.id = $doc_id AND c_id = $course_id
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$course_id = $course_information['real_id'];
- Exclude checks
Variable "course_information" is not in valid camel caps format Open
$course_path = $course_information['path'];
- Exclude checks
Variable "doc_id" is not in valid camel caps format Open
$doc_id = intval($doc_id);
- Exclude checks
Variable "course_visible_for_user" is not in valid camel caps format Open
if ($course_visible_for_user || $search_show_unlinked_results) {
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
$visibility = api_get_item_visibility(api_get_course_info($row_val['courseid']), TOOL_DOCUMENT, $row_val['xapian_data'][SE_DATA]['doc_id']);
- Exclude checks
Variable "search_show_unlinked_results" is not in valid camel caps format Open
if ($course_visible_for_user || $search_show_unlinked_results) {
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
private function get_information($course_id, $doc_id)
- Exclude checks
Variable "doc_id" is not in valid camel caps format Open
WHERE $doc_table.id = $doc_id AND c_id = $course_id
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
list($thumbnail, $image, $name, $author, $url) = $this->get_information($row_val['courseid'], $row_val['xapian_data'][SE_DATA]['doc_id']);
- Exclude checks
Variable "course_visible_for_user" is not in valid camel caps format Open
if ($course_visible_for_user) {
- Exclude checks
Variable "course_information" is not in valid camel caps format Open
$course_id = $course_information['real_id'];
- Exclude checks
Variable "item_property_table" is not in valid camel caps format Open
$sql = "SELECT insert_user_id FROM $item_property_table
- Exclude checks
Variable "user_data" is not in valid camel caps format Open
$author = api_get_person_name($user_data['firstName'], $user_data['lastName']);
- Exclude checks
Variable "item_result" is not in valid camel caps format Open
if ($row = Database::fetch_array($item_result)) {
- Exclude checks
Missing function doc comment Open
public function process()
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
foreach ($this->rows as $row_val) {
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$course_information = api_get_course_info($course_id);
- Exclude checks
Variable "course_information" is not in valid camel caps format Open
if (!empty($course_information)) {
- Exclude checks
Variable "item_property_table" is not in valid camel caps format Open
$item_property_table = Database::get_course_table(TABLE_ITEM_PROPERTY);
- Exclude checks
Variable "doc_table" is not in valid camel caps format Open
$doc_table = Database::get_course_table(TABLE_DOCUMENT);
- Exclude checks
Variable "doc_table" is not in valid camel caps format Open
WHERE $doc_table.id = $doc_id AND c_id = $course_id
- Exclude checks
Variable "dk_result" is not in valid camel caps format Open
if ($row = Database::fetch_array($dk_result)) {
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
'score' => $row_val['score'],
- Exclude checks
Variable "course_path" is not in valid camel caps format Open
$url = sprintf($url, $course_path, $row['path']);
- Exclude checks
Variable "course_path" is not in valid camel caps format Open
$course_path = $course_information['path'];
- Exclude checks
Variable "item_result" is not in valid camel caps format Open
$item_result = Database::query($sql);
- Exclude checks
Variable "doc_table" is not in valid camel caps format Open
$sql = "SELECT * FROM $doc_table
- Exclude checks
Variable "user_data" is not in valid camel caps format Open
$author = api_get_person_name($user_data['firstName'], $user_data['lastName']);
- Exclude checks
Variable "dk_result" is not in valid camel caps format Open
$dk_result = Database::query($sql);
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
$visibility = api_get_item_visibility(api_get_course_info($row_val['courseid']), TOOL_DOCUMENT, $row_val['xapian_data'][SE_DATA]['doc_id']);
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
list($thumbnail, $image, $name, $author, $url) = $this->get_information($row_val['courseid'], $row_val['xapian_data'][SE_DATA]['doc_id']);
- Exclude checks
Variable "course_information" is not in valid camel caps format Open
$course_information = api_get_course_info($course_id);
- Exclude checks
Variable "user_data" is not in valid camel caps format Open
$user_data = api_get_user_info($row['insert_user_id']);
- Exclude checks
Missing function doc comment Open
public function __construct($rows)
- Exclude checks
Variable "doc_id" is not in valid camel caps format Open
WHERE ref = $doc_id AND tool = '".TOOL_DOCUMENT."' AND c_id = $course_id
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
$course_visible_for_user = api_is_course_visible_for_user(null, $row_val['courseid']);
- Exclude checks
Variable "search_show_unlinked_results" is not in valid camel caps format Open
if ($search_show_unlinked_results) {
- Exclude checks
Method name "document_processor::get_information" is not in camel caps format Open
private function get_information($course_id, $doc_id)
- Exclude checks
Variable "doc_id" is not in valid camel caps format Open
private function get_information($course_id, $doc_id)
- Exclude checks
Class name "document_processor" is not in camel caps format Open
class document_processor extends search_processor
- Exclude checks
The variable $course_visible_for_user is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->rows as $row_val) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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 $doc_table is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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_path is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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_data is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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 $search_show_unlinked_results is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->rows as $row_val) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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 $doc_id is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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_data is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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_val is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->rows as $row_val) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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_visible_for_user is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->rows as $row_val) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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_path is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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_val is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->rows as $row_val) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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_information is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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 $item_property_table is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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 $doc_table is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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_val is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->rows as $row_val) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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_information is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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 $doc_id is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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 $doc_id is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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 $search_show_unlinked_results is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->rows as $row_val) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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_val is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->rows as $row_val) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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_val is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->rows as $row_val) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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 $doc_table is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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 $item_property_table is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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_data is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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_val is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->rows as $row_val) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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_visible_for_user is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->rows as $row_val) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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_information is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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_information is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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 $dk_result is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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 $search_show_unlinked_results is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->rows as $row_val) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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 $dk_result is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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 $item_result is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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_val is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->rows as $row_val) {
$search_show_unlinked_results = ('true' == api_get_setting('search_show_unlinked_results'));
- 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 $doc_id is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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 $item_result is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method get_information is not named in camelCase. Open
private function get_information($course_id, $doc_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_path = $course_information['path'];
- 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() {
}
}