modules/custom/deims_variable_search/deims_variable_search.pages.inc

Summary

Maintainability
Test Coverage

deims_variable_search_autocomplete accesses the super-global variable $_GET.
Open

function deims_variable_search_autocomplete($field_name, $entity_type) {
  $term = $_GET['term'];
  $limit = 10;
  $matches = array();
  $field = field_info_field($field_name);

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

deims_variable_search_autocomplete accesses the super-global variable $GLOBALS.
Open

function deims_variable_search_autocomplete($field_name, $entity_type) {
  $term = $_GET['term'];
  $limit = 10;
  $matches = array();
  $field = field_info_field($field_name);

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses
Open

  //}

Missing function doc comment
Open

function deims_variable_search_autocomplete($field_name, $entity_type) {

Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses
Open

  // Build matching conditions

Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses
Open

      //$item['data']['codes'] = list_allowed_values_string($item['data']['codes']);

Case breaking statements must be followed by a single blank line
Open

      break;

Case breaking statements must be followed by a single blank line
Open

      break;

No space found before comment text; expected "// if (empty($matches) || count($matches) < $limit) {" but found "//if (empty($matches) || count($matches) < $limit) {"
Open

  //if (empty($matches) || count($matches) < $limit) {

No space found before comment text; expected "// }" but found "//}"
Open

  //}

No space found before comment text; expected "// $item['data']['codes'] = list_allowed_values_string($item['data']['codes']);" but found "//$item['data']['codes'] = list_allowed_values_string($item['data']['codes']);"
Open

      //$item['data']['codes'] = list_allowed_values_string($item['data']['codes']);

Inline comments must start with a capital letter
Open

  //if (empty($matches) || count($matches) < $limit) {

Comment indentation error, expected only 2 spaces
Open

  //    $query->condition($id_column, $matches, 'NOT IN');

Missing function doc comment
Open

function _deims_variable_search_prepare_summary(&$item) {

Case breaking statements must be followed by a single blank line
Open

      break;

There are no issues that match your filters.

Category
Status