Returntype incorrect for \Drupal\Core\Entity\EntityDeleteMultipleAccessCheck::$tempStore

Created on 15 September 2023, 10 months ago
Updated 30 September 2023, 9 months ago

Problem/Motivation

The return type on \Drupal\Core\Entity\EntityDeleteMultipleAccessCheck::$tempStore is currently
* @var \Drupal\Core\TempStore\PrivateTempStoreFactory.

However this property is set in the constructor as $this->tempStore = $temp_store_factory->get('entity_delete_multiple_confirm'); and that returns a \Drupal\Core\TempStore\PrivateTempStore.

This creates a (currently suppressed) warning when running PHPStan:

message: "#^Variable \\$selection in empty\\(\\) always exists and is not falsy\\.$#"
count: 1
path: lib/Drupal/Core/Entity/EntityDeleteMultipleAccessCheck.php

Steps to reproduce

Proposed resolution

Adjust typehint, create new PHPStan baseline.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

11.0 πŸ”₯

Component
EntityΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡³πŸ‡±Netherlands Spokje

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

Comments & Activities

Production build 0.69.0 2024