Update variable type PHPDoc in _responsive_image_build_source_attributes function

Created on 30 September 2022, over 2 years ago
Updated 18 February 2023, almost 2 years ago

Problem/Motivation

The return variable of function _responsive_image_build_source_attributes in responsive_image.module doesn't have the correct return type.

Steps to reproduce

1. Call the _responsive_image_build_source_attributes()
2. Try to get the offset of an attribute.
3. Analyse with PHPStan.

Cannot call method offsetGet() on array<Drupal\Core\Template\Attribute>
Return type in PHPDoc does not match the actual return type \Drupal\Core\Template\Attribute

Proposed resolution

Update _responsive_image_build_source_attributes PHPDoc to * @return \Drupal\Core\Template\Attribute .

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

9.5

Component
Responsive image 

Last updated 2 days ago

Created by

🇬🇷Greece smavri

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024