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
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_tmp['url'] = '';
$result = $result_tmp;
}
- 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_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
Avoid assigning values to variables in if clauses and the like (line '110', column '17'). Open
private function get_information($course_id, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['id'];
- 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
FIXME found Open
$image = $thumbnail; //FIXME: use big images
- Exclude checks
The class link_processor is not named in CamelCase. Open
class link_processor extends search_processor
{
public $links = [];
public function __construct($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, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $link_id is not named in camelCase. Open
private function get_information($course_id, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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
Variable "course_visible_for_user" is not in valid camel caps format Open
$course_visible_for_user = api_is_course_visible_for_user(null, $courseCode);
- Exclude checks
Variable "result_tmp" is not in valid camel caps format Open
$result = $result_tmp;
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$course_id = $course_information['real_id'];
- Exclude checks
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 "item_property_table" is not in valid camel caps format Open
$item_property_table = Database::get_course_table(TABLE_ITEM_PROPERTY);
- Exclude checks
Variable "link_id" is not in valid camel caps format Open
$link_id = intval($link_id);
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
$courseid = $row_val['courseid'];
- Exclude checks
Variable "course_info" is not in valid camel caps format Open
$visibility = api_get_item_visibility($course_info, TOOL_LINK, $one_link['link_id']);
- Exclude checks
Variable "link_id" is not in valid camel caps format Open
WHERE ref = $link_id AND tool = '".TOOL_LINK."' AND c_id = $course_id
- Exclude checks
Variable "one_course_links" is not in valid camel caps format Open
foreach ($one_course_links['links'] as $one_link) {
- Exclude checks
Variable "one_link" is not in valid camel caps format Open
list($thumbnail, $image, $name, $author, $url) = $this->get_information($courseCode, $one_link['link_id']);
- Exclude checks
Variable "course_visible_for_user" is not in valid camel caps format Open
if ($course_visible_for_user) {
- Exclude checks
Method name "link_processor::get_information" is not in camel caps format Open
private function get_information($course_id, $link_id)
- Exclude checks
Variable "course_information" is not in valid camel caps format Open
if (!empty($course_information)) {
- Exclude checks
Variable "one_link" is not in valid camel caps format Open
foreach ($one_course_links['links'] as $one_link) {
- Exclude checks
Variable "course_information" is not in valid camel caps format Open
$course_information = api_get_course_info($course_id);
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
'score' => $row_val['score'],
- Exclude checks
Variable "one_course_links" is not in valid camel caps format Open
foreach ($this->links as $courseCode => $one_course_links) {
- Exclude checks
Variable "link_id" is not in valid camel caps format Open
'link_id' => $link_id,
- Exclude checks
Variable "row_id" is not in valid camel caps format Open
'row_id' => $row_id,
- Exclude checks
Missing function doc comment Open
public function process()
- Exclude checks
Variable "row_id" is not in valid camel caps format Open
foreach ($rows as $row_id => $row_val) {
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
private function get_information($course_id, $link_id)
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
$link_id = $row_val['xapian_data'][SE_DATA]['link_id'];
- Exclude checks
Variable "course_id_alpha" is not in valid camel caps format Open
$course_id_alpha = $course_information['id'];
- Exclude checks
Variable "course_info" is not in valid camel caps format Open
$course_info = api_get_course_info($courseCode);
- 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 "link_id" is not in valid camel caps format Open
private function get_information($course_id, $link_id)
- Exclude checks
Missing function doc comment Open
public function __construct($rows)
- Exclude checks
Variable "course_information" is not in valid camel caps format Open
$course_id = $course_information['real_id'];
- Exclude checks
Variable "link_id" is not in valid camel caps format Open
$link_id = intval($link_id);
- Exclude checks
Variable "course_id_alpha" is not in valid camel caps format Open
$url = sprintf($url, $course_id_alpha);
- Exclude checks
Variable "item_result" is not in valid camel caps format Open
if ($row = Database::fetch_array($item_result)) {
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
foreach ($rows as $row_id => $row_val) {
- Exclude checks
Variable "one_link" is not in valid camel caps format Open
$visibility = api_get_item_visibility($course_info, TOOL_LINK, $one_link['link_id']);
- 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
$course_id_alpha = $course_information['id'];
- Exclude checks
Variable "result_tmp" is not in valid camel caps format Open
$result_tmp = [
- Exclude checks
Variable "search_show_unlinked_results" is not in valid camel caps format Open
if ($search_show_unlinked_results) {
- Exclude checks
Variable "item_result" is not in valid camel caps format Open
$item_result = Database::query($sql);
- 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
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 "item_property_table" is not in valid camel caps format Open
$sql = "SELECT insert_user_id FROM $item_property_table
- Exclude checks
Variable "link_id" is not in valid camel caps format Open
$link_id = $row_val['xapian_data'][SE_DATA]['link_id'];
- Exclude checks
Variable "result_tmp" is not in valid camel caps format Open
$result = $result_tmp;
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
WHERE ref = $link_id AND tool = '".TOOL_LINK."' AND c_id = $course_id
- Exclude checks
Variable "row_val" is not in valid camel caps format Open
$this->links[$courseid]['total_score'] += $row_val['score'];
- 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 "one_course_links" is not in valid camel caps format Open
'score' => $one_course_links['total_score'] / (count($one_course_links) - 1), // not count total_score array item
- Exclude checks
Variable "one_course_links" is not in valid camel caps format Open
'score' => $one_course_links['total_score'] / (count($one_course_links) - 1), // not count total_score array item
- Exclude checks
Variable "result_tmp" is not in valid camel caps format Open
$result_tmp['url'] = '';
- 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
Class name "link_processor" is not in camel caps format Open
class link_processor extends search_processor
- Exclude checks
The variable $course_information is not named in camelCase. Open
private function get_information($course_id, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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_information is not named in camelCase. Open
private function get_information($course_id, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $result_tmp is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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 $one_course_links is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $item_result is not named in camelCase. Open
private function get_information($course_id, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $user_data is not named in camelCase. Open
private function get_information($course_id, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $row_val is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group all links together
- 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_id is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group all links together
- 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->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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 $link_id is not named in camelCase. Open
private function get_information($course_id, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $search_show_unlinked_results is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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 $one_course_links is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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 $one_link is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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 $one_link is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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
public function process()
{
$results = [];
foreach ($this->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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
public function process()
{
$results = [];
foreach ($this->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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 $result_tmp is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $link_id is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group all links together
- 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 $one_course_links is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $row_val is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group all links together
- 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 __construct($rows)
{
$this->rows = $rows;
// group all links together
- 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 __construct($rows)
{
$this->rows = $rows;
// group all links together
- 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 $one_course_links is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $row_id is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group all links together
- 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 $result_tmp is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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 $result_tmp is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $link_id is not named in camelCase. Open
private function get_information($course_id, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $item_property_table is not named in camelCase. Open
private function get_information($course_id, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $link_id is not named in camelCase. Open
private function get_information($course_id, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $row_val is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group all links together
- 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, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $one_link is not named in camelCase. Open
public function process()
{
$results = [];
foreach ($this->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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_alpha is not named in camelCase. Open
private function get_information($course_id, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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_alpha is not named in camelCase. Open
private function get_information($course_id, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $user_data is not named in camelCase. Open
private function get_information($course_id, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $user_data is not named in camelCase. Open
private function get_information($course_id, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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 $link_id is not named in camelCase. Open
public function __construct($rows)
{
$this->rows = $rows;
// group all links together
- 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->links as $courseCode => $one_course_links) {
$course_info = api_get_course_info($courseCode);
- 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, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['id'];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method get_information is not named in camelCase. Open
private function get_information($course_id, $link_id)
{
$course_information = api_get_course_info($course_id);
$course_id = $course_information['real_id'];
$course_id_alpha = $course_information['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() {
}
}