modules/custom/deims_variable_search/deims_variable_search.pages.inc
deims_variable_search_autocomplete accesses the super-global variable $_GET. Open
Open
function deims_variable_search_autocomplete($field_name, $entity_type) {
$term = $_GET['term'];
$limit = 10;
$matches = array();
$field = field_info_field($field_name);
- Read upRead up
- Exclude checks
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
Open
function deims_variable_search_autocomplete($field_name, $entity_type) {
$term = $_GET['term'];
$limit = 10;
$matches = array();
$field = field_info_field($field_name);
- Read upRead up
- Exclude checks
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
Open
//}
- Exclude checks
Missing function doc comment Open
Open
function deims_variable_search_autocomplete($field_name, $entity_type) {
- Exclude checks
Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses Open
Open
// Build matching conditions
- Exclude checks
Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses Open
Open
//$item['data']['codes'] = list_allowed_values_string($item['data']['codes']);
- Exclude checks
Case breaking statements must be followed by a single blank line Open
Open
break;
- Exclude checks
Case breaking statements must be followed by a single blank line Open
Open
break;
- Exclude checks
No space found before comment text; expected "// if (empty($matches) || count($matches) < $limit) {" but found "//if (empty($matches) || count($matches) < $limit) {" Open
Open
//if (empty($matches) || count($matches) < $limit) {
- Exclude checks
No space found before comment text; expected "// }" but found "//}" Open
Open
//}
- Exclude checks
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
Open
//$item['data']['codes'] = list_allowed_values_string($item['data']['codes']);
- Exclude checks
Inline comments must start with a capital letter Open
Open
//if (empty($matches) || count($matches) < $limit) {
- Exclude checks
Comment indentation error, expected only 2 spaces Open
Open
// $query->condition($id_column, $matches, 'NOT IN');
- Exclude checks
Missing function doc comment Open
Open
function _deims_variable_search_prepare_summary(&$item) {
- Exclude checks
Case breaking statements must be followed by a single blank line Open
Open
break;
- Exclude checks