Fix issues reported by PHPCS

Created on 19 March 2025, about 2 months ago

Problem/Motivation

Running PHPCS shows the warnings/errors in attached file, which should be fixed.

📌 Task
Status

Active

Version

4.0

Component

Code

Created by

🇮🇳India ggh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @ggh
  • Pipeline finished with Success
    about 2 months ago
    Total: 139s
    #451978
  • Pipeline finished with Failed
    about 2 months ago
    Total: 138s
    #451982
  • 🇺🇸United States mlncn Minneapolis, MN, USA

    Among the numerous meaningless changes for coding standards, the patch also fixes a deprecation warning:

     ( ! ) Deprecated: Drupal\computed_field\Plugin\ComputedField\ComputedFieldBase::createComputedFieldDefinition(): Implicitly marking parameter $bundle as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/computed_field/src/Plugin/ComputedField/ComputedFieldBase.php on line 131
    

    Unfortunately it breaks the module in a worse way:

    PHP Fatal error:  Uncaught Error: Call to a member function getName() on null in /var/www/html/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:188
    Stack trace:
    #0 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(312): Drupal\Core\Config\Entity\ConfigEntityStorage->doLoadMultiple()
    #1 /var/www/html/web/modules/contrib/computed_field/computed_field.module(122): Drupal\Core\Entity\EntityStorageBase->loadMultiple()
    #2 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityFieldManager.php(415): computed_field_entity_bundle_field_info()
    
Production build 0.71.5 2024