react_paragraphs.install
Avoid excessively long variable names like $entity_row_field_data. Keep variable name length under 20. Wontfix
Wontfix
$entity_row_field_data = [];
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Variable $field_name is undefined. Invalid
Invalid
[$entity_type, $id, $field_name] = explode(':', $item);
- Exclude checks
Variable $field_name is undefined. Invalid
Invalid
$entity->set($field_name, $entity_row_field_data);
- Exclude checks
Variable $field_name is undefined. Invalid
Invalid
'parent_field_name' => $field_name,
- Exclude checks
Variable $id is undefined. Invalid
Invalid
[$entity_type, $id, $field_name] = explode(':', $item);
- Exclude checks
Variable $entity_type is undefined. Invalid
Invalid
$entity = $entity_type_manager->getStorage($entity_type)->load($id);
- Exclude checks
Variable $entity_type is undefined. Invalid
Invalid
'type' => "{$entity_type}_{$entity->bundle()}_row",
- Exclude checks
Variable $id is undefined. Invalid
Invalid
'parent' => $id,
- Exclude checks
Variable $id is undefined. Invalid
Invalid
$entity = $entity_type_manager->getStorage($entity_type)->load($id);
- Exclude checks
Variable $field_name is undefined. Invalid
Invalid
$row->set($field_name, $row_items)->save();
- Exclude checks
Variable $field_name is undefined. Invalid
Invalid
foreach ($entity->get($field_name)->getValue() as $field_item) {
- Exclude checks
Variable $entity_type is undefined. Invalid
Invalid
[$entity_type, $id, $field_name] = explode(':', $item);
- Exclude checks