SU-SWS/react_paragraphs

View on GitHub
react_paragraphs.install

Summary

Maintainability
Test Coverage

Avoid excessively long variable names like $entity_row_field_data. Keep variable name length under 20.
Wontfix

    $entity_row_field_data = [];
Severity: Minor
Found in react_paragraphs.install by phpmd

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

    [$entity_type, $id, $field_name] = explode(':', $item);
Severity: Minor
Found in react_paragraphs.install by phpcodesniffer

Variable $field_name is undefined.
Invalid

    $entity->set($field_name, $entity_row_field_data);
Severity: Minor
Found in react_paragraphs.install by phpcodesniffer

Variable $field_name is undefined.
Invalid

        'parent_field_name' => $field_name,
Severity: Minor
Found in react_paragraphs.install by phpcodesniffer

Variable $id is undefined.
Invalid

    [$entity_type, $id, $field_name] = explode(':', $item);
Severity: Minor
Found in react_paragraphs.install by phpcodesniffer

Variable $entity_type is undefined.
Invalid

    $entity = $entity_type_manager->getStorage($entity_type)->load($id);
Severity: Minor
Found in react_paragraphs.install by phpcodesniffer

Variable $entity_type is undefined.
Invalid

        'type' => "{$entity_type}_{$entity->bundle()}_row",
Severity: Minor
Found in react_paragraphs.install by phpcodesniffer

Variable $id is undefined.
Invalid

        'parent' => $id,
Severity: Minor
Found in react_paragraphs.install by phpcodesniffer

Variable $id is undefined.
Invalid

    $entity = $entity_type_manager->getStorage($entity_type)->load($id);
Severity: Minor
Found in react_paragraphs.install by phpcodesniffer

Variable $field_name is undefined.
Invalid

      $row->set($field_name, $row_items)->save();
Severity: Minor
Found in react_paragraphs.install by phpcodesniffer

Variable $field_name is undefined.
Invalid

    foreach ($entity->get($field_name)->getValue() as $field_item) {
Severity: Minor
Found in react_paragraphs.install by phpcodesniffer

Variable $entity_type is undefined.
Invalid

    [$entity_type, $id, $field_name] = explode(':', $item);
Severity: Minor
Found in react_paragraphs.install by phpcodesniffer

There are no issues that match your filters.

Category
Status