Media method incorrect return types

Created on 18 September 2023, about 1 year ago

Problem/Motivation

The declared returns types of getThumbnailWidth and getThumbnailHeight inside of \Drupal\media\Entity\Media are not respected.

For instance, both methods rely on getMetadata, but it's return signature does not match the one of the calling methods.

Steps to reproduce

Proposed resolution

Enforce the declared return types, either int or null.

Remaining tasks

Open a PR.

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Needs work

Version

10.1

Component
Media 

Last updated about 5 hours ago

Created by

🇸🇮Slovenia alecsmrekar

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024