- Issue created by @rhovland
While phpstan tests pass on the current main branch there are several issues with code quality revealed by a higher strictness level.
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
Active
1.0
Code