Code quality fixes

Created on 12 May 2025, 21 days ago

Problem/Motivation

While phpstan tests pass on the current main branch there are several issues with code quality revealed by a higher strictness level.

Steps to reproduce

Proposed resolution

Remaining tasks

src/EventSubscriber/ProductReviewEventSubscriber.php:
$product is never empty. Check that $product is an instance of ProductInterface instead. Don't use return in a function that doesn't return anything.

src/Plugin/Field/FieldType/OverallRatingItem.php:
getEntity() will return an entity or NULL. If $parent is NULL then instanceof ProductInterface will evaluate to false. Checking if $parent is set is not needed.

src/OverallProductRating.php:
Fix phpstan error Access to an undefined property Drupal\Core\Field\FieldItemListInterface::$score

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rhovland Oregon

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

Comments & Activities

Production build 0.71.5 2024