Showing 699 of 699 total issues
Tag value indented incorrectly; expected 1 space but found 2 Open
Open
* @param object $results
- Exclude checks
Missing short description in doc comment Open
Open
/**
- Exclude checks
Type hint "array" missing for $variables Open
Open
function deims_data_explorer_form($form, &$form_state, $variables, $connection, $node) {
- Exclude checks
Description for the @return value is missing Open
Open
* @return array
- Exclude checks
Type hint "array" missing for $columns Open
Open
function _deims_de_get_submitted_filters($columns) {
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* Document _deims_de_flatten_allowed
- Exclude checks
Description for the @return value is missing Open
Open
* @return array
- Exclude checks
There must be exactly one blank line after the file comment Open
Open
*/
- Exclude checks
Array indentation error, expected 16 spaces but found 17 Open
Open
'code' => $key,
- Exclude checks
Expected 1 space before "="; 0 found Open
Open
$attribute['gfc:FC_FeatureAttribute']['gfc:valueMeasurementUnit'][$unitname]['gml:identifier codeSpace=http://unit.lternet.edu']='';
- Exclude checks
Missing function doc comment Open
Open
function deims_variable_type_label($type) {
- Exclude checks
Missing function doc comment Open
Open
function deims_variable_load_multiple($field_name, array $ids) {
- Exclude checks
Return comment indentation must be 3 spaces, found 2 spaces Open
Open
* Added utf8 encoding to the tidy statment
- Exclude checks
Public method name "EmlDataSet::setEMLHash" is not in lowerCamel format Open
Open
public function setEMLHash($hash) {
- Exclude checks
Public method name "EmlDataSet::getDOI" is not in lowerCamel format Open
Open
public function getDOI() {
- Exclude checks
Doc comment short description must be on a single line, further text should be a separate paragraph Open
Open
* Because it is re-used by other elements.
- Exclude checks
Avoid too many return
statements within this method. Open
Open
return array();
Avoid too many return
statements within this method. Open
Open
return array();
Function processData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
public static function processData($data) {
$seen_nids = &drupal_static('pasta_validation_report_queue_process', array());
// Ensure that on the same request we don't try to fetch the validation
// report for the same node more than once.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function deleteEml
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
public function deleteEml() {
list($scope, $identifier) = $this->dataSet->getPackageIDParts();
$url = static::getApiUrl("package/eml/$scope/$identifier");
$options = array(
'method' => 'DELETE',
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"